Open Device Daemon, Progress Resport 3 [GSoC]

andrzej zaborowski balrogg at gmail.com
Thu Jun 12 23:20:22 CEST 2008


On 12/06/2008, Sudharshan S <sudharsh at gmail.com> wrote:
> andrzej zaborowski wrote:
>  > I'm afraid it's pretty normal for battery level to be polled, with the
>  > exception of some critical events that generate signals in PMU. PalmOS
>  > had a 1s interval hardcoded.
>  >
>
> For battery level I understand the polling issue. But for the
>  battery_status which would contain the strings "Full, Charging or
>  Discharging", these won't change regularly so polling the above file
>  every 5 seconds seems to be an overkill.

Ah, sorry then, I wasn't sure what info battery_status provided.  It
still holds that inotify won't work for it, but when the battery
becomes full, the charging or discharging starts we do get signals
from the PCF506xx hardware so polling wouldn't be needed if the kernel
was more complete.  Currently you'll find this in pcf50633.c interrupt
handler:

        if (pcfirq[2] & PCF50633_INT3_BATFULL) {
                DEBUGPC("BATFULL ");
                /* FIXME: signal this to userspace */
        }

This is because there's no standard interface for signalling this but
it was recently being discussed on openmoko-kernel at .. (in some thread
about LEDs) because someone else required the same funcitonality and I
think you can expect it to become available in -andy tree some time.

Cheers



More information about the openmoko-devel mailing list