iio: adc: axp20x_adc: add support for AXP813 ADC
authorQuentin Schulz <quentin.schulz@free-electrons.com>
Mon, 15 Jan 2018 10:33:41 +0000 (11:33 +0100)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Tue, 30 Jan 2018 18:33:25 +0000 (18:33 +0000)
commit1a3f6755649dd419d9e01cbc38e116e2c70acb73
tree2f6b9541ca552bdb9513463c78d213c79566166f
parent359163d786e2b05f3e3bd2db7f1629d7150d6dd2
iio: adc: axp20x_adc: add support for AXP813 ADC

The X-Powers AXP813 PMIC is really close to what is already done for
AXP20X/AXP22X.

There are two pairs of bits to set the rate (one for Voltage and Current
measurements and one for TS/GPIO0 voltage measurements) instead of one.

The register to set the ADC rates is different from the one for
AXP20X/AXP22X.

GPIO0 can be used as an ADC (measuring Volts) unlike for AXP22X.

The scales to apply to the different inputs are unlike the ones from
AXP20X and AXP22X.

Signed-off-by: Quentin Schulz <quentin.schulz@free-electrons.com>
Acked-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/adc/axp20x_adc.c
include/linux/mfd/axp20x.h