mirror of
https://gitlab.com/manzerbredes/ina260-sysfs-driver.git
synced 2025-04-19 04:09:45 +00:00
Minor changes
This commit is contained in:
parent
fa26bf63fe
commit
df5428faf5
5 changed files with 6 additions and 5 deletions
0
.gitignore
vendored
Normal file → Executable file
0
.gitignore
vendored
Normal file → Executable file
10
Makefile
Normal file → Executable file
10
Makefile
Normal file → Executable file
|
@ -2,14 +2,14 @@
|
||||||
#LML="/usr/src/linux-headers-$(shell uname -r)/"
|
#LML="/usr/src/linux-headers-$(shell uname -r)/"
|
||||||
LML="/lib/modules/$(shell uname -r)/build/" # Change if required on your system
|
LML="/lib/modules/$(shell uname -r)/build/" # Change if required on your system
|
||||||
|
|
||||||
obj-m += inahwmon.o
|
obj-m += ina2602.o
|
||||||
|
|
||||||
all: hwmon
|
all: hwmon
|
||||||
|
|
||||||
ina260: ina260.c
|
ina260: ina260.c
|
||||||
make -C $(LML) M=$(PWD) modules
|
make -C $(LML) M=$(PWD) modules
|
||||||
|
|
||||||
hwmon: inahwmon.c
|
hwmon: ina2602.c
|
||||||
make -C $(LML) M=$(PWD) modules
|
make -C $(LML) M=$(PWD) modules
|
||||||
|
|
||||||
run: ina260.c
|
run: ina260.c
|
||||||
|
@ -20,12 +20,12 @@ run: ina260.c
|
||||||
insmod ina260.ko
|
insmod ina260.ko
|
||||||
echo ina260 0x41 > /sys/bus/i2c/devices/i2c-2/new_device
|
echo ina260 0x41 > /sys/bus/i2c/devices/i2c-2/new_device
|
||||||
|
|
||||||
run2: inahwmon.c
|
run2: ina2602.c
|
||||||
-echo 0x41 > /sys/bus/i2c/devices/i2c-2/delete_device
|
-echo 0x41 > /sys/bus/i2c/devices/i2c-2/delete_device
|
||||||
-rmmod inahwmon
|
-rmmod ina2602
|
||||||
make clean
|
make clean
|
||||||
make
|
make
|
||||||
insmod inahwmon.ko
|
insmod ina2602.ko
|
||||||
echo ina260 0x41 > /sys/bus/i2c/devices/i2c-2/new_device
|
echo ina260 0x41 > /sys/bus/i2c/devices/i2c-2/new_device
|
||||||
|
|
||||||
|
|
||||||
|
|
0
README.md
Normal file → Executable file
0
README.md
Normal file → Executable file
0
ina260.c
Normal file → Executable file
0
ina260.c
Normal file → Executable file
1
inahwmon.c
Normal file → Executable file
1
inahwmon.c
Normal file → Executable file
|
@ -63,6 +63,7 @@ static int ina260_probe_new(struct i2c_client *client){
|
||||||
}
|
}
|
||||||
|
|
||||||
static int ina260_remove(struct i2c_client *client){
|
static int ina260_remove(struct i2c_client *client){
|
||||||
|
printk("Unregister client...\n");
|
||||||
hwmon_device_unregister(&client->dev);
|
hwmon_device_unregister(&client->dev);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue