summaryrefslogtreecommitdiffstats
path: root/drivers/rtc/rtc-xgene.c
Commit message (Collapse)AuthorAgeFilesLines
* rtc: xgene: use .set_timeAlexandre Belloni2019-04-041-3/+3
| | | | | | Use .set_time instead of the deprecated .set_mmss. Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
* rtc: xgene: switch to rtc_time64_to_tm/rtc_tm_to_time64Alexandre Belloni2019-04-041-5/+3Star
| | | | | | | Call the 64bit versions of rtc_tm time conversion as the range is enforced by the core. Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
* rtc: xgene: stop caching alarm_timeAlexandre Belloni2019-04-041-4/+3Star
| | | | | | | There is no point in caching alarm_time for .read_alarm because .read_alarm is only called at boo time and thus alarm_time is always 0. Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
* rtc: xgene: correct checkpatch issuesAlexandre Belloni2019-04-041-7/+7
| | | | | | Correct trivial whitespace issues. Also sort the headers. Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
* rtc: xgene: convert to SPDX identifierAlexandre Belloni2019-04-041-14/+1Star
| | | | | | Use SPDX-License-Identifier instead of a verbose license text. Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
* rtc: xgene: set rangeAlexandre Belloni2019-04-041-0/+1
| | | | | | CCVR is a 32bit second counter. Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
* rtc: xgene: fix possible race conditionAlexandre Belloni2019-04-041-7/+11
| | | | | | | | | | | The IRQ is requested before the struct rtc is allocated and registered, but this struct is used in the IRQ handler. This may lead to a NULL pointer dereference. Switch to devm_rtc_allocate_device/rtc_register_device to allocate the rtc struct before requesting the IRQ. Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
* rtc: stop validating rtc_time after rtc_time_to_tmAlexandre Belloni2018-03-011-1/+1
| | | | | | | rtc_time_to_tm never generates an invalid tm. It is not necessary to validate it. Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
* rtc: xgene: mark PM functions as __maybe_unusedArnd Bergmann2017-11-091-4/+2Star
| | | | | | | | | | | | | | | | The new xgene_rtc_alarm_irq_enabled() function is only accessed from PM code, which is inside of an #ifdef; this causes a harmless build warning when CONFIG_PM is disabled: drivers/rtc/rtc-xgene.c:108:12: error: 'xgene_rtc_alarm_irq_enabled' defined but not used [-Werror=unused-function] Just remove the #ifdef and use __maybe_unused annotations instead, to make the code more robust here. Fixes: d0bcd82b1379 ("rtc: xgene: Fix suspend/resume") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Reviewed-by: Loc Ho <lho@apm.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
* rtc: xgene: Fix suspend/resumeLoc Ho2017-11-091-9/+32
| | | | | | | | | This patch fixes suspend/resume functions properly for the APM X-Gene SoC RTC driver. Signed-off-by: Loc Ho <lho@apm.com> Reviewed-by: Mark Brown <broonie@linaro.org> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
* rtc: drop owner assignment from platform_driversWolfram Sang2014-10-201-1/+0Star
| | | | | | | 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>
* drivers/rtc: add APM X-Gene SoC RTC driverLoc Ho2014-06-071-0/+278
Add support for the APM X-Gene SoC RTC driver. Signed-off-by: Rameshwar Prasad Sahu <rsahu@apm.com> Signed-off-by: Loc Ho <lho@apm.com> Cc: Jon Masters <jcm@redhat.com> Cc: Alessandro Zummo <a.zummo@towertech.it> Cc: Catalin Marinas <catalin.marinas@arm.com> Cc: Will Deacon <will.deacon@arm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>