- 16 Mar, 2020 40 commits
-
-
Alexandre Belloni authored
The PL031 and ST v1 RTC are 32bit seconds counters. STv2 is a BCD RTC apparently going from 0000 to 9999, hopefully handling the leap days properly until then. Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Link: https://lore.kernel.org/r/20200306005809.38530-2-alexandre.belloni@bootlin.comSigned-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
-
Alexandre Belloni authored
The core will never pass an invalid alarm to .set_alarm, it is not necessary to check for its validity. Acked-by: Linus Walleij <linus.walleij@linaro.org> Link: https://lore.kernel.org/r/20200306005809.38530-1-alexandre.belloni@bootlin.comSigned-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
-
Alexandre Belloni authored
Allow building building the driver with COMPILE_TEST. Link: https://lore.kernel.org/r/20200306131629.18837-1-alexandre.belloni@bootlin.comSigned-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
-
Alexandre Belloni authored
Call the 64bit versions of rtc_tm time conversion. Link: https://lore.kernel.org/r/20200306074404.58909-4-alexandre.belloni@bootlin.comSigned-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
-
Alexandre Belloni authored
The datasheet states that 4052 is the maximum value for year. However, the mpc5121 read_time and set_time function abuse the target time register instead of using the broken down time so it is limited to 2106. Link: https://lore.kernel.org/r/20200306074404.58909-3-alexandre.belloni@bootlin.comSigned-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
-
Alexandre Belloni authored
This simplifies the path for the rtc_ops selection. Link: https://lore.kernel.org/r/20200306074404.58909-2-alexandre.belloni@bootlin.comSigned-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
-
Alexandre Belloni authored
Use devm managed function to simplify probe and remove. Link: https://lore.kernel.org/r/20200306074404.58909-1-alexandre.belloni@bootlin.comSigned-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
-
Alexandre Belloni authored
rtc_time64_to_tm never generates an invalid rtc_tm, stop validating it. Link: https://lore.kernel.org/r/20200306073758.58050-4-alexandre.belloni@bootlin.comSigned-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
-
Alexandre Belloni authored
Call the 64bit versions of rtc_tm time conversion. Link: https://lore.kernel.org/r/20200306073758.58050-3-alexandre.belloni@bootlin.comSigned-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
-
Alexandre Belloni authored
The pm8xxx are 32bit seconds counter. Link: https://lore.kernel.org/r/20200306073758.58050-2-alexandre.belloni@bootlin.comSigned-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
-
Alexandre Belloni authored
This allows further improvement of the driver. Also remove the unnecessary error string as the core will already display error messages. Link: https://lore.kernel.org/r/20200306073758.58050-1-alexandre.belloni@bootlin.comSigned-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
-
Alexandre Belloni authored
Call the 64bit version of rtc_tm to time conversion. Link: https://lore.kernel.org/r/20200306073459.57197-2-alexandre.belloni@bootlin.comSigned-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
-
Alexandre Belloni authored
The ds1305 is a BCD rtc valid from 2000 to 2099. Link: https://lore.kernel.org/r/20200306073459.57197-1-alexandre.belloni@bootlin.comSigned-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
-
Alexandre Belloni authored
Call the 64bit versions of rtc_tm time conversion. Link: https://lore.kernel.org/r/20200306073404.56921-3-alexandre.belloni@bootlin.comSigned-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
-
Alexandre Belloni authored
The ds1374 is a 32bit seconds counter. Link: https://lore.kernel.org/r/20200306073404.56921-2-alexandre.belloni@bootlin.comSigned-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
-
Alexandre Belloni authored
The RTC IRQ is requested before the struct rtc_device is allocated, this may lead to a NULL pointer dereference in the IRQ handler. To fix this issue, allocating the rtc_device struct before requesting the RTC IRQ using devm_rtc_allocate_device, and use rtc_register_device to register the RTC device. Link: https://lore.kernel.org/r/20200306073404.56921-1-alexandre.belloni@bootlin.comSigned-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
-
Alexandre Belloni authored
Call the 64bit versions of rtc_tm time conversion. Link: https://lore.kernel.org/r/20200306015703.42101-3-alexandre.belloni@bootlin.comSigned-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
-
Alexandre Belloni authored
The CPCAP rtc is a 14bit day counter plus a 17bit seconds counter. Note that this failed on Nov 10 2014 so it is very likely this driver as never been used since. Link: https://lore.kernel.org/r/20200306015703.42101-2-alexandre.belloni@bootlin.comSigned-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
-
Alexandre Belloni authored
This allows further improvement of the driver. Link: https://lore.kernel.org/r/20200306015703.42101-1-alexandre.belloni@bootlin.comSigned-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
-
Alexandre Belloni authored
Call the 64bit versions of rtc_tm time conversion. Link: https://lore.kernel.org/r/20200306010146.39762-3-alexandre.belloni@bootlin.comSigned-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
-
Alexandre Belloni authored
The SA1100 RTC is a 32bit seconds counter. Link: https://lore.kernel.org/r/20200306010146.39762-2-alexandre.belloni@bootlin.comSigned-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
-
Alexandre Belloni authored
Both RTC IRQs are requested before the struct rtc_device is allocated, this may lead to a NULL pointer dereference in the IRQ handler. To fix this issue, allocating the rtc_device struct before requesting the IRQs using devm_rtc_allocate_device, and use rtc_register_device to register the RTC device. Link: https://lore.kernel.org/r/20200306010146.39762-1-alexandre.belloni@bootlin.comSigned-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
-
Alexandre Belloni authored
Call the 64bit versions of rtc_tm time conversion. Link: https://lore.kernel.org/r/20200306005958.39203-4-alexandre.belloni@bootlin.comSigned-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
-
Alexandre Belloni authored
The Alchemy counter0 is a 32bit seconds counter. Link: https://lore.kernel.org/r/20200306005958.39203-3-alexandre.belloni@bootlin.comSigned-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
-
Alexandre Belloni authored
Simplify the driver by removing the goto label as it only does return ret. Link: https://lore.kernel.org/r/20200306005958.39203-2-alexandre.belloni@bootlin.comSigned-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
-
Alexandre Belloni authored
This allows further improvement of the driver. Link: https://lore.kernel.org/r/20200306005958.39203-1-alexandre.belloni@bootlin.comSigned-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
-
Alexandre Belloni authored
Call the 64bit version of rtc_tm time conversion. Link: https://lore.kernel.org/r/20200306005910.38939-2-alexandre.belloni@bootlin.comSigned-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
-
Alexandre Belloni authored
The starfire RTC is a 32bit seconds counter. Link: https://lore.kernel.org/r/20200306005910.38939-1-alexandre.belloni@bootlin.comSigned-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
-
Alexandre Belloni authored
Call the 64bit versions of rtc_tm time conversion to avoid the y2106 issue. Link: https://lore.kernel.org/r/20200306005730.38268-3-alexandre.belloni@bootlin.comSigned-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
-
Alexandre Belloni authored
The core will never pass an invalid alarm to .set_alarm, it is not necessary to check for its validity. Link: https://lore.kernel.org/r/20200306005730.38268-2-alexandre.belloni@bootlin.comSigned-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
-
Alexandre Belloni authored
This RTC is a 32bit seconds counter. Link: https://lore.kernel.org/r/20200306005730.38268-1-alexandre.belloni@bootlin.comSigned-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
-
Alexandre Belloni authored
convertfromdays and convert2days never return errors, stop handling non existent errors. Link: https://lore.kernel.org/r/20200305215022.32533-4-alexandre.belloni@bootlin.comSigned-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
-
Alexandre Belloni authored
Let the core handle offsetting and windowing the RTC range. This rtc has hours, minutes, seconds and 16bit days. As the driver has the RTC epoch set to year 2000, this means that the end of the range is 2^16 days minus one second later. This is Sun Jun 6 23:59:59 UTC 2179. This is better than the currently set year 2099. Link: https://lore.kernel.org/r/20200305215022.32533-3-alexandre.belloni@bootlin.comSigned-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
-
Alexandre Belloni authored
The code handling invalid alarms meaning the alarm is in the next 24 hours is not necessary since commit f8245c26 ("rtc: remove "RTC_ALM_SET mode" bugs") which actually predates this driver. Since then, .set_alarm is never called with an invalid alarm and this handling is not necessary in the driver. Link: https://lore.kernel.org/r/20200305215022.32533-2-alexandre.belloni@bootlin.comSigned-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
-
Alexandre Belloni authored
This allows further improvement of the driver. Also remove the unnecessary error string as the core will already display error messages. Link: https://lore.kernel.org/r/20200305215022.32533-1-alexandre.belloni@bootlin.comSigned-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
-
Alexandre Belloni authored
Call the 64bit versions of rtc_tm time conversion to avoid the y2106 issue. Link: https://lore.kernel.org/r/20200305160452.27808-3-alexandre.belloni@bootlin.comSigned-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
-
Alexandre Belloni authored
This RTC is a 32bit counter running at 16Hz. This overflows every eight years and a half. However, the driver uses the SW_VALUE register to store the overflow, extending the counter to 64bit as long as the update happens before the overflow. Link: https://lore.kernel.org/r/20200305160452.27808-2-alexandre.belloni@bootlin.comSigned-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
-
Alexandre Belloni authored
This allows further improvement of the driver. Also remove the unnecessary error string as the core will already display error messages. Link: https://lore.kernel.org/r/20200305160452.27808-1-alexandre.belloni@bootlin.comSigned-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
-
Anson Huang authored
i.MX SNVS RTC should depend on ARCH_MXC or COMPILE_TEST. Signed-off-by: Anson Huang <Anson.Huang@nxp.com> Link: https://lore.kernel.org/r/1583136785-4973-1-git-send-email-Anson.Huang@nxp.comSigned-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
-
suguosong authored
use kobj_to_dev instead of open-conding it Signed-off-by: suguosong <suguosong@xiaomi.com> Link: https://lore.kernel.org/r/20200225021923.8570-1-guosongsu@gmail.comSigned-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
-