aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/rtc/rtc-xgene.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2019-08-13rtc: Remove dev_err() usage after platform_get_irq()Stephen Boyd1-3/+1
We don't need dev_err() messages when platform_get_irq() fails now that platform_get_irq() prints an error message itself when something goes wrong. Let's remove these prints with a simple semantic patch. // <smpl> @@ expression ret; struct platform_device *E; @@ ret = ( platform_get_irq(E, ...) | platform_get_irq_byname(E, ...) ); if ( \( ret < 0 \| ret <= 0 \) ) { ( -if (ret != -EPROBE_DEFER) -{ ... -dev_err(...); -... } | ... -dev_err(...); ) ... } // </smpl> While we're here, remove braces on if statements that only have one statement (manually). Cc: Alessandro Zummo <a.zummo@towertech.it> Cc: Alexandre Belloni <alexandre.belloni@bootlin.com> Cc: linux-rtc@vger.kernel.org Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Stephen Boyd <swboyd@chromium.org> Link: https://lore.kernel.org/r/20190730181557.90391-40-swboyd@chromium.org Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
2019-04-04rtc: xgene: use .set_timeAlexandre Belloni1-3/+3
Use .set_time instead of the deprecated .set_mmss. Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
2019-04-04rtc: xgene: switch to rtc_time64_to_tm/rtc_tm_to_time64Alexandre Belloni1-5/+3
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>
2019-04-04rtc: xgene: stop caching alarm_timeAlexandre Belloni1-4/+3
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>
2019-04-04rtc: xgene: correct checkpatch issuesAlexandre Belloni1-7/+7
Correct trivial whitespace issues. Also sort the headers. Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
2019-04-04rtc: xgene: convert to SPDX identifierAlexandre Belloni1-14/+1
Use SPDX-License-Identifier instead of a verbose license text. Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
2019-04-04rtc: xgene: set rangeAlexandre Belloni1-0/+1
CCVR is a 32bit second counter. Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
2019-04-04rtc: xgene: fix possible race conditionAlexandre Belloni1-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>
2018-03-01rtc: stop validating rtc_time after rtc_time_to_tmAlexandre Belloni1-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>
2017-11-09rtc: xgene: mark PM functions as __maybe_unusedArnd Bergmann1-4/+2
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>
2017-11-09rtc: xgene: Fix suspend/resumeLoc Ho1-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>
2014-10-20rtc: drop owner assignment from platform_driversWolfram Sang1-1/+0
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-06-06drivers/rtc: add APM X-Gene SoC RTC driverLoc Ho1-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>