Skip to content

Commit

Permalink
staging:iio: Consolidate adt7310 and adt7410 driver
Browse files Browse the repository at this point in the history
The adt7310 is the SPI version of the adt7410, so there is no need to have a
separate driver for it. The register map layout is a bit different, i.e. the
addresses of the register differ, but the individual register layouts are
identical. We solve this by adding a small look-up table, which translates
adt7410 register addresses to ad7310 register addresses.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
  • Loading branch information
Lars-Peter Clausen authored and Jonathan Cameron committed Oct 31, 2012
1 parent e446f5a commit 2b0c856
Show file tree
Hide file tree
Showing 4 changed files with 364 additions and 989 deletions.
13 changes: 3 additions & 10 deletions drivers/staging/iio/adc/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -126,18 +126,11 @@ config AD7192
To compile this driver as a module, choose M here: the
module will be called ad7192.

config ADT7310
tristate "Analog Devices ADT7310 temperature sensor driver"
depends on SPI
help
Say yes here to build support for Analog Devices ADT7310
temperature sensors.

config ADT7410
tristate "Analog Devices ADT7410 temperature sensor driver"
depends on I2C
tristate "Analog Devices ADT7310/ADT7410 temperature sensor driver"
depends on I2C || SPI_MASTER
help
Say yes here to build support for Analog Devices ADT7410
Say yes here to build support for Analog Devices ADT7310/ADT7410
temperature sensors.

config AD7280
Expand Down
1 change: 0 additions & 1 deletion drivers/staging/iio/adc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ obj-$(CONFIG_AD7780) += ad7780.o
obj-$(CONFIG_AD7793) += ad7793.o
obj-$(CONFIG_AD7816) += ad7816.o
obj-$(CONFIG_AD7192) += ad7192.o
obj-$(CONFIG_ADT7310) += adt7310.o
obj-$(CONFIG_ADT7410) += adt7410.o
obj-$(CONFIG_AD7280) += ad7280a.o
obj-$(CONFIG_LPC32XX_ADC) += lpc32xx_adc.o
Expand Down
Loading

0 comments on commit 2b0c856

Please sign in to comment.