public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* power_supply class/framework question
@ 2009-08-08  2:19 Brian Swetland
  2009-08-10 15:00 ` Pavel Machek
  0 siblings, 1 reply; 6+ messages in thread
From: Brian Swetland @ 2009-08-08  2:19 UTC (permalink / raw)
  To: Anton Vorontsov, David Woodhouse; +Cc: linux-kernel

(feel free to redirect me to a different mailing list if there's a
more appropriate place to ask this question)

I'm working on cleaning up some code to more correctly use the power
supply framework (have the battery driver receive notification from
the wall/usb power supplies, etc), and ran into a slight snag.  For
mobile usb powered devices, we need to know how much current can
safely be consumed by the charge circuit -- generally this is one of:
none, <500mA or 1000mA, which correspond to "no power supply", "usb
power supply", or "wall power supply".

I can use power_supply_am_i_supplied() to determine if I'm receiving
power, but there's no way to determine either how much (if I have one
power supply that indicates max current available) or which supply (if
I define a separate "ac" and "usb" power supply).

I'd be happy to throw together some patches to handle this, but was
wondering if there was any preference in how such information would be
made available.

Thanks,

Brian

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2009-08-10 16:53 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2009-08-10 16:53         ` Brian Swetland

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox