hwmon: (ina238) Add support for INA228
authorJonas Rebmann <jre@pengutronix.de>
Fri, 18 Jul 2025 14:12:50 +0000 (16:12 +0200)
committerGuenter Roeck <linux@roeck-us.net>
Sun, 27 Jul 2025 23:01:51 +0000 (16:01 -0700)
commitfd470f4ed80ce0807943b8d6802ca41044c73521
treebfa3d37eadcf822831e475e7faf24ed9c6b1b8c7
parent8aee29f743954d8fc91ecc83fbfd283a0d8f7cfd
hwmon: (ina238) Add support for INA228

Add support for the Texas Instruments INA228 Ultra-Precise
Power/Energy/Charge Monitor.

The INA228 is very similar to the INA238 but offers four bits of extra
precision in the temperature, voltage and current measurement fields.
It also supports energy and charge monitoring, the latter of which is
not supported through this patch.

While it seems in the datasheet that some constants such as LSB values
differ between the 228 and the 238, they differ only for those registers
where four bits of precision have been added and they differ by a factor
of 16 (VBUS, VSHUNT, DIETEMP, CURRENT).

Therefore, the INA238 constants are still applicable with regard
to the bit of the same significance.

Signed-off-by: Jonas Rebmann <jre@pengutronix.de>
Link: https://lore.kernel.org/r/20250718-ina228-v2-3-227feb62f709@pengutronix.de
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
drivers/hwmon/ina238.c