aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/rtc/rtc-r7301.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2018-03-02rtc: r7301: stop validating rtc_time in .read_timeAlexandre Belloni1-1/+1
The RTC core is always calling rtc_valid_tm after the read_time callback. It is not necessary to call it just before returning from the callback. Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
2018-01-12rtc: r7301: Fix a possible sleep-in-atomic bug in rtc7301_set_timeJia-Ju Bai1-1/+1
The driver may sleep under a spinlock. The function call path is: rtc7301_set_time (acquire the spinlock) usleep_range --> may sleep To fix it, usleep_range is replaced with udelay. This bug is found by my static analysis tool(DSAC) and checked by my code review. Signed-off-by: Jia-Ju Bai <baijiaju1990@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
2018-01-12rtc: r7301: Fix a possible sleep-in-atomic bug in rtc7301_read_timeJia-Ju Bai1-1/+1
The driver may sleep under a spinlock. The function call path is: rtc7301_read_time (acquire the spinlock) rtc7301_wait_while_busy usleep_range --> may sleep To fix it, usleep_range is replaced with udelay. This bug is found by my static analysis tool(DSAC) and checked by my code review. Signed-off-by: Jia-Ju Bai <baijiaju1990@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
2016-12-19rtc: add support for EPSON TOYOCOM RTC-7301SF/DGAkinobu Mita1-0/+453
This adds support for EPSON TOYOCOM RTC-7301SF/DG which has parallel interface compatible with SRAM. This driver supports basic clock, calendar and alarm functionality. Tested with Microblaze linux running on Artix7 FPGA board with my own custom IP for RTC-7301. Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>