All of lore.kernel.org
 help / color / mirror / Atom feed
From: NeilBrown <neilb@suse.de>
To: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: linux-serial@vger.kernel.org, linux-pm@vger.kernel.org,
	lkml <linux-kernel@vger.kernel.org>
Subject: Re: Question:  How to power-manage UART-attached devices.
Date: Tue, 1 May 2012 09:35:59 +1000	[thread overview]
Message-ID: <20120501093559.5c14087d@notabene.brown> (raw)
In-Reply-To: <20120430223322.GA3951@sirena.org.uk>

[-- Attachment #1: Type: text/plain, Size: 1539 bytes --]

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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 828 bytes --]

  reply	other threads:[~2012-04-30 23:36 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-30 22:22 Question: How to power-manage UART-attached devices NeilBrown
2012-04-30 22:33 ` Mark Brown
2012-04-30 23:35   ` NeilBrown [this message]
2012-05-01 16:33     ` Mark Brown
2012-05-01 23:15       ` NeilBrown
2012-05-02  9:02         ` Mark Brown
2012-04-30 22:51 ` H. Peter Anvin
2012-04-30 23:34   ` Alan Cox
2012-05-01  0:12     ` NeilBrown
2012-04-30 23:47   ` NeilBrown
2012-04-30 23:50     ` H. Peter Anvin
2012-05-01  0:27       ` NeilBrown

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=20120501093559.5c14087d@notabene.brown \
    --to=neilb@suse.de \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.