Hi, Jonathan, On 04.02.2025 16:33, Jonathan Cameron wrote: > On Wed, 15 Jan 2025 16:42:37 +0100 > Ulf Hansson <ulf.hansson@xxxxxxxxxx> wrote: > >> On Thu, 9 Jan 2025 at 18:34, Daniel Lezcano <daniel.lezcano@xxxxxxxxxx> wrote: >>> >>> >>> Ulf, >>> >>> can you have a look at this particular patch please ? >>> >>> Perhaps this scenario already happened in the past and there is an >>> alternative to fix it instead of this proposed change >> >> I think the patch makes sense. >> >> If there is a PM domain that is attached to the device that is >> managing the clocks for the thermal zone, the detach procedure >> certainly needs to be well controlled/synchronized. >> > Does this boil down to the same issue as > https://lore.kernel.org/linux-iio/20250128105908.0000353b@xxxxxxxxxx/ > ? Yes, as described in the cover letter. > > Just to point out there is another way like is done in i2c: > https://elixir.bootlin.com/linux/v6.12.6/source/drivers/i2c/i2c-core-base.c#L630 > > Register a devres_release_group() in bus probe() and release it before > the dev_pm_domain_detach() call. That keeps the detach procedure well > controlled and synchronized as it is entirely in control of the driver.