[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <f3a3d5896e07dd6280d0bf450f01ad1bba6f9286.1539851865.git.baolin.wang@linaro.org>
Date: Thu, 18 Oct 2018 16:52:28 +0800
From: Baolin Wang <baolin.wang@...aro.org>
To: a.zummo@...ertech.it, alexandre.belloni@...tlin.com
Cc: broonie@...nel.org, linux-rtc@...r.kernel.org,
linux-kernel@...r.kernel.org, baolin.wang@...aro.org
Subject: [PATCH 3/5] rtc: sc27xx: Remove interrupts disable and clear in probe()
When registering one rtc device, it will check to see if there is an
alarm already set in rtc hardware by issuing __rtc_read_alarm(). So
we should not disable the RTC interrupts and clear the interrupts
status in probe() function.
Signed-off-by: Baolin Wang <baolin.wang@...aro.org>
---
drivers/rtc/rtc-sc27xx.c | 20 --------------------
1 file changed, 20 deletions(-)
diff --git a/drivers/rtc/rtc-sc27xx.c b/drivers/rtc/rtc-sc27xx.c
index 6ac5653..4ecabe6 100644
--- a/drivers/rtc/rtc-sc27xx.c
+++ b/drivers/rtc/rtc-sc27xx.c
@@ -129,19 +129,6 @@ static int sprd_rtc_clear_alarm_ints(struct sprd_rtc *rtc)
SPRD_RTC_ALM_INT_MASK);
}
-static int sprd_rtc_disable_ints(struct sprd_rtc *rtc)
-{
- int ret;
-
- ret = regmap_update_bits(rtc->regmap, rtc->base + SPRD_RTC_INT_EN,
- SPRD_RTC_INT_MASK, 0);
- if (ret)
- return ret;
-
- return regmap_write(rtc->regmap, rtc->base + SPRD_RTC_INT_CLR,
- SPRD_RTC_INT_MASK);
-}
-
static int sprd_rtc_lock_alarm(struct sprd_rtc *rtc, bool lock)
{
int ret;
@@ -609,13 +596,6 @@ static int sprd_rtc_probe(struct platform_device *pdev)
rtc->dev = &pdev->dev;
platform_set_drvdata(pdev, rtc);
- /* clear all RTC interrupts and disable all RTC interrupts */
- ret = sprd_rtc_disable_ints(rtc);
- if (ret) {
- dev_err(&pdev->dev, "failed to disable RTC interrupts\n");
- return ret;
- }
-
/* check if RTC time values are valid */
ret = sprd_rtc_check_power_down(rtc);
if (ret) {
--
1.7.9.5
Powered by blists - more mailing lists