From: Daniel Lezcano <daniel.lezcano@linaro.org>
To: Ulf Hansson <ulf.hansson@linaro.org>, Frank Li <frank.li@nxp.com>
Cc: "Rafael J. Wysocki" <rafael@kernel.org>,
Amit Kucheria <amitk@kernel.org>, Zhang Rui <rui.zhang@intel.com>,
Shawn Guo <shawnguo@kernel.org>,
Sascha Hauer <s.hauer@pengutronix.de>,
Pengutronix Kernel Team <kernel@pengutronix.de>,
Fabio Estevam <festevam@gmail.com>,
NXP Linux Team <linux-imx@nxp.com>,
"open list:THERMAL" <linux-pm@vger.kernel.org>,
"moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE"
<linux-arm-kernel@lists.infradead.org>,
open list <linux-kernel@vger.kernel.org>,
imx@lists.linux.dev
Subject: Re: [PATCH 1/1] thermal/drivers/imx_sc_thermal: return -EAGAIN when SCFW turn off resource
Date: Thu, 17 Aug 2023 17:22:14 +0200 [thread overview]
Message-ID: <483b71f6-3812-81ad-a495-beda3f0bf034@linaro.org> (raw)
In-Reply-To: <CAPDyKFp8-XwwHEt9dKeTMj0ZmoS6nzXrUYAFmpzZm16-Uf6=xw@mail.gmail.com>
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@linaro.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
next prev parent reply other threads:[~2023-08-17 15:23 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-12 21:05 Frank Li
2023-07-13 12:49 ` Daniel Lezcano
2023-07-14 17:19 ` Frank Li
2023-08-16 8:44 ` Daniel Lezcano
2023-08-16 16:28 ` Frank Li
2023-08-16 16:47 ` Daniel Lezcano
2023-08-16 17:07 ` Frank Li
2023-08-16 20:45 ` Daniel Lezcano
2023-08-16 21:23 ` Ulf Hansson
2023-08-17 15:22 ` Daniel Lezcano [this message]
2023-08-17 15:30 ` Frank Li
2023-08-17 21:40 ` Ulf Hansson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=483b71f6-3812-81ad-a495-beda3f0bf034@linaro.org \
--to=daniel.lezcano@linaro.org \
--cc=amitk@kernel.org \
--cc=festevam@gmail.com \
--cc=frank.li@nxp.com \
--cc=imx@lists.linux.dev \
--cc=kernel@pengutronix.de \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-imx@nxp.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=rafael@kernel.org \
--cc=rui.zhang@intel.com \
--cc=s.hauer@pengutronix.de \
--cc=shawnguo@kernel.org \
--cc=ulf.hansson@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®