From: neil.armstrong@linaro.org
To: Daniel Lezcano <daniel.lezcano@linaro.org>,
"Rafael J. Wysocki" <rjw@rjwysocki.net>,
Linux PM <linux-pm@vger.kernel.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
Lukasz Luba <lukasz.luba@arm.com>,
Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>,
Zhang Rui <rui.zhang@intel.com>,
linux-arm-msm <linux-arm-msm@vger.kernel.org>
Subject: Re: [PATCH v2] thermal: core: Call monitor_thermal_zone() if zone temperature is invalid
Date: Thu, 4 Jul 2024 10:24:00 +0200 [thread overview]
Message-ID: <5ad6a075-7280-4280-a797-cf04a1df0830@linaro.org> (raw)
In-Reply-To: <50390ee7-20df-4be1-9cda-639981bf4ca7@linaro.org>
On 04/07/2024 09:57, Daniel Lezcano wrote:
> On 04/07/2024 09:39, neil.armstrong@linaro.org wrote:
>
> [ ... ]
>
>> OK I just found out, it's the `qcom-battmgr-bat` thermal zone, and in CI we do not have the firmwares so the
>> temperature is never available, this is why it fails in a loop.
>>
>> Before this patch it would fail silently, but would be useless if we start the firmware too late.
>>
>> So since it's firmware based, valid data could arrive very late in the boot stage, and sending an
>> error message in a loop until the firmware isn't started doesn't seem right.
>
> Yeah, there was a similar bug with iwlwifi. They fixed it by registering the thermal zone after the firmware was successfully loaded.
>
> Is that possible to do the same ?
The thermal zone is indirect, it's registered via power_supply_core.
A tentative was done to delay registering the power supply , since it caused issues in suspend/resume,
but it was reverted because it would require much more work:
https://lore.kernel.org/all/20240123160053.18331-1-johan+linaro@kernel.org/
Seems we should instead return -EAGAIN instead of -ENODEV in qcom_battmgr_bat_get_property(),
But I think power_supply_read_temp() should return -EAGAIN on -ENODEV, since it's the return
code for when a power supply isn't initialized.
Neil
>
>> I think Rafael's new patch is good, but perhaps it should send an error when it finally stops monitoring.
>
>
>
next prev parent reply other threads:[~2024-07-04 8:24 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-28 12:10 Rafael J. Wysocki
2024-07-01 12:08 ` Daniel Lezcano
2024-07-03 10:54 ` Neil Armstrong
2024-07-03 11:29 ` Rafael J. Wysocki
2024-07-03 12:43 ` neil.armstrong
2024-07-03 12:25 ` Daniel Lezcano
2024-07-03 12:43 ` neil.armstrong
2024-07-03 14:00 ` Daniel Lezcano
2024-07-03 14:42 ` neil.armstrong
2024-07-03 15:12 ` Daniel Lezcano
2024-07-04 7:39 ` neil.armstrong
2024-07-04 7:57 ` Daniel Lezcano
2024-07-04 8:24 ` neil.armstrong [this message]
2024-07-04 9:55 ` Rafael J. Wysocki
2024-07-03 16:08 ` Rafael J. Wysocki
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=5ad6a075-7280-4280-a797-cf04a1df0830@linaro.org \
--to=neil.armstrong@linaro.org \
--cc=daniel.lezcano@linaro.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=lukasz.luba@arm.com \
--cc=rjw@rjwysocki.net \
--cc=rui.zhang@intel.com \
--cc=srinivas.pandruvada@linux.intel.com \
/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®