public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@suse.de>
To: Alan Cox <alan@linux.intel.com>
Cc: samu.p.onkalo@nokia.com,
	ext Henrique de Moraes Holschuh <hmh@hmh.eng.br>,
	Alan Cox <alan@lxorguk.ukuu.org.uk>,
	"akpm@linux-foundation.org" <akpm@linux-foundation.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: sysfs and power management
Date: Wed, 3 Nov 2010 06:09:25 -0700	[thread overview]
Message-ID: <20101103130925.GA15885@suse.de> (raw)
In-Reply-To: <20101103094452.0cfae4ec@linux.intel.com>

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

  parent reply	other threads:[~2010-11-03 13:10 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-27 10:59 sysfs and power management Onkalo Samu
2010-10-27 11:48 ` Alan Cox
2010-10-27 13:43   ` samu.p.onkalo
2010-10-27 14:28     ` Alan Cox
2010-10-29 19:50       ` Greg KH
2010-10-30 14:00         ` Henrique de Moraes Holschuh
2010-10-31 11:57           ` Onkalo Samu
2010-10-31 14:25             ` Greg KH
2010-11-01 10:41               ` Onkalo Samu
2010-11-01 16:57                 ` Alan Cox
2010-11-01 18:07                   ` Greg KH
2010-11-03  9:44                     ` Alan Cox
2010-11-03 10:48                       ` samu.p.onkalo
2010-11-03 13:09                       ` Greg KH [this message]
2010-11-03 15:00                         ` samu.p.onkalo

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=20101103130925.GA15885@suse.de \
    --to=gregkh@suse.de \
    --cc=akpm@linux-foundation.org \
    --cc=alan@linux.intel.com \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=hmh@hmh.eng.br \
    --cc=linux-kernel@vger.kernel.org \
    --cc=samu.p.onkalo@nokia.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