ads2828: Convert to use regmap
Guenter Roeck
maintainerPATCH v2 1/2 ads2828: Convert to use regmap
Simplify code and reduce code size by using regmap to access i2c registers.
Cc Robert Rosengren <[email protected]>
Signed-off-by Guenter Roeck <[email protected]>
---
v2: Drop byte swapping code; it is handled by regmap internally
Note that the SMBUs word access code in regmap has a bug, resulting in byte swapped accesses if the i2c controller only supports SMBus accesses. I will submit patch to fix the code in the regmap subsystem separately.
drivers/hwmon/Kconfig | 1 + drivers/hwmon/ads7828.c | 70 ++++++++++++++++++------------------------------- 2 files changed, 27 insertions(+), 44 deletions(-)
drivers/hwmon/Kconfig +1 -0
@@ -1389,6 +1389,7 @@ config SENSORS_ADS1015 config SENSORS_ADS7828 tristate "Texas Instruments ADS7828 and compatibles" depends on I2C + select REGMAP_I2C help If you say yes here you get support for Texas Instruments ADS7828 and ADS7830 8-channel A/D converters. ADS7828 resolution is 12-bit, while
drivers/hwmon/ads7828.c +26 -44
124 lines not on this page · raw message
Signature · 7 lines
2.1.0 _______________________________________________ lm-sensors mailing list [email protected] http://lists.lm-sensors.org/mailman/listinfo/lm-sensors