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

Commit b9a1d801 authored by Alexandre Belloni's avatar Alexandre Belloni
Browse files

rtc: wm831x: set range



The wm831x has a 32bit second counter.

Acked-by: default avatarCharles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: default avatarAlexandre Belloni <alexandre.belloni@bootlin.com>
parent b599db3a
Loading
Loading
Loading
Loading
+10 −6
Original line number Diff line number Diff line
@@ -436,12 +436,16 @@ static int wm831x_rtc_probe(struct platform_device *pdev)

	device_init_wakeup(&pdev->dev, 1);

	wm831x_rtc->rtc = devm_rtc_device_register(&pdev->dev, "wm831x",
					      &wm831x_rtc_ops, THIS_MODULE);
	if (IS_ERR(wm831x_rtc->rtc)) {
		ret = PTR_ERR(wm831x_rtc->rtc);
		goto err;
	}
	wm831x_rtc->rtc = devm_rtc_allocate_device(&pdev->dev);
	if (IS_ERR(wm831x_rtc->rtc))
		return PTR_ERR(wm831x_rtc->rtc);

	wm831x_rtc->rtc->ops = &wm831x_rtc_ops;
	wm831x_rtc->rtc->range_max = U32_MAX;

	ret = rtc_register_device(wm831x_rtc->rtc);
	if (ret)
		return ret;

	ret = devm_request_threaded_irq(&pdev->dev, alm_irq, NULL,
				wm831x_alm_irq,