Messages in this thread | | | Date | Mon, 10 Aug 2009 17:35:42 +0100 | From | Mark Brown <> | Subject | Re: power_supply class/framework question |
| |
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).
| |