Commit graph

7 commits

Author SHA1 Message Date
Biwen Li
9c328c9dd8 rtc: fsl-ftm-alarm: report alarm to core
Report interrupt state to the RTC core.

Signed-off-by: Biwen Li <biwen.li@nxp.com>
Link: https://lore.kernel.org/r/20200327084457.45161-1-biwen.li@nxp.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
2020-03-29 22:01:49 +02:00
Peng Ma
929a327048 rtc: fsl-ftm-alarm: enable acpi support
This patch enables ACPI support in Rtc Flex timer driver.

Signed-off-by: Peng Ma <peng.ma@nxp.com>
Link: https://lore.kernel.org/r/20200318025354.6447-1-peng.ma@nxp.com
Link: https://lore.kernel.org/r/20200323072956.38263-1-peng.ma@nxp.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
2020-03-23 09:26:47 +01:00
Alexandre Belloni
bb451661db rtc: fsl-ftm-alarm: avoid struct rtc_time conversions
Directly call ktime_get_real_seconds instead of converting the result to a
struct rtc_time and then back to a time64_t.

Link: https://lore.kernel.org/r/20191016201223.30568-4-alexandre.belloni@bootlin.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
2019-11-08 16:14:09 +01:00
Alexandre Belloni
9323e9631c rtc: fsl-ftm-alarm: switch to rtc_time64_to_tm/rtc_tm_to_time64
Call the 64bit versions of rtc_tm time conversion to avoid the y2038 issue.

Link: https://lore.kernel.org/r/20191016201223.30568-3-alexandre.belloni@bootlin.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
2019-11-08 16:14:08 +01:00
Alexandre Belloni
db2a4af115 rtc: fsl-ftm-alarm: switch to ktime_get_real_seconds
The driver drops the nanoseconds part of the timespec64, there is no need
to call ktime_get_real_ts64.

Link: https://lore.kernel.org/r/20191016201223.30568-2-alexandre.belloni@bootlin.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
2019-11-08 16:14:08 +01:00
Markus Elfring
89576bebbc rtc: Use devm_platform_ioremap_resource()
Simplify probe by using a known wrapper function.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Link: https://lore.kernel.org/r/4552ef52-f218-93b1-6dfa-668d137676f8@web.de
Link: https://lore.kernel.org/r/5ecfcf43-d6b2-1a38-dee8-b8806f30bc83@web.de
Link: https://lore.kernel.org/r/25448e11-c43f-9ae0-4c43-6f789accc026@web.de
Reviewed-by: Akinobu Mita <akinobu.mita@gmail.com>
Link: https://lore.kernel.org/r/8c17a59c-82ff-aa6b-5653-a38d786d3e83@web.de
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
2019-10-06 21:04:51 +02:00
Biwen Li
7b0b551dbc rtc: fsl-ftm-alarm: add FTM alarm driver
For the platforms including LS1012A, LS1021A, LS1028A, LS1043A,
LS1046A, LS1088A, LS208xA that has the FlexTimer
module, implementing alarm functions within RTC subsystem
to wakeup the system when system going to sleep (work with RCPM driver).

Signed-off-by: Biwen Li <biwen.li@nxp.com>
Link: https://lore.kernel.org/r/20190813030157.48590-1-biwen.li@nxp.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
2019-08-23 16:20:50 +02:00