From: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
To: Eduardo Valentin <edubezval@gmail.com>
Cc: Punit Agrawal <punit.agrawal@arm.com>,
rui.zhang@intel.com, linux-pm@vger.kernel.org
Subject: Re: [PATCH] thermal: Default OF created trip points to writable
Date: Wed, 25 Feb 2015 18:36:14 -0800 [thread overview]
Message-ID: <1424918174.24754.2.camel@spandruv-mobl2> (raw)
In-Reply-To: <20150225185223.GG2306@developer.amazonguestwifi.org>
Hi Eduardo,
On Wed, 2015-02-25 at 14:52 -0400, Eduardo Valentin wrote:
> Srinivas,
>
> > >
> > > I am copying Srinivas here too. Srinivas, do you think that option (1)
> > > above will break things in userspace on your side?
> > I am not sure distros like ubuntu starts Linux Thermal Daemon on ARM
> > systems. This has option to take over thermal control from kernel by
> > changing governor to user space. I take writable trips as a way to get
> > threshold temp notification for users space governor by setting offset
> > from a read only passive/active/critical trips. This way we get notified
> > before, to monitor an do proactive control. For example if there is a
> > critical trip at X, take action at X-a to avoid shutdown.
>
> Let me ask differently. If the trip points are read only, would the
> daemon still work?
Yes.
Thanks,
Srinivas
>
> If not, the change needs to make writable in x86 builds, right?
>
> BR,
>
> > Thanks,
> > Srinivas
> > >
> > > >
> > > > Cheers,
> > > > Punit
> > > >
> > > > >
> > > > >
> > > > > BR,
> > > > >
> > > > > Eduardo Valentin
> > > > >
> > > > >>
> > > > >> Comments welcome.
> > > > >>
> > > > >> Cheers,
> > > > >> Punit
> > > > >>
> > > > >> drivers/thermal/of-thermal.c | 6 +++++-
> > > > >> 1 file changed, 5 insertions(+), 1 deletion(-)
> > > > >>
> > > > >> diff --git a/drivers/thermal/of-thermal.c b/drivers/thermal/of-thermal.c
> > > > >> index 668fb1b..b7ad5c0 100644
> > > > >> --- a/drivers/thermal/of-thermal.c
> > > > >> +++ b/drivers/thermal/of-thermal.c
> > > > >> @@ -865,6 +865,7 @@ int __init of_parse_thermal_zones(void)
> > > > >> for_each_child_of_node(np, child) {
> > > > >> struct thermal_zone_device *zone;
> > > > >> struct thermal_zone_params *tzp;
> > > > >> + int i, mask = 0;
> > > > >>
> > > > >> /* Check whether child is enabled or not */
> > > > >> if (!of_device_is_available(child))
> > > > >> @@ -891,8 +892,11 @@ int __init of_parse_thermal_zones(void)
> > > > >> /* No hwmon because there might be hwmon drivers registering */
> > > > >> tzp->no_hwmon = true;
> > > > >>
> > > > >> + for (i = 0; i < tz->ntrips; i++)
> > > > >> + mask |= 1 << i;
> > > > >> +
> > > > >> zone = thermal_zone_device_register(child->name, tz->ntrips,
> > > > >> - 0, tz,
> > > > >> + mask, tz,
> > > > >> ops, tzp,
> > > > >> tz->passive_delay,
> > > > >> tz->polling_delay);
> > > > >> --
> > > > >> 2.1.4
> > > > >>
> >
> >
prev parent reply other threads:[~2015-02-26 2:36 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-10 18:21 [PATCH] thermal: Default OF created trip points to writable Punit Agrawal
2015-02-16 15:14 ` Eduardo Valentin
2015-02-17 11:12 ` Punit Agrawal
2015-02-24 19:52 ` Eduardo Valentin
2015-02-25 12:25 ` Punit Agrawal
2015-02-25 18:47 ` Eduardo Valentin
2015-02-26 10:16 ` Punit Agrawal
2015-02-25 16:24 ` Srinivas Pandruvada
2015-02-25 18:52 ` Eduardo Valentin
2015-02-26 2:36 ` Srinivas Pandruvada [this message]
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=1424918174.24754.2.camel@spandruv-mobl2 \
--to=srinivas.pandruvada@linux.intel.com \
--cc=edubezval@gmail.com \
--cc=linux-pm@vger.kernel.org \
--cc=punit.agrawal@arm.com \
--cc=rui.zhang@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