Skip to content

Commit

Permalink
rtc: sc27xx: Remove interrupts disable and clear in probe()
Browse files Browse the repository at this point in the history
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>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
  • Loading branch information
Baolin Wang authored and Alexandre Belloni committed Oct 25, 2018
1 parent 7db5adf commit b2ddc48
Showing 1 changed file with 0 additions and 20 deletions.
20 changes: 0 additions & 20 deletions drivers/rtc/rtc-sc27xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit b2ddc48

Please sign in to comment.