Skip to contentSkip to conversation

ads2828: Convert to use regmap

PATCH Superseded Guenter Roeck 1 participant 1 message Jan 16, 2015 Hardware monitoring

lore
Share & tools
lore

Guenter Roeck

author maintainer
#0 lore raw

PATCH 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]>

---
v2: reg_bits reflects the i2c command byte size and must be 8
even for 16-bit registers.

Compile tested only.

 drivers/hwmon/Kconfig   |  1 +
 drivers/hwmon/ads7828.c | 78 +++++++++++++++++++++----------------------------
 2 files changed, 34 insertions(+), 45 deletions(-)
drivers/hwmon/Kconfig +1 -0
index cfe36c6..f26d725 100644
@@ -1379,6 +1379,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 +33 -45

131 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