Re: [PATCH v4] thermal: k3_j72xx_bandgap: implement suspend/resume support

From: Daniel Lezcano
Date: Mon Jun 03 2024 - 05:47:54 EST


On 25/04/2024 17:32, Thomas Richard wrote:
From: Théo Lebrun <theo.lebrun@xxxxxxxxxxx>

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: Théo Lebrun <theo.lebrun@xxxxxxxxxxx>
Acked-by: Keerthy <j-keerthy@xxxxxx>
Signed-off-by: Thomas Richard <thomas.richard@xxxxxxxxxxx>
---

Applied, sorry for the delay

--
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog