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 <rphani@codeaurora.org>
This commit is contained in:
Rama Krishna Phani A 2015-07-03 17:14:31 +05:30
parent a867f07790
commit eae320ffe2

View file

@ -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;