Skip to content

Commit

Permalink
rtc: sc27xx: Set wakeup capability before registering rtc device
Browse files Browse the repository at this point in the history
Set wakeup capability before registering rtc device, in case the alarmtimer
can find one available rtc device.

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 ef0f02f commit a86d6b2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/rtc/rtc-sc27xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -631,16 +631,18 @@ static int sprd_rtc_probe(struct platform_device *pdev)
return ret;
}

device_init_wakeup(&pdev->dev, 1);

rtc->rtc->ops = &sprd_rtc_ops;
rtc->rtc->range_min = 0;
rtc->rtc->range_max = 5662310399LL;
ret = rtc_register_device(rtc->rtc);
if (ret) {
dev_err(&pdev->dev, "failed to register rtc device\n");
device_init_wakeup(&pdev->dev, 0);
return ret;
}

device_init_wakeup(&pdev->dev, 1);
return 0;
}

Expand Down

0 comments on commit a86d6b2

Please sign in to comment.