Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a86d6b23 authored by Baolin Wang's avatar Baolin Wang Committed by Alexandre Belloni
Browse files

rtc: sc27xx: Set wakeup capability before registering rtc device



Set wakeup capability before registering rtc device, in case the alarmtimer
can find one available rtc device.

Signed-off-by: default avatarBaolin Wang <baolin.wang@linaro.org>
Signed-off-by: default avatarAlexandre Belloni <alexandre.belloni@bootlin.com>
parent ef0f02fd
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -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;
}