thermal: rcar_gen3_thermal: Update calculation formula of IRQTEMP
authorYoshihiro Kaneko <ykaneko0929@gmail.com>
Mon, 13 May 2019 20:03:54 +0000 (05:03 +0900)
committerEduardo Valentin <edubezval@gmail.com>
Fri, 24 May 2019 04:57:10 +0000 (21:57 -0700)
commitbdc4480a669d476814061b4da6bb006f7048c8e5
treec22cd35dc39ab94f1523ad003d09499dff8835ce
parent4eb39f79ef443fa566d36bd43f1f578d5c140305
thermal: rcar_gen3_thermal: Update calculation formula of IRQTEMP

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

If (STEMP < Tj_T) CTEMP value should be val1.
If (STEMP > Tj_T) 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