]> git.karo-electronics.de Git - karo-tx-linux.git/commit
hwmon: (adt7410) Add support for the adt7310/adt7320
authorLars-Peter Clausen <lars@metafoo.de>
Tue, 12 Mar 2013 10:38:46 +0000 (11:38 +0100)
committerGuenter Roeck <linux@roeck-us.net>
Sun, 17 Mar 2013 23:27:59 +0000 (16:27 -0700)
commit87f3b3ba8c1cf72642dc69a64fca2f18d8a733eb
tree0c8659cb27fcba9f929289d3bddd8a932c67aed4
parent1ea55deb5c02a2f5c2fab552cb1762a2ff7f5fa6
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>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Documentation/hwmon/adt7410
drivers/hwmon/Kconfig
drivers/hwmon/Makefile
drivers/hwmon/adt7310.c [new file with mode: 0644]
drivers/hwmon/adt7410.c
drivers/hwmon/adt7x10.c [new file with mode: 0644]
drivers/hwmon/adt7x10.h [new file with mode: 0644]