2 * linux/include/asm-arm/rtc.h
4 * Copyright (C) 2003 Deep Blue Solutions Ltd.
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
18 void (*release
)(void);
19 int (*ioctl
)(unsigned int, unsigned long);
21 int (*read_time
)(struct rtc_time
*);
22 int (*set_time
)(struct rtc_time
*);
23 int (*read_alarm
)(struct rtc_wkalrm
*);
24 int (*set_alarm
)(struct rtc_wkalrm
*);
25 int (*proc
)(char *buf
);
28 void rtc_next_alarm_time(struct rtc_time
*, struct rtc_time
*, struct rtc_time
*);
29 void rtc_update(unsigned long, unsigned long);
30 int register_rtc(struct rtc_ops
*);
31 void unregister_rtc(struct rtc_ops
*);
33 static inline int rtc_periodic_alarm(struct rtc_time
*tm
)
35 return (tm
->tm_year
== -1) ||
36 ((unsigned)tm
->tm_mon
>= 12) ||
37 ((unsigned)(tm
->tm_mday
- 1) >= 31) ||
38 ((unsigned)tm
->tm_hour
> 23) ||
39 ((unsigned)tm
->tm_min
> 59) ||
40 ((unsigned)tm
->tm_sec
> 59);