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: <62697B07E9803846BC582181BD6FB6B836EB55EE74@NOK-EUMSG-02.mgdnok.nokia.com>
Date:	Wed, 3 Nov 2010 11:48:42 +0100
From:	<samu.p.onkalo@...ia.com>
To:	<alan@...ux.intel.com>, <gregkh@...e.de>
CC:	<hmh@....eng.br>, <alan@...rguk.ukuu.org.uk>,
	<akpm@...ux-foundation.org>, <linux-kernel@...r.kernel.org>
Subject: RE: sysfs and power management



>-----Original Message-----
>From: ext Alan Cox [mailto:alan@...ux.intel.com]
>Sent: 03 November, 2010 11:45
>To: Greg KH
>Cc: Onkalo Samu.P (Nokia-MS/Tampere); ext Henrique de Moraes Holschuh;
>Alan Cox; akpm@...ux-foundation.org; linux-kernel@...r.kernel.org
>Subject: Re: sysfs and power management
>
>On Mon, 1 Nov 2010 11:07:40 -0700
>Greg KH <gregkh@...e.de> wrote:
>
>> On Mon, Nov 01, 2010 at 04:57:01PM +0000, Alan Cox wrote:
>> > > I took a look to that. It seems that iio is more or less sysfs
>> > > based. There are ring buffers and event device which are chardev
>> > > based but still the data outside ring buffer and the control is
>> > > sysfs based.
>> >
>> > IIO is sysfs dependant, heavyweight and makes no sense for some of
>> > the sysfs based drivers. IIO is also staging based and Linus
>> > already threw out the last attempt to unify these drivers sanely
>> > with an ALS layer - which was smaller, cleaner and better !
>>
>> I think we need to revisit this issue again, before iio is merged to
>> the main kernel tree.  I've been totally ignoring the iio user/kernel
>> api at the moment, waiting for things to settle down there
>
>Actually I think there is another way to do it cleanly
>
>Keep a flag per device (or per runtime pm struct of device)
>
>And on the open/close do
>
>	if (runtime_pm on device && device has SYSFS_PM set)
>		pm_runtime_foo
>
>so that devices that need to be powered up to handle sysfs requests can
>set a single flag and just work.

That is one quite clean way.
sysfs_ops still needs function pointer to device core function which does pm_runtime
calls.
And there is one drawback. Driver doesn't know about new users after the first one.
It may want to refresh results whenever a new user appears. But that is probably not
a big issue.

-Samu






--
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