]> git.baikalelectronics.ru Git - kernel.git/commit
thermal: rcar_gen3_thermal: Update temperature conversion method
authorYoshihiro Kaneko <ykaneko0929@gmail.com>
Mon, 13 May 2019 20:03:55 +0000 (05:03 +0900)
committerEduardo Valentin <edubezval@gmail.com>
Fri, 24 May 2019 04:58:25 +0000 (21:58 -0700)
commit9bcfcb3632397d367b50650bc38e64851982a2c3
tree4fd3e0323934328b27896015b0c1c63b03724c2d
parentba051d0fde5495807b3347ec42071452190c9602
thermal: rcar_gen3_thermal: Update temperature conversion method

Update the formula to calculate temperature:
Currently, current TEMP is calculated as
average of val1 (is calculated by formula 1)
and val2 (is calculated by formula 2). But,
as description in HWM (chapter 10A.3.1.2 Normal Mode.)

If (TEMP_CODE < THCODE2[11:0]) CTEMP value should be val1.
If (TEMP_CODE > THCODE2[11:0]) CTEMP value should be val2.

Signed-off-by: Yoshihiro Kaneko <ykaneko0929@gmail.com>
Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
drivers/thermal/rcar_gen3_thermal.c