diff options
author | Quentin Schulz <quentin.schulz@free-electrons.com> | 2018-01-15 11:33:41 +0100 |
---|---|---|
committer | Jonathan Cameron <Jonathan.Cameron@huawei.com> | 2018-01-30 18:33:25 +0000 |
commit | 1a3f6755649dd419d9e01cbc38e116e2c70acb73 (patch) | |
tree | 2f6b9541ca552bdb9513463c78d213c79566166f /include/linux/mfd/axp20x.h | |
parent | 359163d786e2b05f3e3bd2db7f1629d7150d6dd2 (diff) | |
download | talos-obmc-linux-1a3f6755649dd419d9e01cbc38e116e2c70acb73.tar.gz talos-obmc-linux-1a3f6755649dd419d9e01cbc38e116e2c70acb73.zip |
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>
Diffstat (limited to 'include/linux/mfd/axp20x.h')
-rw-r--r-- | include/linux/mfd/axp20x.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/mfd/axp20x.h b/include/linux/mfd/axp20x.h index 78dc85365c4f..ff95414c8316 100644 --- a/include/linux/mfd/axp20x.h +++ b/include/linux/mfd/axp20x.h @@ -266,6 +266,8 @@ enum axp20x_variants { #define AXP288_RT_BATT_V_H 0xa0 #define AXP288_RT_BATT_V_L 0xa1 +#define AXP813_ADC_RATE 0x85 + /* Fuel Gauge */ #define AXP288_FG_RDC1_REG 0xba #define AXP288_FG_RDC0_REG 0xbb |