[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <483b71f6-3812-81ad-a495-beda3f0bf034@linaro.org>
Date: Thu, 17 Aug 2023 17:22:14 +0200
From: Daniel Lezcano <daniel.lezcano@...aro.org>
To: Ulf Hansson <ulf.hansson@...aro.org>, Frank Li <frank.li@....com>
Cc: "Rafael J. Wysocki" <rafael@...nel.org>,
Amit Kucheria <amitk@...nel.org>,
Zhang Rui <rui.zhang@...el.com>,
Shawn Guo <shawnguo@...nel.org>,
Sascha Hauer <s.hauer@...gutronix.de>,
Pengutronix Kernel Team <kernel@...gutronix.de>,
Fabio Estevam <festevam@...il.com>,
NXP Linux Team <linux-imx@....com>,
"open list:THERMAL" <linux-pm@...r.kernel.org>,
"moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE"
<linux-arm-kernel@...ts.infradead.org>,
open list <linux-kernel@...r.kernel.org>, imx@...ts.linux.dev
Subject: Re: [PATCH 1/1] thermal/drivers/imx_sc_thermal: return -EAGAIN when
SCFW turn off resource
Hi Ulf,
thanks for your answer
On 16/08/2023 23:23, Ulf Hansson wrote:
> On Wed, 16 Aug 2023 at 22:46, Daniel Lezcano <daniel.lezcano@...aro.org> wrote:
[ ... ]
>>>>>>> If add power domain notification in thermal driver, I am not how to get
>>>>>>> other devices's pd in thermal driver.
>>>>>>>
>>>>>>> Any example I can refer?
>>>>>>>
>>>>>>> Or this is simple enough solution.
>>>>>>
>>>>>> The solution works for removing the error message but it does not solve the
>>>>>> root cause of the issue. The thermal zone keeps monitoring while the sensor
>>>>>> is down.
>>>>>>
>>>>>> So the question is why the sensor is shut down if it is in use?
>>>>>
>>>>> Do you know if there are any code I reference? I supposed it is quite common.
>>>>
>>>> Sorry, I don't get your comment
>>>>
>>>> What I meant is why is the sensor turned off if it is in use ?
>>>
>>> One typical example is cpu hotplug. The sensor is located CPU power domain.
>>> If CPU hotplug off, CPU power domain will be turn off.
>>>
>>> It doesn't make sensor keep monitor such sensor when CPU already power off.
>>> It doesn't make sensor to keep CPU power on just because want to get sensor
>>> data.
>>>
>>> Anthor example is GPU, if there are GPU0 and GPU1. Most case just GPU0
>>> work. GPU1 may turn off when less loading.
>>>
>>> Ideally, thermal can get notification from power domain driver.
>>> when such power domain turn off, disable thermal zone.
>>>
>>> So far, I have not idea how to do that.
>>
>> Ulf,
>>
>> do you have a guidance to link the thermal zone and the power domain in
>> order to get a poweron/off notification leading to enable/disable the
>> thermal zone ?
>
> I don't know the details here, so apologize for my ignorance to start
> with. What platform is this?
I will let Frank answer this
> A vague idea could be to hook up the thermal sensor to the
> corresponding CPU power domain. Assuming the CPU power domain is
> modelled as a genpd provider, then this allows the driver for the
> thermal sensor to register for power-on/off notifications of the genpd
> (see dev_pm_genpd_add_notifier()).
>
> Can this work?
Yes indeed it sounds like what should be achieved. Assuming it is not
modeled with genpd how would you describe those in order to have the
sensor belonging to one specific power domain?
--
<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
Powered by blists - more mailing lists