lkml.org 
[lkml]   [2010]   [Nov]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: sysfs and power management
From
Date
On Sun, 2010-10-31 at 15:25 +0100, ext Greg KH wrote:

> >
> > What I would like to do is:
> >
> > Control sensors operating mode and regulators based on the userspace
> > activity. If no-one is interested about the sensor, it can be turned
> > totally off including its operating power via regulator framework.
> >
> > So far the only accepted interface for the small sensor seems to be
> > sysfs. I tried use misc device but it was not accepted.
>
> Look at the drivers/staging/iio/ subsystem. It is working on a
> framework that you can use through a character device (I think) to
> properly manage your drivers in this manner.
>
> Try working with those developers as I think it is what you are looking
> for here.
>

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.

By getting open and close from sysfs would be nice from the driver
point of view. However, I understand that this is just overhead for
majority of the cases.

Regards,
Samu




\
 
 \ /
  Last update: 2010-11-01 11:45    [W:0.061 / U:0.700 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site