iio: adc: qcom-vadc-common: add reverse scaling for PMIC5 Gen2 ADC_TM
authorJishnu Prakash <quic_jprakash@quicinc.com>
Sun, 3 Apr 2022 13:17:47 +0000 (18:47 +0530)
committerDaniel Lezcano <daniel.lezcano@linaro.org>
Thu, 19 May 2022 10:11:51 +0000 (12:11 +0200)
commit238e34ad7d5ce36939ac1442c98c7cbb7771f4de
tree6fbf13e2098d6e5b4d053cbd4f01b8c2a0fc8749
parente46e003a4897385886f932013673ecfd317c8156
iio: adc: qcom-vadc-common: add reverse scaling for PMIC5 Gen2 ADC_TM

Add reverse scaling function for PMIC5 Gen2 ADC_TM, to convert
temperature to raw ADC code, for setting thresholds for
thermistor channels.

Signed-off-by: Jishnu Prakash <quic_jprakash@quicinc.com>
Acked-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Link: https://lore.kernel.org/r/1648991869-20899-3-git-send-email-quic_jprakash@quicinc.com
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
drivers/iio/adc/qcom-vadc-common.c
include/linux/iio/adc/qcom-vadc-common.h