]> www.infradead.org Git - users/jedix/linux-maple.git/commit
hwmon: (lm75) Hide register size differences in regmap access functions
authorGuenter Roeck <linux@roeck-us.net>
Tue, 17 Dec 2024 17:29:10 +0000 (09:29 -0800)
committerGuenter Roeck <linux@roeck-us.net>
Fri, 20 Dec 2024 14:55:49 +0000 (06:55 -0800)
commit6da24a25f766e02fbfc07570b5560154818ba59d
tree24463d3a73e37ce7f2ef325a9644dfb742f88afb
parentde076198d1e4934c5fc17aa52d5f1884f469ce1a
hwmon: (lm75) Hide register size differences in regmap access functions

Hide register size differences in regmap access functions to simplify
runtime code and to simplify adding support for I3C devices. Also
use regmap API functions for bit operations where possible.

For this to work, the 16-bit and 8-bit configuration register has to be
mapped to a 16-bit value. Unlike other registers, this register is a
low-byte-first register, presumably for compatibility with chips with
8-bit wide configuration registers. Hide the differences in the regmap
access code.

While at it, enable alarm attribute support for TMP112.

Cc: Wolfram Sang <wsa+renesas@sang-engineering.com>
Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Tested-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
drivers/hwmon/lm75.c