lkml.org 
[lkml]   [2012]   [Apr]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Question: How to power-manage UART-attached devices.
On Mon, 30 Apr 2012 23:33:22 +0100 Mark Brown
<broonie@opensource.wolfsonmicro.com> wrote:

> On Tue, May 01, 2012 at 08:22:09AM +1000, NeilBrown wrote:
>
> > The question is how can user-space tell the kernel that these devices are
> > 'inactive'?
>
> > I would like to integrate this into Linux in the most "natural" way that I
> > can but am having trouble. My current approach involves using "rfkill" but
> > that doesn't work very well for reasons that are probably not very relevant
> > here. It probably does make sense for powering the GPS antenna, but not
> > much else.
>
> The userspace consumer was added for users like this that live entirely
> in userspace.

Hi Mark,
thanks for the reply.

I assume you mean REGULATOR_VIRTUAL_CONSUMER (drivers/regulator/virtual.c)?

The one where the Kconfig entry says:
This is mainly useful for test purposes.

That certainly was useful for test purposes but I want to move beyond
testing.

One of the purposes of an operating system is to provide useful abstractions
and hide irrelevant details, so I don't want user-space to have to
explicitly enable a regulator.
I could cope with an 'on/off switch' abstraction. It might then enable a
regulator. In the case of the GPS device it would need to both enable a
regulator and toggle a GPIO line. I really don't want user-space to "know"
that it has to turn on a regulator and toggle a gpio line...

So I'm still hoping for something more abstract.

Thanks,
NeilBrown
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2012-05-01 01:41    [from the cache]
©2003-2014 Jasper Spaans. Advertise on this site