Hello Yongcai Huang,
I am in a difficult situation, I cannot identify the wake source as RTC alarm, even though the system comes from Suspend to RAM state by RTC alarm.
The log which i got when the above procedure is executed is given below.
>PM: Syncing filesystems ... done.
>Freezing user space processes ... (elapsed 0.01 seconds) done.
>Freezing remaining freezable tasks ... (elapsed 0.01 seconds) done.
>Suspending console(s) (use no_console_suspend to debug)
>add wake up source irq 101
>add wake up source irq 99
>add wake up source irq 103
>add wake up source irq 51
>PM: suspend of devices complete after 8.569 msecs
>PM: late suspend of devices complete after 0.739 msecs
>Disabling non-boot CPUs ...
>CPU1: shutdown
>CPU2: shutdown
>CPU3: shutdown
--------------------------------------
>Enabling non-boot CPUs ...
>CPU1: Booted secondary processor
>Calibrating delay loop (skipped) already calibrated this CPU
>i.MXC CPU frequency driver
>CPU1 is up
>CPU2: Booted secondary processor
>Calibrating delay loop (skipped) already calibrated this CPU
>i.MXC CPU frequency driver
>CPU2 is up
>CPU3: Booted secondary processor
>Calibrating delay loop (skipped) already calibrated this CPU
>i.MXC CPU frequency driver
>CPU3 is up
>PM: early resume of devices complete after 0.440 msecs
>imx-ipuv3 imx-ipuv3.0: IPU DMFC DP HIGH RESOLUTION: 1(0,1), 5B(2~5), 5F(6,7)
>imx-ipuv3 imx-ipuv3.1: IPU DMFC DP HIGH RESOLUTION: 1(0,1), 5B(2~5), 5F(6,7)
>remove wake up source irq 51
>remove wake up source irq 103
>remove wake up source irq 101
>remove wake up source irq 99
>PM: resume of devices complete after 294.708 msecs
>Restarting tasks ... done.
-----------------------------------------------
>rtc alarm reg val 0
>rtc alarm mask 0
>Wake source not rtc
As you can see, "remove wake up source irq 51" is logged, probably because the register gets cleared by some other module during the wakeup. Do you have any idea which module will be doing that and can the status be retained until my module read that by some tweak?