thermal/drivers/rcar_gen3: Move Tj_T storage to shared private data
authorNiklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Wed, 27 Mar 2024 13:30:12 +0000 (14:30 +0100)
committerDaniel Lezcano <daniel.lezcano@linaro.org>
Tue, 23 Apr 2024 10:40:29 +0000 (12:40 +0200)
commit566e0ea7d02ff596d7bcd81ca547e91b5074032f
treec13efa240a72594f4af0059b839dec6e55c1fb9c
parent7fcd7dfa5ec29afe0b3fe8ad6a5f42c19e71d6be
thermal/drivers/rcar_gen3: Move Tj_T storage to shared private data

The calculated Tj_T constant is calculated from the PTAT data either
read from the first TSC zone on the device if calibration data is fused,
or from fallback values in the driver itself. The value calculated is
shared among all TSC zones.

Move the Tj_T constant to the shared private data structure instead of
duplicating it in each TSC private data. This requires adding a pointer
to the shared data to the TSC private data structure. This back pointer
make it easier to further rework the temperature conversion logic.

Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Link: https://lore.kernel.org/r/20240327133013.3982199-2-niklas.soderlund+renesas@ragnatech.se
drivers/thermal/rcar_gen3_thermal.c