diff options
author | Alessandro Zummo <a.zummo@towertech.it> | 2009-01-04 15:00:54 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-01-04 16:33:20 -0500 |
commit | 099e657625e801adf82054c8050dde5aceb68452 (patch) | |
tree | d6c28df68ab390fa237b8339c6081e4db380aa5f /include/linux/rtc.h | |
parent | 54566b2c1594c2326a645a3551f9d989f7ba3c5e (diff) |
rtc: add alarm/update irq interfaces
Add standard interfaces for alarm/update irqs enabling. Drivers are no
more required to implement equivalent ioctl code as rtc-dev will provide
it.
UIE emulation should now be handled correctly and will work even for those
RTC drivers who cannot be configured to do both UIE and AIE.
Signed-off-by: Alessandro Zummo <a.zummo@towertech.it>
Cc: David Brownell <david-b@pacbell.net>
Cc: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Cc: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux/rtc.h')
-rw-r--r-- | include/linux/rtc.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/include/linux/rtc.h b/include/linux/rtc.h index 91f597ad6acc..4046b75563c1 100644 --- a/include/linux/rtc.h +++ b/include/linux/rtc.h | |||
@@ -145,6 +145,8 @@ struct rtc_class_ops { | |||
145 | int (*irq_set_state)(struct device *, int enabled); | 145 | int (*irq_set_state)(struct device *, int enabled); |
146 | int (*irq_set_freq)(struct device *, int freq); | 146 | int (*irq_set_freq)(struct device *, int freq); |
147 | int (*read_callback)(struct device *, int data); | 147 | int (*read_callback)(struct device *, int data); |
148 | int (*alarm_irq_enable)(struct device *, unsigned int enabled); | ||
149 | int (*update_irq_enable)(struct device *, unsigned int enabled); | ||
148 | }; | 150 | }; |
149 | 151 | ||
150 | #define RTC_DEVICE_NAME_SIZE 20 | 152 | #define RTC_DEVICE_NAME_SIZE 20 |
@@ -181,7 +183,7 @@ struct rtc_device | |||
181 | struct timer_list uie_timer; | 183 | struct timer_list uie_timer; |
182 | /* Those fields are protected by rtc->irq_lock */ | 184 | /* Those fields are protected by rtc->irq_lock */ |
183 | unsigned int oldsecs; | 185 | unsigned int oldsecs; |
184 | unsigned int irq_active:1; | 186 | unsigned int uie_irq_active:1; |
185 | unsigned int stop_uie_polling:1; | 187 | unsigned int stop_uie_polling:1; |
186 | unsigned int uie_task_active:1; | 188 | unsigned int uie_task_active:1; |
187 | unsigned int uie_timer_active:1; | 189 | unsigned int uie_timer_active:1; |
@@ -216,6 +218,10 @@ extern int rtc_irq_set_state(struct rtc_device *rtc, | |||
216 | struct rtc_task *task, int enabled); | 218 | struct rtc_task *task, int enabled); |
217 | extern int rtc_irq_set_freq(struct rtc_device *rtc, | 219 | extern int rtc_irq_set_freq(struct rtc_device *rtc, |
218 | struct rtc_task *task, int freq); | 220 | struct rtc_task *task, int freq); |
221 | extern int rtc_update_irq_enable(struct rtc_device *rtc, unsigned int enabled); | ||
222 | extern int rtc_alarm_irq_enable(struct rtc_device *rtc, unsigned int enabled); | ||
223 | extern int rtc_dev_update_irq_enable_emul(struct rtc_device *rtc, | ||
224 | unsigned int enabled); | ||
219 | 225 | ||
220 | typedef struct rtc_task { | 226 | typedef struct rtc_task { |
221 | void (*func)(void *private_data); | 227 | void (*func)(void *private_data); |