From: Baolin Wang <baolin.wang@linaro.org>
To: a.zummo@towertech.it, alexandre.belloni@bootlin.com
Cc: broonie@kernel.org, linux-rtc@vger.kernel.org,
linux-kernel@vger.kernel.org, baolin.wang@linaro.org
Subject: [PATCH 3/5] rtc: sc27xx: Remove interrupts disable and clear in probe()
Date: Thu, 18 Oct 2018 16:52:28 +0800 [thread overview]
Message-ID: <f3a3d5896e07dd6280d0bf450f01ad1bba6f9286.1539851865.git.baolin.wang@linaro.org> (raw)
In-Reply-To: <cover.1539851865.git.baolin.wang@linaro.org>
In-Reply-To: <cover.1539851865.git.baolin.wang@linaro.org>
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@linaro.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
next prev parent reply other threads:[~2018-10-18 8:53 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-18 8:52 [PATCH 0/5] Fix some issues for RTC alarm function Baolin Wang
2018-10-18 8:52 ` [PATCH 1/5] rtc: sc27xx: Set wakeup capability before registering rtc device Baolin Wang
2018-10-18 8:52 ` [PATCH 2/5] rtc: sc27xx: Clear SPG value update interrupt status Baolin Wang
2018-10-18 8:52 ` Baolin Wang [this message]
2018-10-18 8:52 ` [PATCH 4/5] rtc: sc27xx: Add check to see if need to enable the alarm interrupt Baolin Wang
2018-10-18 8:52 ` [PATCH 5/5] rtc: sc27xx: Always read normal alarm when registering RTC device Baolin Wang
2018-10-25 0:34 ` Alexandre Belloni
2018-10-25 1:57 ` Baolin Wang
2018-10-25 0:25 ` [PATCH 0/5] Fix some issues for RTC alarm function Alexandre Belloni
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=f3a3d5896e07dd6280d0bf450f01ad1bba6f9286.1539851865.git.baolin.wang@linaro.org \
--to=baolin.wang@linaro.org \
--cc=a.zummo@towertech.it \
--cc=alexandre.belloni@bootlin.com \
--cc=broonie@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rtc@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).