public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: Brian Swetland <swetland@google.com>
Cc: avorontsov@ru.mvista.com, Pavel Machek <pavel@ucw.cz>,
	Anton Vorontsov <cbou@mail.ru>,
	David Woodhouse <dwmw2@infradead.org>,
	linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: power_supply class/framework question
Date: Mon, 10 Aug 2009 17:35:42 +0100	[thread overview]
Message-ID: <20090810163542.GC24947@sirena.org.uk> (raw)
In-Reply-To: <a55d774e0908100914h6a42546fk47cdb207628ebe5e@mail.gmail.com>

On Mon, Aug 10, 2009 at 09:14:01AM -0700, Brian Swetland wrote:
> On Mon, Aug 10, 2009 at 8:28 AM, Anton
> Vorontsov<avorontsov@ru.mvista.com> wrote:

> > Or enum power_supply_type, with the following priority:
> > mains (wall), usb, battery?

> Either of those would work, though in the case of USB, as Pavel
> correctly points out, we'd need to differentiate between

I think we'll need to be able to report a list of supplies rather than
just one - for example, a lot of battery operated devices will use a
combination of USB and battery if the current draw exceeds what the USB
supply is able to deliver.

> non-enumerated and enumerated, so perhaps max available milliamps
> would be best.  Or USB could just not indicate that it's supplied
> until after enumeration is successful.

The 100mA from an unconfigured USB supply may still be a reasonable
proportion of the power that the device needs in some situations -
things like backlights and radios aren't going to be a good idea but
other things don't burn quite so much power.

USB also has some other current limit options which can be configured
(and sometimes people arrange for special hardware which provides limits
completely out of spec).

  reply	other threads:[~2009-08-10 16:36 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-08  2:19 power_supply class/framework question Brian Swetland
2009-08-10 15:00 ` Pavel Machek
2009-08-10 15:28   ` Anton Vorontsov
2009-08-10 16:14     ` Brian Swetland
2009-08-10 16:35       ` Mark Brown [this message]
2009-08-10 16:53         ` Brian Swetland

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=20090810163542.GC24947@sirena.org.uk \
    --to=broonie@opensource.wolfsonmicro.com \
    --cc=avorontsov@ru.mvista.com \
    --cc=cbou@mail.ru \
    --cc=dwmw2@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pavel@ucw.cz \
    --cc=swetland@google.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