thermal: rcar_thermal: update calculation formula for R-Car Gen3 SoCs
authorYoshihiro Kaneko <ykaneko0929@gmail.com>
Wed, 8 May 2019 11:08:45 +0000 (13:08 +0200)
committerEduardo Valentin <edubezval@gmail.com>
Tue, 14 May 2019 14:00:42 +0000 (07:00 -0700)
commit20386f0d84a22214d1f037dedfffb6709dd0117a
tree516f1cfa2790a0ff98c70afa8ee08c6dc0f8af25
parentbf45ac18b78038e43af3c1a273cae4ab5704d2ce
thermal: rcar_thermal: update calculation formula for R-Car Gen3 SoCs

Update calculation for the R-Car Gen3 and RZ/G2 SoCs which have a
thermal IP block controlled by this driver. That is the:

* R-Car D3 (r8a77995)
* R-Car E2 (r8a77990)
* R-Car V3M (r8a77970)
* RZ/G2E (r8a774c0)

The calculation update is as documented in the R-Car Gen3 User's Manual,
v1.50 Nov 2018:

- When CTEMP is less than 24
   T = CTEMP[5:0] * 5.5 - 72
- When CTEMP is equal to/greater than 24
   T = CTEMP[5:0] * 5 - 60

This was inspired by a patch in the BSP by Van Do <van.do.xw@renesas.com>

Signed-off-by: Yoshihiro Kaneko <ykaneko0929@gmail.com>
Tested-by: Simon Horman <horms+renesas@verge.net.au>
Acked-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
drivers/thermal/rcar_thermal.c