]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit399fd199f129618c47551686aed01ae54a33fee3
tree0e6c5ec023cfc9f578c28fcc9c27bfa6c5cb55cc
parent509d616995c6939003a6f4afabde0783dcb4c6c6
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