diff options
author | Alexandre Belloni <alexandre.belloni@bootlin.com> | 2018-02-17 16:58:40 +0300 |
---|---|---|
committer | Alexandre Belloni <alexandre.belloni@bootlin.com> | 2018-03-17 16:20:54 +0300 |
commit | 71db049e7355f31604e2c04b6cabb71d02bd487d (patch) | |
tree | 19743f8478631b847a11cf09690a6b4f28927e76 /include/linux/rtc.h | |
parent | 236b7187034e87bd46eb535ab4f276267ef66ee4 (diff) | |
download | linux-71db049e7355f31604e2c04b6cabb71d02bd487d.tar.xz |
rtc: Add RTC range
Add a way for drivers to inform the core of the supported date/time range.
The core can then check whether the date/time or alarm is in the range
before calling ->set_time, ->set_mmss or ->set_alarm. It returns -ERANGE
when the time is out of range.
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Diffstat (limited to 'include/linux/rtc.h')
-rw-r--r-- | include/linux/rtc.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/rtc.h b/include/linux/rtc.h index 3b65b201169c..c78528c394e5 100644 --- a/include/linux/rtc.h +++ b/include/linux/rtc.h @@ -150,6 +150,9 @@ struct rtc_device { bool nvram_old_abi; struct bin_attribute *nvram; + time64_t range_min; + timeu64_t range_max; + #ifdef CONFIG_RTC_INTF_DEV_UIE_EMUL struct work_struct uie_task; struct timer_list uie_timer; |