aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hwmon/Kconfig
diff options
context:
space:
mode:
authorLars-Peter Clausen <lars@metafoo.de>2013-03-12 06:38:46 -0400
committerGuenter Roeck <linux@roeck-us.net>2013-04-08 00:16:38 -0400
commit51c2a4871c1b47255ff8d74f0a86b2a0defff319 (patch)
tree151e26fe0ff76d26dc69eb55d3f15562d598ea72 /drivers/hwmon/Kconfig
parentc55dc91e92bdf21427dd8f5ad779ed9d63caacbd (diff)
hwmon: (adt7410) Add support for the adt7310/adt7320
The adt7310/adt7320 is the SPI version of the adt7410/adt7420. The register map layout is a bit different, i.e. the register addresses differ between the two variants, but the bit layouts of the individual registers are identical. So both chip variants can easily be supported by the same driver. The issue of non matching register address layouts is solved by a simple look-up table which translates the I2C addresses to the SPI addresses. The patch moves the bulk of the adt7410 driver to a common module that will be shared by the adt7410 and adt7310 drivers. This common module implements the driver logic and uses a set of virtual functions to perform IO access. The adt7410 and adt7310 driver modules provide proper implementations of these IO accessor functions for I2C respective SPI. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Reviewed-by: Hartmut Knaack <knaack.h@gmx.de> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Diffstat (limited to 'drivers/hwmon/Kconfig')
-rw-r--r--drivers/hwmon/Kconfig20
1 files changed, 20 insertions, 0 deletions
diff --git a/drivers/hwmon/Kconfig b/drivers/hwmon/Kconfig
index 89ac1cb26f24..aaa14f4a0f7d 100644
--- a/drivers/hwmon/Kconfig
+++ b/drivers/hwmon/Kconfig
@@ -179,9 +179,29 @@ config SENSORS_ADM9240
179 This driver can also be built as a module. If so, the module 179 This driver can also be built as a module. If so, the module
180 will be called adm9240. 180 will be called adm9240.
181 181
182config SENSORS_ADT7X10
183 tristate
184 help
185 This module contains common code shared by the ADT7310/ADT7320 and
186 ADT7410/ADT7420 temperature monitoring chip drivers.
187
188 If build as a module, the module will be called adt7x10.
189
190config SENSORS_ADT7310
191 tristate "Analog Devices ADT7310/ADT7320"
192 depends on SPI_MASTER
193 select SENSORS_ADT7X10
194 help
195 If you say yes here you get support for the Analog Devices
196 ADT7310 and ADT7320 temperature monitoring chips.
197
198 This driver can also be built as a module. If so, the module
199 will be called adt7310.
200
182config SENSORS_ADT7410 201config SENSORS_ADT7410
183 tristate "Analog Devices ADT7410/ADT7420" 202 tristate "Analog Devices ADT7410/ADT7420"
184 depends on I2C 203 depends on I2C
204 select SENSORS_ADT7X10
185 help 205 help
186 If you say yes here you get support for the Analog Devices 206 If you say yes here you get support for the Analog Devices
187 ADT7410 and ADT7420 temperature monitoring chips. 207 ADT7410 and ADT7420 temperature monitoring chips.