Skip to content

Commit a051d50

Browse files
committed
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 <[email protected]> Signed-off-by: Guenter Roeck <[email protected]>
1 parent 8d06105 commit a051d50

File tree

2 files changed

+384
-444
lines changed

2 files changed

+384
-444
lines changed

drivers/hwmon/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2127,6 +2127,7 @@ config SENSORS_ADS7871
21272127
config SENSORS_AMC6821
21282128
tristate "Texas Instruments AMC6821"
21292129
depends on I2C
2130+
select REGMAP_I2C
21302131
help
21312132
If you say yes here you get support for the Texas Instruments
21322133
AMC6821 hardware monitoring chips.

0 commit comments

Comments
 (0)