[PATCH] add ac charger power_supply

Balaji Rao balaji at raobalaji.com
Tue Dec 2 11:48:14 CET 2008


On Tue, Dec 02, 2008 at 09:32:51AM +0000, Andy Green wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Somebody in the thread at some point said:
>
> | This adds an appropriate ac power_supply class and shows usb only when
> | at the appropriate current limit.
>
> What do you think Balaji?  At first it seemed to me that adding another
> power_supply is broken for generic pcf50633 case, but actually, if it is
> cleared for 1A on USB for example then there is definitely an AC adapter
> involved.  Is this OK for you?
>

I strongly feel it's wrong to pollute the driver with application
specific stuff.

Sean, why can't we use the PROP_CURRENT_AVG to decide on whether the usb
is connected to a host or an adapter ? Adding that field should be
trivial and preserves the generic nature of the driver. What do you
think ?

	- Balaji



More information about the openmoko-kernel mailing list