thermal: rcar_gen3_thermal: Read calibration from hardware
authorNiklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Thu, 14 Oct 2021 10:38:16 +0000 (12:38 +0200)
committerDaniel Lezcano <daniel.lezcano@linaro.org>
Fri, 15 Oct 2021 07:15:52 +0000 (09:15 +0200)
commitc3131bd5586d3e8b67dc69516e1734a7a03e19d7
tree0e6c5ec023cfc9f578c28fcc9c27bfa6c5cb55cc
parentb8aaf1415a1bc3a61f870366b3f989b3bc3e2824
thermal: rcar_gen3_thermal: Read calibration from hardware

In production hardware the calibration values used to convert register
values to temperatures can be read from hardware. While pre-production
hardware still depends on pseudo values hard-coded in the driver.

Add support for reading out calibration values from hardware if it's
fused. The presence of fused calibration is indicated in the THSCP
register.

Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Tested-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/r/20211014103816.1939782-3-niklas.soderlund+renesas@ragnatech.se
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
drivers/thermal/rcar_gen3_thermal.c