summaryrefslogtreecommitdiff
path: root/drivers/iio/adc/ad7887.c
diff options
context:
space:
mode:
authorEvgeny Boger <boger@wirenboard.com>2021-11-18 17:12:32 +0300
committerJonathan Cameron <Jonathan.Cameron@huawei.com>2021-12-04 15:34:18 +0000
commit4da5f2d6f2e3286262d32db901ec735a6a5a51b9 (patch)
tree73e2478422dfb58994c7214ddfbfe44d856a95f6 /drivers/iio/adc/ad7887.c
parenta91f82d944e369c13e62f94f19994e8c915cb028 (diff)
iio:adc:axp20x: add support for NTC thermistor
Most AXPxxx-based reference designs place a 10k NTC thermistor on a TS pin. When appropriately configured, AXP PMICs will inject fixed current (80uA by default) into TS pin and measure the voltage across a thermistor. The PMIC itself will by default compare this voltage with predefined thresholds and disable battery charging whenever the battery is too hot or too cold. Alternatively, the TS pin can be configured as general-purpose ADC input. This mode is not supported by the driver. This patch allows reading the voltage on the TS pin. It can be then either processed by userspace or used by kernel consumer like hwmon ntc thermistor driver. Signed-off-by: Evgeny Boger <boger@wirenboard.com> Acked-by: Maxime Ripard <maxime@cerno.tech> Reviewed-by: Quentin Schulz <foss+kernel@0leil.net> Link: https://lore.kernel.org/r/20211118141233.247907-2-boger@wirenboard.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'drivers/iio/adc/ad7887.c')
0 files changed, 0 insertions, 0 deletions