mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
iio: adc: twl4030_madc: Fix calculation of the temperature sense current
The bit mask to read the setting of the constant current source for measuring the NTC voltage was the wrong one. Since default value is initialized to the lowest level (000 = 10uA) the difference was probably never noticed in practice. Signed-off-by: H. Nikolaus Schaller <[email protected]> Signed-off-by: Marek Belisko <[email protected]> Signed-off-by: Jonathan Cameron <[email protected]>
This commit is contained in:
parent
ae6d9ce056
commit
0cbb39f143
1 changed files with 1 additions and 1 deletions
|
|
@ -235,7 +235,7 @@ static int twl4030battery_temperature(int raw_volt)
|
|||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
curr = ((val & TWL4030_BCI_ITHEN) + 1) * 10;
|
||||
curr = ((val & TWL4030_BCI_ITHSENS) + 1) * 10;
|
||||
/* Getting and calculating the thermistor resistance in ohms */
|
||||
res = volt * 1000 / curr;
|
||||
/* calculating temperature */
|
||||
|
|
|
|||
Loading…
Reference in a new issue