iio: adc: mp2629: Add support for mp2629 ADC driver

Add support for 8-bit resolution ADC readings for input power
supply and battery charging measurement. Provides voltage, current
readings to mp2629 power supply driver.

Signed-off-by: Saravanan Sekar <sravanhome@gmail.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
This commit is contained in:
Saravanan Sekar 2020-05-26 11:06:43 +02:00 committed by Lee Jones
parent 0608164645
commit 7abd9fb646
4 changed files with 228 additions and 0 deletions

View file

@ -14,4 +14,13 @@ struct mp2629_data {
struct regmap *regmap;
};
enum mp2629_adc_chan {
MP2629_BATT_VOLT,
MP2629_SYSTEM_VOLT,
MP2629_INPUT_VOLT,
MP2629_BATT_CURRENT,
MP2629_INPUT_CURRENT,
MP2629_ADC_CHAN_END
};
#endif