14 #include <linux/module.h>
15 #include <linux/rtc.h>
23 #if defined(CONFIG_RTC_HCTOSYS_DEVICE)
38 return (rtc->
id == 0);
53 "rtc_time\t: %02d:%02d:%02d\n"
54 "rtc_date\t: %04d-%02d-%02d\n",
62 if ((
unsigned int)alrm.time.tm_hour <= 24)
66 if ((
unsigned int)alrm.time.tm_min <= 59)
70 if ((
unsigned int)alrm.time.tm_sec <= 59)
76 if ((
unsigned int)alrm.time.tm_year <= 200)
77 seq_printf(seq,
"%04d-", alrm.time.tm_year + 1900);
80 if ((
unsigned int)alrm.time.tm_mon <= 11)
81 seq_printf(seq,
"%02d-", alrm.time.tm_mon + 1);
84 if (alrm.time.tm_mday && (
unsigned int)alrm.time.tm_mday <= 31)
89 alrm.enabled ?
"yes" :
"no");
91 alrm.pending ?
"yes" :
"no");
94 seq_printf(seq,
"periodic IRQ enabled\t: %s\n",
96 seq_printf(seq,
"periodic IRQ frequency\t: %d\n",
98 seq_printf(seq,
"max user IRQ frequency\t: %d\n",
105 ops->
proc(rtc->
dev.parent, seq);
124 static int rtc_proc_release(
struct inode *inode,
struct file *file)
132 .open = rtc_proc_open,
135 .release = rtc_proc_release,
140 if (is_rtc_hctosys(rtc))
146 if (is_rtc_hctosys(rtc))