diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-03-15 21:59:21 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-03-15 21:59:21 -0400 |
commit | 21a32816b2e13eafb6d8a4589a84c6e629adc392 (patch) | |
tree | 8cfd2b8ffd355ef0954d6fef36aaffbc6fd53215 /Documentation | |
parent | 420c1c572d4ceaa2f37b6311b7017ac6cf049fe2 (diff) | |
parent | ea04683f592e6200b52e191b7e2842aedcfd88b6 (diff) |
Merge branch 'timers-rtc-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'timers-rtc-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
RTC: Fix up rtc.txt documentation to reflect changes to generic rtc layer
RTC: sa1100: Update the sa1100 RTC driver.
RTC: Fix the cross interrupt issue on rtc-test.
RTC: Remove UIE and PIE information from the sa1100 driver proc.
RTC: Include information about UIE and PIE in RTC driver proc.
RTC: Clean out UIE icotl implementations
RTC: Cleanup rtc_class_ops->update_irq_enable()
RTC: Cleanup rtc_class_ops->irq_set_freq()
RTC: Cleanup rtc_class_ops->irq_set_state
RTC: Initialize kernel state from RTC
Diffstat (limited to 'Documentation')
-rw-r--r-- | Documentation/rtc.txt | 29 |
1 files changed, 10 insertions, 19 deletions
diff --git a/Documentation/rtc.txt b/Documentation/rtc.txt index 9104c1062084..250160469d83 100644 --- a/Documentation/rtc.txt +++ b/Documentation/rtc.txt | |||
@@ -178,38 +178,29 @@ RTC class framework, but can't be supported by the older driver. | |||
178 | setting the longer alarm time and enabling its IRQ using a single | 178 | setting the longer alarm time and enabling its IRQ using a single |
179 | request (using the same model as EFI firmware). | 179 | request (using the same model as EFI firmware). |
180 | 180 | ||
181 | * RTC_UIE_ON, RTC_UIE_OFF ... if the RTC offers IRQs, it probably | 181 | * RTC_UIE_ON, RTC_UIE_OFF ... if the RTC offers IRQs, the RTC framework |
182 | also offers update IRQs whenever the "seconds" counter changes. | 182 | will emulate this mechanism. |
183 | If needed, the RTC framework can emulate this mechanism. | ||
184 | 183 | ||
185 | * RTC_PIE_ON, RTC_PIE_OFF, RTC_IRQP_SET, RTC_IRQP_READ ... another | 184 | * RTC_PIE_ON, RTC_PIE_OFF, RTC_IRQP_SET, RTC_IRQP_READ ... these icotls |
186 | feature often accessible with an IRQ line is a periodic IRQ, issued | 185 | are emulated via a kernel hrtimer. |
187 | at settable frequencies (usually 2^N Hz). | ||
188 | 186 | ||
189 | In many cases, the RTC alarm can be a system wake event, used to force | 187 | In many cases, the RTC alarm can be a system wake event, used to force |
190 | Linux out of a low power sleep state (or hibernation) back to a fully | 188 | Linux out of a low power sleep state (or hibernation) back to a fully |
191 | operational state. For example, a system could enter a deep power saving | 189 | operational state. For example, a system could enter a deep power saving |
192 | state until it's time to execute some scheduled tasks. | 190 | state until it's time to execute some scheduled tasks. |
193 | 191 | ||
194 | Note that many of these ioctls need not actually be implemented by your | 192 | Note that many of these ioctls are handled by the common rtc-dev interface. |
195 | driver. The common rtc-dev interface handles many of these nicely if your | 193 | Some common examples: |
196 | driver returns ENOIOCTLCMD. Some common examples: | ||
197 | 194 | ||
198 | * RTC_RD_TIME, RTC_SET_TIME: the read_time/set_time functions will be | 195 | * RTC_RD_TIME, RTC_SET_TIME: the read_time/set_time functions will be |
199 | called with appropriate values. | 196 | called with appropriate values. |
200 | 197 | ||
201 | * RTC_ALM_SET, RTC_ALM_READ, RTC_WKALM_SET, RTC_WKALM_RD: the | 198 | * RTC_ALM_SET, RTC_ALM_READ, RTC_WKALM_SET, RTC_WKALM_RD: gets or sets |
202 | set_alarm/read_alarm functions will be called. | 199 | the alarm rtc_timer. May call the set_alarm driver function. |
203 | 200 | ||
204 | * RTC_IRQP_SET, RTC_IRQP_READ: the irq_set_freq function will be called | 201 | * RTC_IRQP_SET, RTC_IRQP_READ: These are emulated by the generic code. |
205 | to set the frequency while the framework will handle the read for you | ||
206 | since the frequency is stored in the irq_freq member of the rtc_device | ||
207 | structure. Your driver needs to initialize the irq_freq member during | ||
208 | init. Make sure you check the requested frequency is in range of your | ||
209 | hardware in the irq_set_freq function. If it isn't, return -EINVAL. If | ||
210 | you cannot actually change the frequency, do not define irq_set_freq. | ||
211 | 202 | ||
212 | * RTC_PIE_ON, RTC_PIE_OFF: the irq_set_state function will be called. | 203 | * RTC_PIE_ON, RTC_PIE_OFF: These are also emulated by the generic code. |
213 | 204 | ||
214 | If all else fails, check out the rtc-test.c driver! | 205 | If all else fails, check out the rtc-test.c driver! |
215 | 206 | ||