summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAtsushi Nemoto <anemo@mba.ocn.ne.jp>2006-06-25 05:48:17 -0700
committerLinus Torvalds <torvalds@g5.osdl.org>2006-06-25 10:01:13 -0700
commit655066c3835e7b51794c4d56f042eb78b5a79f53 (patch)
tree25d2a104d5c77c58994f3c96aa08bf83bd1f8116 /include
parent1abb0dc92d706e8c73c7a62ca813738fe2259a7f (diff)
downloadrenesas_kernel-655066c3835e7b51794c4d56f042eb78b5a79f53.tar.gz
renesas_kernel-655066c3835e7b51794c4d56f042eb78b5a79f53.tar.bz2
renesas_kernel-655066c3835e7b51794c4d56f042eb78b5a79f53.zip
[PATCH] RTC: rtc-dev UIE emulation
Import genrtc's RTC UIE emulation (CONFIG_GEN_RTC_X) to rtc-dev driver with slight adjustments/refinements. This makes UIE-less rtc drivers work better with programs doing read/poll on /dev/rtc, such as hwclock. This emulation should not harm rtc drivers with UIE support, since rtc_dev_ioctl() calls underlaying rtc driver's ioctl() first. Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp> Acked-by: Alessandro Zummo <a.zummo@towertech.it> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/rtc.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/linux/rtc.h b/include/linux/rtc.h
index ab61cd1199f..43310760fe7 100644
--- a/include/linux/rtc.h
+++ b/include/linux/rtc.h
@@ -155,6 +155,16 @@ struct rtc_device
struct rtc_task *irq_task;
spinlock_t irq_task_lock;
int irq_freq;
+#ifdef CONFIG_RTC_INTF_DEV_UIE_EMUL
+ struct work_struct uie_task;
+ struct timer_list uie_timer;
+ /* Those fields are protected by rtc->irq_lock */
+ unsigned int oldsecs;
+ unsigned int irq_active:1;
+ unsigned int stop_uie_polling:1;
+ unsigned int uie_task_active:1;
+ unsigned int uie_timer_active:1;
+#endif
};
#define to_rtc_device(d) container_of(d, struct rtc_device, class_dev)