From eae320ffe23094deced4f9a04dc16e93a92a247b Mon Sep 17 00:00:00 2001 From: Rama Krishna Phani A Date: Fri, 3 Jul 2015 17:14:31 +0530 Subject: [PATCH] hwmon: qpnp-adc-voltage: Add version check for case_therm channel case_therm channel is used for reading the skin temperature. Calibration type for above thermistor channel has to be absolute for PM8950 1.0 and ratiometric for PM8950 2.0. Add version check to detect the PMIC used and update the calibration type accordingly. Change-Id: Ic8bd1b5fe829ce4401f15add98ccf98bdb2a68a1 Signed-off-by: Rama Krishna Phani A --- drivers/hwmon/qpnp-adc-voltage.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/hwmon/qpnp-adc-voltage.c b/drivers/hwmon/qpnp-adc-voltage.c index fe594f1e3035..e7a75895280d 100644 --- a/drivers/hwmon/qpnp-adc-voltage.c +++ b/drivers/hwmon/qpnp-adc-voltage.c @@ -677,7 +677,8 @@ static int32_t if ((channel == LR_MUX7_HW_ID) || (channel == P_MUX2_1_1) || (channel == LR_MUX3_XO_THERM) || - (channel == LR_MUX3_BUF_XO_THERM_BUF)) { + (channel == LR_MUX3_BUF_XO_THERM_BUF) || + (channel == P_MUX4_1_1)) { vadc->adc->amux_prop->chan_prop->calib_type = CALIB_ABSOLUTE; return rc;