MLK-18686-2 sc_thermal: Fix interpreting tenths as millicelsius
When calculate the temperature in millicelsius, the tenths are handled incorrectly. Signed-off-by: Ye Li <ye.li@nxp.com> Acked-by: Peng Fan <peng.fan@nxp.com> (cherry picked from commit 72796a2e138bb7b5b4db9f771a3f9b823b66ade5)
This commit is contained in:
parent
c1e72c232d
commit
1288dc25fb
|
|
@ -49,7 +49,7 @@ static int read_temperature(struct udevice *dev, int *temp)
|
||||||
return -EIO;
|
return -EIO;
|
||||||
}
|
}
|
||||||
|
|
||||||
*temp = celsius * 1000 + tenths;
|
*temp = celsius * 1000 + tenths * 100;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue