From: Wei Ni <wni@nvidia.com>
To: Zhang Rui <rui.zhang@intel.com>
Cc: "R, Durgadoss" <durgadoss.r@intel.com>,
"Brown, Len" <len.brown@intel.com>,
"akpm@linux-foundation.org" <akpm@linux-foundation.org>,
"khali@linux-fr.org" <khali@linux-fr.org>,
"joe@perches.com" <joe@perches.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-tegra@vger.kernel.org" <linux-tegra@ger.kernel.org>,
Alex Courbot <acourbot@nvidia.com>
Subject: RE: How to use the generic thermal sysfs.
Date: Fri, 27 Jul 2012 10:58:21 +0800 [thread overview]
Message-ID: <1343357901.4042.70.camel@tegra-chromium-2> (raw)
In-Reply-To: <1343352098.1682.447.camel@rui.sh.intel.com>
On Fri, 2012-07-27 at 09:21 +0800, Zhang Rui wrote:
> On 四, 2012-07-26 at 17:31 +0800, Wei Ni wrote:
> > On Fri, 2012-07-13 at 15:41 +0800, Zhang Rui wrote:
> > > On 五, 2012-07-13 at 15:30 +0800, Wei Ni wrote:
> > > >
> > > > Our tegra thermal framework also will use the generic thermal layer. It
> > > > will register the cooling device, and run the throttling in this generic
> > > > framework.
> > > > But we have a special mechanism, when the temp is below the trip temp,
> > > > we will set different cpu capability for different temp range. For
> > > > example, set the low/high temp as 20C/30C to the sensor, and set the cpu
> > > > to the max capability, it mean the cpu can run up to the max freq and
> > > > voltage in this temp range. if the temp is out that range, the sensor
> > > > will have irq/alert to notify the tegra framework, then we will set to
> > > > another temperature range and cpu capability.
> > > > I think we can try to add this mechanism to the generic framework as a
> > > > new policy, right?
> > > >
> > > I think you can make use of the upper&lower limit in my patch set.
> > > Say, here is your thermal policy
> > > 20C - 30C, P0
> > > 30C - 40C, P1 - P2
> > > 40C - 60C, P3 - P5
> > > 60C+, P6 ~ Pn
> > >
> > > you can register to the thermal layer 4 passive trip points,
> > > 20C, 30C, 40C, 60C, and then
> > > 1) for trip 0 (20C), upper limit 0, lower limit 0
> > > 2) for trip 1 (30C), upper limit 2, lower limit 1
> > > 3) for trip 2 (40C), upper limit 5, lower limit 3
> > > 4) for trip 3 (60C), upper limit n, lower limit 6
> > >
> > > you can program your own sensor to get interrupt when the temperature
> > > hits 20C/30C/40C/60C, and the generic thermal layer will put the
> > > processors to proper frequency for each trip point.
> > >
> > > what do you think?
> >
> > Hi, Rui
> > I'm trying your upper/lower codes on our tegra platform.
> > Since we want to set limit value to the sensor to get interrupt, and
> > many sensor drivers can support the limit alert property, could we add a
> > new callback .set_limits() for the thermal zone device, so that we can
> > program it in the generic layer. when the temperature hits the
> > trip_temp,
>
> at this time, there should be an interrupt, right?
Yes, there will have an interrupt.
>
> > we can try to set to the next limit range.
>
> is it possible to program the sensor at this time, in your own thermal
> driver?
Since we are using the generic thermal driver lm90.c, I'm not sure if we
could program these limits in the generic driver, I think it's better to
have a generic interface to set the limits, so I wish to add a
callback .set_limits() in the generic thermal framework.
>
> thanks,
> rui
> > I can try to add these codes base on your patches.
> >
> > Thanks.
> > Wei.
> >
> > >
> > > BTW, the upper and lower limit is introduced in the patch set I'm
> > > testing, so maybe you were not aware of it.
> > >
> > > thanks,
> > > rui
> >
> >
> >
>
>
next prev parent reply other threads:[~2012-07-27 3:00 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-12 10:22 How to use the generic thermal sysfs Wei Ni
2012-07-12 10:54 ` R, Durgadoss
2012-07-13 1:51 ` Zhang Rui
2012-07-13 7:30 ` Wei Ni
2012-07-13 7:41 ` Zhang Rui
2012-07-13 8:11 ` Wei Ni
2012-07-13 9:53 ` Wei Ni
2012-07-26 9:31 ` Wei Ni
2012-07-27 1:21 ` Zhang Rui
2012-07-27 2:58 ` Wei Ni [this message]
2012-07-27 7:30 ` Jean Delvare
2012-07-27 7:39 ` Zhang Rui
2012-07-27 10:48 ` Wei Ni
2012-08-01 1:02 ` Zhang Rui
2012-08-01 11:29 ` Wei Ni
2012-10-17 7:15 ` How can I get the latest generic thermal framework Wei Ni
2012-10-17 8:36 ` R, Durgadoss
2012-07-13 5:48 ` How to use the generic thermal sysfs Alex Courbot
2012-07-13 5:54 ` R, Durgadoss
2012-07-13 6:08 ` Alex Courbot
2012-07-13 6:10 ` Zhang Rui
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=1343357901.4042.70.camel@tegra-chromium-2 \
--to=wni@nvidia.com \
--cc=acourbot@nvidia.com \
--cc=akpm@linux-foundation.org \
--cc=durgadoss.r@intel.com \
--cc=joe@perches.com \
--cc=khali@linux-fr.org \
--cc=len.brown@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tegra@ger.kernel.org \
--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;
as well as URLs for NNTP newsgroup(s).