diff mbox series

[2/3] rtc: da9052: set range

Message ID 20200306073548.57579-2-alexandre.belloni@bootlin.com
State Accepted
Headers show
Series [1/3] rtc: da9052: convert to devm_rtc_allocate_device | expand

Commit Message

Alexandre Belloni March 6, 2020, 7:35 a.m. UTC
The da9052 is an rtc valid from 2000 to 2063 (max year is 63).

Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
---
 drivers/rtc/rtc-da9052.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Adam Thomson March 12, 2020, 5:16 p.m. UTC | #1
On 06 March 2020 07:36, Alexandre Belloni wrote:

> The da9052 is an rtc valid from 2000 to 2063 (max year is 63).
> 
> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>

Acked-by: Adam Thomson <Adam.Thomson.Opensource@diasemi.com>

> ---
>  drivers/rtc/rtc-da9052.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/rtc/rtc-da9052.c b/drivers/rtc/rtc-da9052.c
> index e159c5911122..27cde834a1b8 100644
> --- a/drivers/rtc/rtc-da9052.c
> +++ b/drivers/rtc/rtc-da9052.c
> @@ -303,6 +303,8 @@ static int da9052_rtc_probe(struct platform_device
> *pdev)
>  		return PTR_ERR(rtc->rtc);
> 
>  	rtc->rtc->ops = &da9052_rtc_ops;
> +	rtc->rtc->range_min = RTC_TIMESTAMP_BEGIN_2000;
> +	rtc->rtc->range_max = RTC_TIMESTAMP_END_2063;
> 
>  	ret = da9052_request_irq(rtc->da9052, DA9052_IRQ_ALARM, "ALM",
>  				da9052_rtc_irq, rtc);
> --
> 2.24.1
diff mbox series

Patch

diff --git a/drivers/rtc/rtc-da9052.c b/drivers/rtc/rtc-da9052.c
index e159c5911122..27cde834a1b8 100644
--- a/drivers/rtc/rtc-da9052.c
+++ b/drivers/rtc/rtc-da9052.c
@@ -303,6 +303,8 @@  static int da9052_rtc_probe(struct platform_device *pdev)
 		return PTR_ERR(rtc->rtc);
 
 	rtc->rtc->ops = &da9052_rtc_ops;
+	rtc->rtc->range_min = RTC_TIMESTAMP_BEGIN_2000;
+	rtc->rtc->range_max = RTC_TIMESTAMP_END_2063;
 
 	ret = da9052_request_irq(rtc->da9052, DA9052_IRQ_ALARM, "ALM",
 				da9052_rtc_irq, rtc);