[PATCH] add ac charger power_supply

Sean McNeil sean at mcneil.com
Tue Dec 2 12:01:39 CET 2008


Balaji Rao wrote:
> 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 ?

I can live with or without the ac power_supply. I was of the opinion it 
might be nice to know the difference between having USB power or AC.  
Sounds like providing the current would be sufficient. But is it legal 
for USB current to be 1A? Android will happily fail to find ac and 
continue on without a problem, but it does look for an ac power_supply.

Sean




More information about the openmoko-kernel mailing list