lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1343820591.2295.79.camel@tegra-chromium-2>
Date:	Wed, 1 Aug 2012 19:29:51 +0800
From:	Wei Ni <wni@...dia.com>
To:	Zhang Rui <rui.zhang@...el.com>
CC:	Jean Delvare <khali@...ux-fr.org>,
	"R, Durgadoss" <durgadoss.r@...el.com>,
	"Brown, Len" <len.brown@...el.com>,
	"akpm@...ux-foundation.org" <akpm@...ux-foundation.org>,
	"joe@...ches.com" <joe@...ches.com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"linux-tegra@...r.kernel.org" <linux-tegra@....kernel.org>,
	Alex Courbot <acourbot@...dia.com>
Subject: Re: How to use the generic thermal sysfs.

On Wed, 2012-08-01 at 09:02 +0800, Zhang Rui wrote:
> On 五, 2012-07-27 at 18:48 +0800, Wei Ni wrote:
> > On Fri, 2012-07-27 at 15:39 +0800, Zhang Rui wrote:
> > > On 五, 2012-07-27 at 09:30 +0200, Jean Delvare wrote:
> > > > On Fri, 27 Jul 2012 10:58:21 +0800, Wei Ni wrote:
> > > > > On Fri, 2012-07-27 at 09:21 +0800, Zhang Rui wrote:
> > > > > > 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.
> > > > 
> > > > I can confirm that hwmon drivers do not set limits, it is up to
> > > > user-space to do it if they want. So if there is a need to do so in the
> > > > kernel itself, a proper interface at the generic thermal framework
> > > > level seems appropriate.
> > > > 
> > > oh, setting limits from userspace?
> > > I think you can program the senor when writing the trip point?
> > > with this patch,
> > > http://marc.info/?l=linux-acpi&m=134318814620429&w=2
> > 
> > Do you mean it can use .set_trip_temp() to set limits when writing the
> > trip point? But I think this callback is used to change the trip_temp,
> > it could not used to set the limits, in here the limit value is used to
> > trigger the interrupt.
> > 
> yes, you are right. .set_trip_temp does not work.
> 
> usually, this is needed to re-program the sensor when the temperature
> hits a trip point , right?

Yes, we need to re-program the sensor to set the limit value.

> 
> can we make use of the thermal_zone_device_ops.notify()?
> say we invoke .notify() in thermal_zone_device_update for each trip
> point.

oh, it's a good idea, we can re-program the sensor in the .notify(), is
it right?
I will try it later, thanks for your suggestions.

> 
> thanks,
> rui


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ