rtc: omap: prevent disabling of clock/module during suspend
authorTero Kristo <t-kristo@ti.com>
Thu, 27 Oct 2016 05:57:26 +0000 (11:27 +0530)
committerAlexandre Belloni <alexandre.belloni@free-electrons.com>
Fri, 4 Nov 2016 22:11:39 +0000 (23:11 +0100)
commitefce21fc43e00a76aee7b0a1eda73730ed2d5d3a
tree8c41f0898936931b4db2cea74850ba926aa36388
parent3984903a2e3906d3def220e688040ce93368200a
rtc: omap: prevent disabling of clock/module during suspend

If RTC is running from an internal clock source, the RTC module can't
be disabled; otherwise it stops ticking completely. Current suspend
handler implementation disables the clock/module unconditionally,
instead fix this by disabling the clock only if we are running on
external clock source, which is not affected by suspend.

The prevention of disabling the clock must be done via implementing
the runtime_pm handlers for the device, and returning an error code
from the runtime suspend handler; otherwise OMAP core PM will disable
the clocks for the driver.

Signed-off-by: Tero Kristo <t-kristo@ti.com>
Signed-off-by: Keerthy <j-keerthy@ti.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
drivers/rtc/rtc-omap.c