Lines Matching defs:rtc
12 #include <linux/rtc.h>
16 #include "rtc-core.h"
21 static bool is_rtc_hctosys(struct rtc_device *rtc)
26 size = snprintf(name, NAME_SIZE, "rtc%d", rtc->id);
33 static bool is_rtc_hctosys(struct rtc_device *rtc)
35 return (rtc->id == 0);
42 struct rtc_device *rtc = seq->private;
43 const struct rtc_class_ops *ops = rtc->ops;
47 err = rtc_read_time(rtc, &tm);
55 err = rtc_read_alarm(rtc, &alrm);
64 (rtc->uie_rtctimer.enabled) ? "yes" : "no");
66 (rtc->pie_enabled) ? "yes" : "no");
68 rtc->irq_freq);
70 rtc->max_user_freq);
76 ops->proc(rtc->dev.parent, seq);
81 void rtc_proc_add_device(struct rtc_device *rtc)
83 if (is_rtc_hctosys(rtc))
84 proc_create_single_data("driver/rtc", 0, NULL, rtc_proc_show,
85 rtc);
88 void rtc_proc_del_device(struct rtc_device *rtc)
90 if (is_rtc_hctosys(rtc))
91 remove_proc_entry("driver/rtc", NULL);