OSDN Git Service

iio: twl6030-gpadc: TWL6030, TWL6032 GPADC driver
authorOleksandr Kozaruk <oleksandr.kozaruk@ti.com>
Thu, 25 Jul 2013 13:26:00 +0000 (14:26 +0100)
committerJonathan Cameron <jic23@kernel.org>
Sat, 17 Aug 2013 14:50:57 +0000 (15:50 +0100)
commit1696f36482e7063051a1dad86a54be83fd847f4f
treea5ddf64d53e83ced8e050d4f650beb92905264d4
parent1eb70a97452cacbe7aae752879b782e1e97a3484
iio: twl6030-gpadc: TWL6030, TWL6032 GPADC driver

The GPADC is general purpose ADC found on TWL6030, and TWL6032 PMIC,
known also as Phoenix and PhoenixLite.

The TWL6030 and TWL6032 have GPADC with 17 and 19 channels
respectively. Some channels have current source and are used for
measuring voltage drop on resistive load for detecting battery ID
resistance, or measuring voltage drop on NTC resistors for external
temperature measurements. Some channels measure voltage, (i.e. battery
voltage), and have voltage dividers, thus, capable to scale voltage.
Some channels are dedicated for measuring die temperature.

Some channels are calibrated in 2 points, having offsets from ideal
values kept in trim registers. This is used to correct measurements.

The differences between GPADC in TWL6030 and TWL6032:
- 10 bit vs 12 bit ADC;
- 17 vs 19 channels;
- channels have different purpose(i.e. battery voltage
  channel 8 vs channel 18);
- trim values are interpreted differently.

Based on the driver patched from Balaji TK, Graeme Gregory, Ambresh K,
Girish S Ghongdemath.

Signed-off-by: Balaji T K <balajitk@ti.com>
Signed-off-by: Graeme Gregory <gg@slimlogic.co.uk>
Signed-off-by: Oleksandr Kozaruk <oleksandr.kozaruk@ti.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
drivers/iio/adc/Kconfig
drivers/iio/adc/Makefile
drivers/iio/adc/twl6030-gpadc.c [new file with mode: 0644]