Commit 854a8e20 authored by Théo Lebrun's avatar Théo Lebrun Committed by Daniel Lezcano
Browse files

thermal/drivers/k3_j72xx_bandgap: Implement suspend/resume support



This add suspend-to-ram support.

The derived_table is kept-as is, so the resume is only about
pm_runtime_* calls and restoring the same registers as the probe.

Extract the hardware initialization procedure to a function called at
both probe-time & resume-time.

The probe-time loop is split in two to ensure doing the hardware
initialization before registering thermal zones. That ensures our
callbacks cannot be called while in bad state.

The 100ms delay in the hardware initialization sequence was removed.
It was initially added to be sure the thresholds are programmed before
enabling the interrupt, but in fact it's not needed (tested on J7200
platform).

Signed-off-by: default avatarThéo Lebrun <theo.lebrun@bootlin.com>
Acked-by: default avatarKeerthy <j-keerthy@ti.com>
Signed-off-by: default avatarThomas Richard <thomas.richard@bootlin.com>
Link: https://lore.kernel.org/r/20240425153238.498750-1-thomas.richard@bootlin.com


Signed-off-by: default avatarDaniel Lezcano <daniel.lezcano@linaro.org>
parent f996e2b1
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment