summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLoic Guegan <manzerbredes@mailbox.org>2023-08-13 16:11:03 +0200
committerLoic Guegan <manzerbredes@mailbox.org>2023-08-13 16:11:03 +0200
commitdf5428faf5a5cfd49b1c453e76be669e86bd85e1 (patch)
tree2fe45abaa1e729d3cd95e72773157b5e7de01ee9
parentfa26bf63feb8400ddfb3f1e47857be4691859142 (diff)
Minor changes
-rwxr-xr-x[-rw-r--r--].gitignore0
-rwxr-xr-x[-rw-r--r--]Makefile10
-rwxr-xr-x[-rw-r--r--]README.md0
-rwxr-xr-x[-rw-r--r--]ina260.c0
-rwxr-xr-x[-rw-r--r--]inahwmon.c1
5 files changed, 6 insertions, 5 deletions
diff --git a/.gitignore b/.gitignore
index 7fb1beb..7fb1beb 100644..100755
--- a/.gitignore
+++ b/.gitignore
diff --git a/Makefile b/Makefile
index 01757ff..70e66f1 100644..100755
--- a/Makefile
+++ b/Makefile
@@ -2,14 +2,14 @@
#LML="/usr/src/linux-headers-$(shell uname -r)/"
LML="/lib/modules/$(shell uname -r)/build/" # Change if required on your system
-obj-m += inahwmon.o
+obj-m += ina2602.o
all: hwmon
ina260: ina260.c
make -C $(LML) M=$(PWD) modules
-hwmon: inahwmon.c
+hwmon: ina2602.c
make -C $(LML) M=$(PWD) modules
run: ina260.c
@@ -20,12 +20,12 @@ run: ina260.c
insmod ina260.ko
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
- -rmmod inahwmon
+ -rmmod ina2602
make clean
make
- insmod inahwmon.ko
+ insmod ina2602.ko
echo ina260 0x41 > /sys/bus/i2c/devices/i2c-2/new_device
diff --git a/README.md b/README.md
index 055c7e1..055c7e1 100644..100755
--- a/README.md
+++ b/README.md
diff --git a/ina260.c b/ina260.c
index 283757c..283757c 100644..100755
--- a/ina260.c
+++ b/ina260.c
diff --git a/inahwmon.c b/inahwmon.c
index 1649190..cce108d 100644..100755
--- a/inahwmon.c
+++ b/inahwmon.c
@@ -63,6 +63,7 @@ static int ina260_probe_new(struct i2c_client *client){
}
static int ina260_remove(struct i2c_client *client){
+ printk("Unregister client...\n");
hwmon_device_unregister(&client->dev);
return 0;
}