hwmon: (ina238) Only configure calibration and shunt registers if needed
authorGuenter Roeck <linux@roeck-us.net>
Sun, 31 Aug 2025 16:39:53 +0000 (09:39 -0700)
committerGuenter Roeck <linux@roeck-us.net>
Sun, 7 Sep 2025 23:34:59 +0000 (16:34 -0700)
commitd153106bd4fd63eb8d3557277a3d4ee5dbbed3b0
tree7ea96680bcebfed6545ce36abe2e14d69a994588
parent807e315bf9509f4d57eca687c9732ce16c3ef843
hwmon: (ina238) Only configure calibration and shunt registers if needed

Prepare for supporting chips with internal shunt resistor by only setting
calibration and shunt resistor registers if no current LSB is configured.

Do not display a log message during probe if a chip does not have shunt
and gain registers since those would otherwise display 0, and a message
just indicating that the driver was loaded would be just noise.

Reviewed-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
Tested-by: Chris Packham <chris.packham@alliedtelesis.co.nz> # INA780
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
drivers/hwmon/ina238.c