Description: RTC wakeup doesn't work anymore since kernel 2.6.32. This was tested on two different mainboards. Command used to test: echo $((`cat /sys/class/rtc/rtc0/since_epoch`+60)) > /sys/class/rtc/rtc0/wakealarm Hardware: Tested on Asus P4C800-E Deluxe and Intel Essentials D945GCLF2 rtc_cmos 00:03: RTC can wake from S4 rtc_cmos 00:03: rtc core: registered rtc_cmos as rtc0 rtc0: alarms up to one month, 114 bytes nvram, hpet irqs Commit introducing bug: commit abd6633c67925f90775bb74755f9c547e30f1f20 Author: David Härdeman <david@hardeman.nu> Date: Mon Sep 21 17:04:52 2009 -0700 pnp: add a shutdown method to pnp drivers The shutdown method is used by the winbond cir driver to setup the hardware for wake-from-S5. Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com> Signed-off-by: David Härdeman <david@hardeman.nu> Cc: Dmitry Torokhov <dtor@mail.ru> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Although this patch doesn't apply to the rtc-cmos module directly, the added PNP shutdown function seems to cause the module to behave differently. Unfortunately i couldn't take a deeper look into the runtime changes this patch introduces. Output of /proc/driver/rtc after setting alarm time: rtc_time : 00:07:25 rtc_date : 2009-12-31 alrm_time : 00:08:20 alrm_date : 2009-12-31 alarm_IRQ : yes alrm_pending : no 24hr : yes periodic_IRQ : no update_IRQ : no HPET_emulated : yes DST_enable : no periodic_freq : 1024 batt_status : okay Output of /proc/driver/rtc after waiting for the alarm to trigger while the system stays on: rtc_time : 00:08:36 rtc_date : 2009-12-31 alrm_time : 00:08:20 alrm_date : ****-**-31 alarm_IRQ : no alrm_pending : no 24hr : yes periodic_IRQ : no update_IRQ : no HPET_emulated : yes DST_enable : no periodic_freq : 1024 batt_status : okay
Created attachment 24385 [details] Kernel configuration for Intel Essentials D945GCLF2
Created attachment 24433 [details] Restore wakealarm function on shutdown With the addition of the shutdown method to the pnp drivers, the cmos_pnp_shutdown() function in rtc-cmos.c is no longer called on shutdown. This patch makes the cmos_pnp_shutdown() function be called via the pnp driver shutdown method.
Thanks, I seem to have recently merged /rtc_cmos-convert-shutdown-to-new-pnp_driver-shutdown.patch which does the same thing.