Hello Support,
Currently, we are using the PMIC TPS65217C Linux driver and we need to modify the default value of the register CHGCONFIG3 (Address = 0x06) to change the charge current from 500mA (10b) to 300mA (00b).
Question: How can we change the value of this register using the driver? So far, we have been doing it by using "i2cset" tool (i2cset -y -f 0 0x24 0x06 0x32) but we would prefer to do it with the driver. We are using kernel 5.4.20.
root@srouter:~# uname -a Linux srouter 5.4.20-g738552d0b0 #1 PREEMPT Fri Apr 3 18:50:34 UTC 2020 armv7l GNU/Linux
root@srouter:/sys/class/i2c-adapter/i2c-0/0-0024# ls -al drwxr-xr-x 8 root root 0 Mar 31 13:50 . drwxr-xr-x 8 root root 0 Mar 31 13:50 .. lrwxrwxrwx 1 root root 0 Apr 7 12:21 driver -> ../../../../../../../../../bus/i2c/drivers/tps65217 -r--r--r-- 1 root root 4096 Apr 7 12:21 modalias -r--r--r-- 1 root root 4096 Apr 7 12:21 name lrwxrwxrwx 1 root root 0 Apr 7 12:21 of_node -> ../../../../../../../../../firmware/devicetree/base/ocp/interconnect@44c00000/segment@200000/target-module@b000/i2c@0/tps@24 drwxr-xr-x 2 root root 0 Apr 7 12:21 power drwxr-xr-x 9 root root 0 Mar 31 13:50 regulator lrwxrwxrwx 1 root root 0 Mar 31 13:50 subsystem -> ../../../../../../../../../bus/i2c drwxr-xr-x 3 root root 0 Mar 31 13:50 tps65217-bl drwxr-xr-x 3 root root 0 Mar 31 13:50 tps65217-charger drwxr-xr-x 3 root root 0 Mar 31 13:50 tps65217-pmic drwxr-xr-x 3 root root 0 Mar 31 13:50 tps65217-pwrbutton -rw-r--r-- 1 root root 4096 Mar 31 13:50 uevent root@srouter:/sys/class/i2c-adapter/i2c-0/0-0024#
root@srouter:/sys/class/i2c-adapter/i2c-0/0-0024/tps65217-charger# ls -al drwxr-xr-x 3 root root 0 Dec 31 1969 . drwxr-xr-x 8 root root 0 Dec 31 1969 .. -rw-r--r-- 1 root root 4096 Apr 7 12:13 driver_override -r--r--r-- 1 root root 4096 Apr 7 12:13 modalias lrwxrwxrwx 1 root root 0 Apr 7 12:13 of_node -> ../../../../../../../firmware/devicetree/base/ocp/i2c@44e0b000/tps@24/charger drwxr-xr-x 2 root root 0 Apr 7 12:13 power lrwxrwxrwx 1 root root 0 Dec 31 1969 subsystem -> ../../../../../../../bus/platform -rw-r--r-- 1 root root 4096 Dec 31 1969 uevent
We would appreciate any help you guys can provide us with this.