Lines Matching defs:rtc
14 * nearly all computers) from user space. It exports the /dev/rtc
15 * interface supporting various ioctl() and also the /proc/rtc
34 #include <linux/rtc.h>
61 #define RTC_IS_OPEN 0x01 /* means /dev/rtc is in use */
66 static struct m48t35_rtc *rtc;
141 rtc->control |= M48T35_RTC_SET;
142 rtc->year = yrs;
143 rtc->month = mon;
144 rtc->date = day;
145 rtc->hour = hrs;
146 rtc->min = min;
147 rtc->sec = sec;
148 rtc->control &= ~M48T35_RTC_SET;
208 "rtc",
214 rtc = (struct m48t35_rtc *)
219 printk(KERN_ERR "rtc: cannot register misc device.\n");
222 if (!create_proc_read_entry("driver/rtc", 0, NULL, rtc_read_proc, NULL)) {
223 printk(KERN_ERR "rtc: cannot create /proc/rtc.\n");
237 remove_proc_entry ("rtc", NULL);
245 * Info exported via "/proc/rtc".
254 * Just emulate the standard /proc/rtc
301 rtc->control |= M48T35_RTC_READ;
302 rtc_tm->tm_sec = rtc->sec;
303 rtc_tm->tm_min = rtc->min;
304 rtc_tm->tm_hour = rtc->hour;
305 rtc_tm->tm_mday = rtc->date;
306 rtc_tm->tm_mon = rtc->month;
307 rtc_tm->tm_year = rtc->year;
308 rtc->control &= ~M48T35_RTC_READ;