lkml.org 
[lkml]   [2010]   [Nov]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: sysfs and power management
On Wed, Nov 03, 2010 at 09:44:52AM +0000, Alan Cox wrote:
> On Mon, 1 Nov 2010 11:07:40 -0700
> Greg KH <gregkh@suse.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 sounds like a reasonable idea.

thanks,

greg k-h


\
 
 \ /
  Last update: 2010-11-03 14:13    [W:0.471 / U:0.056 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site