diff options
author | John Stultz <john.stultz@linaro.org> | 2011-02-11 20:45:40 -0500 |
---|---|---|
committer | John Stultz <john.stultz@linaro.org> | 2011-02-17 17:59:41 -0500 |
commit | 6e57b1d6a8d8ed1998229b71c102be1997e397c6 (patch) | |
tree | 941ae7ba1c168af5603bb47d3bbfba33a8f2760c /include/linux/rtc.h | |
parent | 516373b8b60fa4152334b6b6f2ece0f178c540ce (diff) |
RTC: Revert UIE emulation removal
Uwe pointed out that my alarm based UIE emulation is not sufficient
to replace the older timer/polling based UIE emulation on devices
where there is no alarm irq. This causes rtc devices without alarms
to return -EINVAL to UIE ioctls. The fix is to re-instate the old
timer/polling method for devices without alarm irqs.
This patch reverts the following commits:
042620a018afcfba1d678062b62e46 - Remove UIE emulation
1daeddd5962acad1bea55e524fc0fa - Cleanup removed UIE emulation declaration
b5cc8ca1c9c3a37eaddf709b2fd3e1 - Remove Kconfig symbol for UIE emulation
The emulation mode will still need to be wired-in with a following
patch before it will work.
CC: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
CC: Thomas Gleixner <tglx@linutronix.de>
Reported-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: John Stultz <john.stultz@linaro.org>
Diffstat (limited to 'include/linux/rtc.h')
-rw-r--r-- | include/linux/rtc.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/include/linux/rtc.h b/include/linux/rtc.h index a0b639f8e805..80408e711bed 100644 --- a/include/linux/rtc.h +++ b/include/linux/rtc.h | |||
@@ -203,6 +203,18 @@ struct rtc_device | |||
203 | struct hrtimer pie_timer; /* sub second exp, so needs hrtimer */ | 203 | struct hrtimer pie_timer; /* sub second exp, so needs hrtimer */ |
204 | int pie_enabled; | 204 | int pie_enabled; |
205 | struct work_struct irqwork; | 205 | struct work_struct irqwork; |
206 | |||
207 | |||
208 | #ifdef CONFIG_RTC_INTF_DEV_UIE_EMUL | ||
209 | struct work_struct uie_task; | ||
210 | struct timer_list uie_timer; | ||
211 | /* Those fields are protected by rtc->irq_lock */ | ||
212 | unsigned int oldsecs; | ||
213 | unsigned int uie_irq_active:1; | ||
214 | unsigned int stop_uie_polling:1; | ||
215 | unsigned int uie_task_active:1; | ||
216 | unsigned int uie_timer_active:1; | ||
217 | #endif | ||
206 | }; | 218 | }; |
207 | #define to_rtc_device(d) container_of(d, struct rtc_device, dev) | 219 | #define to_rtc_device(d) container_of(d, struct rtc_device, dev) |
208 | 220 | ||
@@ -235,6 +247,8 @@ extern int rtc_irq_set_freq(struct rtc_device *rtc, | |||
235 | struct rtc_task *task, int freq); | 247 | struct rtc_task *task, int freq); |
236 | extern int rtc_update_irq_enable(struct rtc_device *rtc, unsigned int enabled); | 248 | extern int rtc_update_irq_enable(struct rtc_device *rtc, unsigned int enabled); |
237 | extern int rtc_alarm_irq_enable(struct rtc_device *rtc, unsigned int enabled); | 249 | extern int rtc_alarm_irq_enable(struct rtc_device *rtc, unsigned int enabled); |
250 | extern int rtc_dev_update_irq_enable_emul(struct rtc_device *rtc, | ||
251 | unsigned int enabled); | ||
238 | 252 | ||
239 | void rtc_aie_update_irq(void *private); | 253 | void rtc_aie_update_irq(void *private); |
240 | void rtc_uie_update_irq(void *private); | 254 | void rtc_uie_update_irq(void *private); |