]> www.infradead.org Git - users/jedix/linux-maple.git/commit
hwmon: (amc6821) Convert to use regmap
authorGuenter Roeck <linux@roeck-us.net>
Thu, 27 Jun 2024 17:48:27 +0000 (10:48 -0700)
committerGuenter Roeck <linux@roeck-us.net>
Mon, 8 Jul 2024 14:52:36 +0000 (07:52 -0700)
commita051d507ba1718e0e833f3d8d80defc85ca20c2d
tree479bae57c3bc2f86793cca4cf28d66b30ea7430b
parent8d061050fd826b0cc425765b1ac22b4c088dedbb
hwmon: (amc6821) Convert to use regmap

Use regmap for register accesses and caching.

While at it, use sysfs_emit() instead of sprintf() to write sysfs
attribute data, and remove spurious debug messages which would only
be seen as result of a bug in the code. Also make sure that error
codes are propagated and not replaced with -EIO.

While at it, introduce rounding of written temperature values and for
internal calculations to reduce deviation from written values and as
much as possible.

No functional change intended except for differences introduced by
rounding.

Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
drivers/hwmon/Kconfig
drivers/hwmon/amc6821.c