lkml.org 
[lkml]   [2018]   [May]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 2/7] rtc: rx8581: add RTC range
Date
The rx8581 can support dates from 01/01/2000 to 31/12/2099.

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

diff --git a/drivers/rtc/rtc-rx8581.c b/drivers/rtc/rtc-rx8581.c
index c64911a08531..c5ffd30ca672 100644
--- a/drivers/rtc/rtc-rx8581.c
+++ b/drivers/rtc/rtc-rx8581.c
@@ -291,6 +291,8 @@ static int rx8581_probe(struct i2c_client *client,
return PTR_ERR(rx8581->rtc);

rx8581->rtc->ops = &rx8581_rtc_ops;
+ rx8581->rtc->range_min = RTC_TIMESTAMP_BEGIN_2000;
+ rx8581->rtc->range_max = RTC_TIMESTAMP_END_2099;

return rtc_register_device(rx8581->rtc);
}
--
2.17.0
\
 
 \ /
  Last update: 2018-05-17 22:36    [W:0.038 / U:0.172 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site