From: Steven J Abner <pheonix.sja@att.net>
To: Daniel Lezcano <daniel.lezcano@linaro.org>
Cc: Randy Dunlap <rdunlap@infradead.org>,
"Rafael J. Wysocki" <rafael@kernel.org>,
linux-kernel@vger.kernel.org, Linux PM <linux-pm@vger.kernel.org>
Subject: Re: thermal driver patch
Date: Thu, 01 Sep 2022 08:14:11 -0400 [thread overview]
Message-ID: <NZ5JHR.JGO592OT0D961@att.net> (raw)
In-Reply-To: <be354f9e-47c7-bd6e-c570-e7364858ced4@linaro.org>
On Thu, Sep 1, 2022 at 05:59, Daniel Lezcano
<daniel.lezcano@linaro.org> wrote:
> Could it be related to this bug?
>
> https://bugzilla.kernel.org/show_bug.cgi?id=201761
>
> Is it possible to give the thermal zone 'type'
Did verify that that my thermal_zone0 is my wifi:
used lm-sensor and cat /sys/class/thermal/thermal_zone0/temp
along with wifi load to heat to temps different then others to check
outputs.
The above mentioned bug page could have lead to this, I can't say or
track.
Prefix the following with I'm not an expert, just info provider:
My guess is not supposed to be calling function during initial kernel
loading, based on following:
from thermal_core.c:
18:
#include <linux/thermal.h>
397:
static void update_temperature(struct thermal_zone_device *tz)
{
int temp, ret;
ret = thermal_zone_get_temp(tz, &temp);
if (ret) {
if (ret != -EAGAIN)
dev_warn(&tz->device,
"failed to read out thermal zone (%d)\n",
ret);
return;
}
mutex_lock(&tz->lock);
tz->last_temperature = tz->temperature;
tz->temperature = temp;
mutex_unlock(&tz->lock);
trace_thermal_temperature(tz);
thermal_genl_sampling_temp(tz->id, temp);
}
from linux/thermal.h:
429:
static inline int thermal_zone_get_temp(
struct thermal_zone_device *tz, int *temp)
{ return -ENODEV; }
compiler should then read:
static void update_temperature(struct thermal_zone_device *tz)
{
int temp, ret;
ret = -ENODEV;
if (ret) {
if (ret != -EAGAIN)
dev_warn(&tz->device,
"failed to read out thermal zone (%d)\n",
ret);
return;
}
however did find with extra search:
in /drivers/thermal/thermal_helpers.c:
78:
int thermal_zone_get_temp(struct thermal_zone_device *tz, int *temp)
and
115:
EXPORT_SYMBOL_GPL(thermal_zone_get_temp);
so is this bootup vs system hand off?
where bootup call thermal_zone_get_temp() shouldn't occur?
Steve
next prev parent reply other threads:[~2022-09-01 12:14 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <DL9RGR.8W3XFSCFFYXI2.ref@att.net>
2022-08-17 10:39 ` thermal driver patch Steven J Abner
2022-08-29 5:47 ` Randy Dunlap
2022-08-29 12:20 ` Steven J Abner
2022-08-29 22:06 ` Randy Dunlap
2022-09-01 5:59 ` Daniel Lezcano
2022-09-01 12:14 ` Steven J Abner [this message]
2022-09-07 11:15 ` Steven J Abner
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=NZ5JHR.JGO592OT0D961@att.net \
--to=pheonix.sja@att.net \
--cc=daniel.lezcano@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=rafael@kernel.org \
--cc=rdunlap@infradead.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.