[PATCH] add-resume-reason-sysfs.patch

joerg at openmoko.org joerg at openmoko.org
Tue May 20 17:54:17 CEST 2008

Am Mo  19. Mai 2008 schrieb Andy Green:
> The lower case ones under PMU are PMU interrupt sources that are
> "hidden" inside a single interrupt pin that reaches the CPU from the
> PMU, they're documented in the pcf50633 datasheet you can hopefully
> still get from here:
> http://wiki.openmoko.org/wiki/Neo_FreeRunner_GTA02_Hardware
> Only a very few of those are enabled for wake when
> fix-reduce-wake-reasons-in-pcf50633.patch goes in stable:
> ~ - USB insertion
> ~ - USB removal
> ~ - RTC Alarm
> ~ - Power key pressed
> ~ - Power key pressed for 1s  (hm oh well)
> "second" is a 1s heartbeat interrupt you can enable, but it isn't used
> for wake.  I listed everything in case things accidentally get enabled
> for wake in the future.

what's going to happen, when I power up the device by powerbutton (let's say 
from suspend), and a few (milli)"seconds" later the RTC Alarm incidentally 
triggers. What will the handler that's supposed to deal with RTC events see 
when looking for wake cause? Can it tell the device was already powered up by 
More elaborated: where is the difference in handling of an RTC Alarm that 
occurs while suspended, and one that occurs while powered up?
Probably the handler should get a SIGALARM, do whatever is due, THEN look 
whether wake cause was RTC Alarm and if so, trigger suspend if appropriate.
Right? (just curious ;)


ps: the phrase "hm oh well" always indicates there's sth to improve ;-) Here 
it's probably the definition of how to power up the freerunner that needs to 
be more precise. When we have a 1s-delay, we probably should exploit it.

More information about the openmoko-kernel mailing list