summaryrefslogtreecommitdiffstats
path: root/include/linux/rtc.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/rtc.h')
-rw-r--r--include/linux/rtc.h17
1 files changed, 8 insertions, 9 deletions
diff --git a/include/linux/rtc.h b/include/linux/rtc.h
index c8bb4a2b48c3..c1089fe5344a 100644
--- a/include/linux/rtc.h
+++ b/include/linux/rtc.h
@@ -87,15 +87,16 @@ struct rtc_class_ops {
87 int (*set_offset)(struct device *, long offset); 87 int (*set_offset)(struct device *, long offset);
88}; 88};
89 89
90struct rtc_device;
91
90struct rtc_timer { 92struct rtc_timer {
91 struct timerqueue_node node; 93 struct timerqueue_node node;
92 ktime_t period; 94 ktime_t period;
93 void (*func)(void *private_data); 95 void (*func)(struct rtc_device *rtc);
94 void *private_data; 96 struct rtc_device *rtc;
95 int enabled; 97 int enabled;
96}; 98};
97 99
98
99/* flags */ 100/* flags */
100#define RTC_DEV_BUSY 0 101#define RTC_DEV_BUSY 0
101 102
@@ -138,7 +139,6 @@ struct rtc_device {
138 139
139 bool registered; 140 bool registered;
140 141
141 struct nvmem_device *nvmem;
142 /* Old ABI support */ 142 /* Old ABI support */
143 bool nvram_old_abi; 143 bool nvram_old_abi;
144 struct bin_attribute *nvram; 144 struct bin_attribute *nvram;
@@ -173,8 +173,6 @@ extern struct rtc_device *devm_rtc_device_register(struct device *dev,
173 struct module *owner); 173 struct module *owner);
174struct rtc_device *devm_rtc_allocate_device(struct device *dev); 174struct rtc_device *devm_rtc_allocate_device(struct device *dev);
175int __rtc_register_device(struct module *owner, struct rtc_device *rtc); 175int __rtc_register_device(struct module *owner, struct rtc_device *rtc);
176extern void devm_rtc_device_unregister(struct device *dev,
177 struct rtc_device *rtc);
178 176
179extern int rtc_read_time(struct rtc_device *rtc, struct rtc_time *tm); 177extern int rtc_read_time(struct rtc_device *rtc, struct rtc_time *tm);
180extern int rtc_set_time(struct rtc_device *rtc, struct rtc_time *tm); 178extern int rtc_set_time(struct rtc_device *rtc, struct rtc_time *tm);
@@ -200,11 +198,12 @@ extern int rtc_dev_update_irq_enable_emul(struct rtc_device *rtc,
200 unsigned int enabled); 198 unsigned int enabled);
201 199
202void rtc_handle_legacy_irq(struct rtc_device *rtc, int num, int mode); 200void rtc_handle_legacy_irq(struct rtc_device *rtc, int num, int mode);
203void rtc_aie_update_irq(void *private); 201void rtc_aie_update_irq(struct rtc_device *rtc);
204void rtc_uie_update_irq(void *private); 202void rtc_uie_update_irq(struct rtc_device *rtc);
205enum hrtimer_restart rtc_pie_update_irq(struct hrtimer *timer); 203enum hrtimer_restart rtc_pie_update_irq(struct hrtimer *timer);
206 204
207void rtc_timer_init(struct rtc_timer *timer, void (*f)(void *p), void *data); 205void rtc_timer_init(struct rtc_timer *timer, void (*f)(struct rtc_device *r),
206 struct rtc_device *rtc);
208int rtc_timer_start(struct rtc_device *rtc, struct rtc_timer *timer, 207int rtc_timer_start(struct rtc_device *rtc, struct rtc_timer *timer,
209 ktime_t expires, ktime_t period); 208 ktime_t expires, ktime_t period);
210void rtc_timer_cancel(struct rtc_device *rtc, struct rtc_timer *timer); 209void rtc_timer_cancel(struct rtc_device *rtc, struct rtc_timer *timer);