Skip to content
Commit ab7f580b authored by Lokesh Vutla's avatar Lokesh Vutla Committed by Linus Torvalds
Browse files

drivers/rtc/rtc-omap.c: enable RTC_IRQWAKEEN bits when Alarm is set



When RTC CLKTRCTRL bit is configured in HW_AUTO, module goes to sleep in
IDLE state.

The Alarm SWakeup event can be used to wakeup the RTC when it is in IDLE
state.  In order to do so, the alarm needs to be set and enabled before
RTC enters the IDLE state.  Also the wakeup generation for alarm/timer
event needs to be set (bits [1:0] in RTC_IRQWAKEEN register).

Currently RTC_IRQWAKEEN bits are set only in suspend/resume paths.  With
this ALARM interrupts are not generated when it enters IDLE state.  So
programming the RTC_IRQWAKEEN bits when ever ALARM is set.

Signed-off-by: default avatarLokesh Vutla <lokeshvutla@ti.com>
Acked-by: default avatarSekhar Nori <nsekhar@ti.com>
Cc: Grant Likely <grant.likely@linaro.org>
Cc: Rob Herring <robh+dt@kernel.org>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 9dcc87fe
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment