Re: power_supply class/framework question

From: Mark Brown
Date: Mon Aug 10 2009 - 12:36:06 EST


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@xxxxxxxxxxxxx> 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).
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/