diff options
Diffstat (limited to 'Documentation/rtc.txt')
-rw-r--r-- | Documentation/rtc.txt | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/Documentation/rtc.txt b/Documentation/rtc.txt index 8deffcd68cb8..9104c1062084 100644 --- a/Documentation/rtc.txt +++ b/Documentation/rtc.txt | |||
@@ -135,6 +135,30 @@ a high functionality RTC is integrated into the SOC. That system might read | |||
135 | the system clock from the discrete RTC, but use the integrated one for all | 135 | the system clock from the discrete RTC, but use the integrated one for all |
136 | other tasks, because of its greater functionality. | 136 | other tasks, because of its greater functionality. |
137 | 137 | ||
138 | SYSFS INTERFACE | ||
139 | --------------- | ||
140 | |||
141 | The sysfs interface under /sys/class/rtc/rtcN provides access to various | ||
142 | rtc attributes without requiring the use of ioctls. All dates and times | ||
143 | are in the RTC's timezone, rather than in system time. | ||
144 | |||
145 | date: RTC-provided date | ||
146 | hctosys: 1 if the RTC provided the system time at boot via the | ||
147 | CONFIG_RTC_HCTOSYS kernel option, 0 otherwise | ||
148 | max_user_freq: The maximum interrupt rate an unprivileged user may request | ||
149 | from this RTC. | ||
150 | name: The name of the RTC corresponding to this sysfs directory | ||
151 | since_epoch: The number of seconds since the epoch according to the RTC | ||
152 | time: RTC-provided time | ||
153 | wakealarm: The time at which the clock will generate a system wakeup | ||
154 | event. This is a one shot wakeup event, so must be reset | ||
155 | after wake if a daily wakeup is required. Format is either | ||
156 | seconds since the epoch or, if there's a leading +, seconds | ||
157 | in the future. | ||
158 | |||
159 | IOCTL INTERFACE | ||
160 | --------------- | ||
161 | |||
138 | The ioctl() calls supported by /dev/rtc are also supported by the RTC class | 162 | The ioctl() calls supported by /dev/rtc are also supported by the RTC class |
139 | framework. However, because the chips and systems are not standardized, | 163 | framework. However, because the chips and systems are not standardized, |
140 | some PC/AT functionality might not be provided. And in the same way, some | 164 | some PC/AT functionality might not be provided. And in the same way, some |
@@ -185,6 +209,8 @@ driver returns ENOIOCTLCMD. Some common examples: | |||
185 | hardware in the irq_set_freq function. If it isn't, return -EINVAL. If | 209 | hardware in the irq_set_freq function. If it isn't, return -EINVAL. If |
186 | you cannot actually change the frequency, do not define irq_set_freq. | 210 | you cannot actually change the frequency, do not define irq_set_freq. |
187 | 211 | ||
212 | * RTC_PIE_ON, RTC_PIE_OFF: the irq_set_state function will be called. | ||
213 | |||
188 | If all else fails, check out the rtc-test.c driver! | 214 | If all else fails, check out the rtc-test.c driver! |
189 | 215 | ||
190 | 216 | ||