From: Brian Swetland <swetland@google.com>
To: Mark Brown <broonie@opensource.wolfsonmicro.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 09:53:40 -0700 [thread overview]
Message-ID: <a55d774e0908100953p561e8370r11e0b733b2097391@mail.gmail.com> (raw)
In-Reply-To: <20090810163542.GC24947@sirena.org.uk>
On Mon, Aug 10, 2009 at 9:35 AM, Mark
Brown<broonie@opensource.wolfsonmicro.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.
Certainly -- though the case I'm dealing with the battery driver
wanting to know how much power is available upstream (via calling
am_i_supplied()) so it can decide if it can turn on the charger (and
if it should use low or highspeed charging). The way I'm currently
handling this is that I have an "ac" supply (power brick) and a "usb"
supply, only one of which will be supplying power to the "battery"
supply (battery & charger). In my case I'd never have multiple
upstream supplies active simultaneously, but I'm not sure if that'd
hold true for everyone.
Brian
prev parent reply other threads:[~2009-08-10 16:53 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-08 2:19 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
2009-08-10 16:53 ` Brian Swetland [this message]
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=a55d774e0908100953p561e8370r11e0b733b2097391@mail.gmail.com \
--to=swetland@google.com \
--cc=avorontsov@ru.mvista.com \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=cbou@mail.ru \
--cc=dwmw2@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pavel@ucw.cz \
/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
all inboxes | Powered by JetHome®