mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
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>
This commit is contained in:
parent
236b718703
commit
71db049e73
4 changed files with 37 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue