aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/rtc/rtc-brcmstb-waketimer.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2019-04-04rtc: brcmstb-waketimer: switch to rtc_time64_to_tmAlexandre Belloni1-1/+1
Call the 64bit version of rtc_time_to_tm as the range is enforced by the core. Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
2018-05-21rtc: brcmstb-waketimer: add rangeAlexandre Belloni1-6/+1
Let the core handle the range. Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
2018-05-21rtc: brcmstb-waketimer: switch to rtc_register_deviceAlexandre Belloni1-5/+8
Switch to devm_rtc_allocate_device/rtc_register_device. Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
2018-03-17rtc: brcmstb-waketimer: Set wktmr prescalerJustin Chen1-0/+3
The HW default is one tick per second, however instead of assuming this, lets make sure the waketimer is actually one tick per second before arming the alarm. Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: Justin Chen <justinpopo6@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
2017-11-29rtc: brcmstb-waketimer: fix error handling in brcmstb_waketmr_probe()Alexey Khoroshilov1-3/+12
brcmstb_waketmr_probe() does not disable timer->clk on error paths. Found by Linux Driver Verification project (linuxtesting.org). Fixes: c4f07ecee22e ("rtc: brcmstb-waketimer: Add Broadcom STB wake-timer") Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
2017-07-05rtc: brcmstb-waketimer: Add Broadcom STB wake-timerBrian Norris1-0/+330
This adds support for the Broadcom STB wake-timer which is a timer in the chip's 27Mhz clock domain that offers the ability to wake the system (wake-up source) from suspend states (S2, S3, S5). It is supported using the rtc framework allowing us to configure alarms for system wake-up. Signed-off-by: Brian Norris <computersforpeace@gmail.com> Signed-off-by: Markus Mayer <mmayer@broadcom.com> Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>