summaryrefslogtreecommitdiff
path: root/drivers/rtc/rtc-sunxi.c
AgeCommit message (Collapse)Author
2016-01-11rtc: sunxi: use of_device_get_match_dataLABBE Corentin
The usage of of_device_get_match_data reduce the code size a bit. Signed-off-by: LABBE Corentin <clabbe.montjoie@gmail.com> Acked-by: Chen-Yu Tsai <wens@csie.org> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
2016-01-11rtc: sunxi: constify the data_year_param structureLABBE Corentin
The data_year_param struct is never modified, so lets constify it. This permit to remove cast since of_device_id is const also. Signed-off-by: LABBE Corentin <clabbe.montjoie@gmail.com> Acked-by: Chen-Yu Tsai <wens@csie.org> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
2016-01-11rtc: sunxi: fix signedness issuesLABBE Corentin
The variable year must be set as unsigned since it is used with sunxi_rtc_data_year{.min|.max} and as parameter of is_leap_year() which wait for unsigned int. Only tm_year is not unsigned, but it is long. This patch fix also the format of printing of min/max. (must use %u since they are unsigned) The parameter to of sunxi_rtc_setaie() must be set to uint since callers give always uint data. Signed-off-by: LABBE Corentin <clabbe.montjoie@gmail.com> Acked-by: Chen-Yu Tsai <wens@csie.org> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
2015-06-25rtc: sunxi: Replace deprecated rtc_tm_to_time()Xunlei Pang
sunxi_rtc_setalarm() uses deprecated rtc_tm_to_time(), which will overflow in year 2106 on 32-bit machines. This patch solves this by: - Replacing rtc_tm_to_time() with rtc_tm_sub() Also remove the unnecessary initial zeroing of some local variables in sunxi_rtc_setalarm(). Cc: Carlo Caione <carlo.caione@gmail.com> Signed-off-by: Xunlei Pang <pang.xunlei@linaro.org> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
2014-10-20rtc: drop owner assignment from platform_driversWolfram Sang
A platform_driver does not need to set an owner, it will be populated by the driver core. Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
2014-04-03rtc: sunxi: change compatiblesMaxime Ripard
The Allwinner A10 compatibles were following a slightly different compatible patterns than the rest of the SoCs for historical reasons. Change the compatibles to match the other pattern in the RTC driver for consistency. Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-12-20ARM: sun4i/sun7i: RTC driverCarlo Caione
This patch introduces the driver for the RTC in the Allwinner A10 and A20 SoCs. Signed-off-by: Carlo Caione <carlo.caione@gmail.com> Acked-by: Alessandro Zummo <a.zummo@towertech.it> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>