The power drivers have their own interface for that. You should be using 
power_supply_changed(). Also, you probably don't have the device names 
to what Android is looking for. Android looks for

/sys/class/power/battery
/sys/class/power/ac
/sys/class/power/usb

Use logcat and see what is going on when it tries to read the initial 
battery values and starts watching for uevents.

Sean

Qingzhan Zhang wrote:
> hi:
>  
>  when the battery value changed i kobject_event(kobject,KOBJ_CHANGE)
> and when the charge plug in or plug out ,i also 
> kobject_event(kobject,KOBJ_CHANGE)
>  
> and update the POWER_SUPPLY_PROP_STATUS ,but i do not know the 
> android's battery log changed ,always display  "?",now where is the 
> problems?
> I am linux driver and kernel engineer,thanks
>
> On Mon, Jan 5, 2009 at 12:15 PM, Sean McNeil <[email protected] 
> <mailto:[email protected]>> wrote:
>
>
>     Hi,
>
>     Android uses the standard power interface, but it expects that uevents
>     are generated when the values change. It does not poll the values, but
>     listens for the uevents instead.
>
>     zhqzh1982 wrote:
>     > hi all:
>     >
>     >    is anyone  know the android charging detect and battery level
>     > detect interface between the linux driver and the android
>     APP,thanks a
>     > lot ,
>     >    today I start to study the power reference of android :)
>     > >
>     >
>
>
>
>
>     >


--~--~---------~--~----~------------~-------~--~----~
unsubscribe: [email protected]
website: http://groups.google.com/group/android-porting
-~----------~----~----~----~------~----~------~--~---

Reply via email to