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

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

rtc: brcmstb-waketimer: add range



Let the core handle the range.

Signed-off-by: default avatarAlexandre Belloni <alexandre.belloni@bootlin.com>
Reviewed-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
Signed-off-by: default avatarAlexandre Belloni <alexandre.belloni@bootlin.com>
parent 2abf286a
Loading
Loading
Loading
Loading
+1 −6
Original line number Diff line number Diff line
@@ -145,9 +145,6 @@ static int brcmstb_waketmr_settime(struct device *dev,

	sec = rtc_tm_to_time64(tm);

	if (sec > U32_MAX || sec < 0)
		return -EINVAL;

	writel_relaxed(sec, timer->base + BRCMSTB_WKTMR_COUNTER);

	return 0;
@@ -184,9 +181,6 @@ static int brcmstb_waketmr_setalarm(struct device *dev,
	else
		sec = 0;

	if (sec > U32_MAX || sec < 0)
		return -EINVAL;

	brcmstb_waketmr_set_alarm(timer, sec);

	return 0;
@@ -266,6 +260,7 @@ static int brcmstb_waketmr_probe(struct platform_device *pdev)
	register_reboot_notifier(&timer->reboot_notifier);

	timer->rtc->ops = &brcmstb_waketmr_ops;
	timer->rtc->range_max = U32_MAX;

	ret = rtc_register_device(timer->rtc);
	if (ret) {