diff options
author | Jishnu Prakash <quic_jprakash@quicinc.com> | 2022-04-03 16:17:47 +0300 |
---|---|---|
committer | Daniel Lezcano <daniel.lezcano@linaro.org> | 2022-05-19 13:11:51 +0300 |
commit | 238e34ad7d5ce36939ac1442c98c7cbb7771f4de (patch) | |
tree | 6fbf13e2098d6e5b4d053cbd4f01b8c2a0fc8749 /include/linux/iio | |
parent | e46e003a4897385886f932013673ecfd317c8156 (diff) | |
download | linux-238e34ad7d5ce36939ac1442c98c7cbb7771f4de.tar.xz |
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>
Diffstat (limited to 'include/linux/iio')
-rw-r--r-- | include/linux/iio/adc/qcom-vadc-common.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/iio/adc/qcom-vadc-common.h b/include/linux/iio/adc/qcom-vadc-common.h index ce78d4804994..aa21b032e861 100644 --- a/include/linux/iio/adc/qcom-vadc-common.h +++ b/include/linux/iio/adc/qcom-vadc-common.h @@ -152,6 +152,8 @@ int qcom_adc5_hw_scale(enum vadc_scale_fn_type scaletype, u16 qcom_adc_tm5_temp_volt_scale(unsigned int prescale_ratio, u32 full_scale_code_volt, int temp); +u16 qcom_adc_tm5_gen2_temp_res_scale(int temp); + int qcom_adc5_prescaling_from_dt(u32 num, u32 den); int qcom_adc5_hw_settle_time_from_dt(u32 value, const unsigned int *hw_settle); |