forked from wrtcoder/pmbus
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Guenter Roeck <[email protected]>
- Loading branch information
Guenter Roeck
committed
Sep 15, 2011
0 parents
commit 5e5d398
Showing
15 changed files
with
5,172 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# For building for the current running version of Linux | ||
TARGET := $(shell uname -r) | ||
# Or specific version | ||
#TARGET := 2.6.33.5 | ||
KERNEL_MODULES := /lib/modules/$(TARGET) | ||
# KERNEL_BUILD := $(KERNEL_MODULES)/build | ||
KERNEL_BUILD := /usr/src/linux-headers-$(TARGET) | ||
|
||
#SYSTEM_MAP := $(KERNEL_BUILD)/System.map | ||
SYSTEM_MAP := /boot/System.map-$(TARGET) | ||
|
||
DRIVER := pmbus pmbus_core adm1275 lm25066 ltc2978 max16064 max34440 max8688 ucd9000 ucd9200 zl6100 | ||
|
||
# Directory below /lib/modules/$(TARGET)/kernel into which to install | ||
# the module: | ||
MOD_SUBDIR = drivers/hwmon/pmbus | ||
|
||
obj-m := $(patsubst %,%.o,$(DRIVER)) | ||
obj-ko := $(patsubst %,%.ko,$(DRIVER)) | ||
|
||
MAKEFLAGS += --no-print-directory | ||
|
||
.PHONY: all install modules modules_install clean | ||
|
||
all: modules | ||
|
||
# Targets for running make directly in the external module directory: | ||
|
||
modules clean: | ||
@$(MAKE) -C $(KERNEL_BUILD) M=$(CURDIR) EXTRA_CFLAGS=-I$(CURDIR)/include $@ | ||
|
||
install: modules_install | ||
|
||
modules_install: | ||
mkdir -p $(KERNEL_MODULES)/kernel/$(MOD_SUBDIR) | ||
cp $(obj-ko) $(KERNEL_MODULES)/kernel/$(MOD_SUBDIR) | ||
depmod -a -F $(SYSTEM_MAP) $(TARGET) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
To build and install: | ||
|
||
make | ||
sudo make install | ||
sudo modprobe pmbus # Generic PMBus chip support | ||
sudo modprobe max16064 # Chip specific PMBus support, for explicitly supported chips | ||
|
||
To enable hwmon support for a specific chip: | ||
|
||
cd /sys/class/i2c-adapter/i2c-1 # The PMBus chip is connected to I2C bus #1 | ||
echo pmbus 0x4e > new_device # The PMBus chip is on i2c address 0x4e | ||
echo max16064 0x7 > new_device # A max16064 is on i2c address 0x07 (on i2c bus #1) | ||
|
||
If your chip is not explicitly supported, load the "pmbus" driver. It should auto-detect | ||
most of the chip capabilities. | ||
|
||
Please send feedback and problem reports to [email protected]. |
Oops, something went wrong.