diff options
author | Aishwarya Pant <aishpant@gmail.com> | 2018-01-01 12:31:24 -0500 |
---|---|---|
committer | Alexandre Belloni <alexandre.belloni@free-electrons.com> | 2018-01-11 18:20:41 -0500 |
commit | 796c0ad79ee65abb9c891e44ccd6e347a6be486f (patch) | |
tree | 50cad654b08258997087d3376b8554bfaa441862 /Documentation/rtc.txt | |
parent | d5bc5cde844ebecbc6fac2d65d23610cfd3affc3 (diff) |
Documentation: rtc: move iotcl interface documentation to ABI
The ioctl interface should be in Documentation/ABI along with the rest
of the interfaces.
Signed-off-by: Aishwarya Pant <aishpant@gmail.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Diffstat (limited to 'Documentation/rtc.txt')
-rw-r--r-- | Documentation/rtc.txt | 49 |
1 files changed, 2 insertions, 47 deletions
diff --git a/Documentation/rtc.txt b/Documentation/rtc.txt index f521262cdc85..a129acf38537 100644 --- a/Documentation/rtc.txt +++ b/Documentation/rtc.txt | |||
@@ -136,50 +136,5 @@ a high functionality RTC is integrated into the SOC. That system might read | |||
136 | the system clock from the discrete RTC, but use the integrated one for all | 136 | the system clock from the discrete RTC, but use the integrated one for all |
137 | other tasks, because of its greater functionality. | 137 | other tasks, because of its greater functionality. |
138 | 138 | ||
139 | IOCTL interface | 139 | Check out tools/testing/selftests/timers/rtctest.c for an example usage of the |
140 | --------------- | 140 | ioctl interface. |
141 | |||
142 | The ioctl() calls supported by /dev/rtc are also supported by the RTC class | ||
143 | framework. However, because the chips and systems are not standardized, | ||
144 | some PC/AT functionality might not be provided. And in the same way, some | ||
145 | newer features -- including those enabled by ACPI -- are exposed by the | ||
146 | RTC class framework, but can't be supported by the older driver. | ||
147 | |||
148 | * RTC_RD_TIME, RTC_SET_TIME ... every RTC supports at least reading | ||
149 | time, returning the result as a Gregorian calendar date and 24 hour | ||
150 | wall clock time. To be most useful, this time may also be updated. | ||
151 | |||
152 | * RTC_AIE_ON, RTC_AIE_OFF, RTC_ALM_SET, RTC_ALM_READ ... when the RTC | ||
153 | is connected to an IRQ line, it can often issue an alarm IRQ up to | ||
154 | 24 hours in the future. (Use RTC_WKALM_* by preference.) | ||
155 | |||
156 | * RTC_WKALM_SET, RTC_WKALM_RD ... RTCs that can issue alarms beyond | ||
157 | the next 24 hours use a slightly more powerful API, which supports | ||
158 | setting the longer alarm time and enabling its IRQ using a single | ||
159 | request (using the same model as EFI firmware). | ||
160 | |||
161 | * RTC_UIE_ON, RTC_UIE_OFF ... if the RTC offers IRQs, the RTC framework | ||
162 | will emulate this mechanism. | ||
163 | |||
164 | * RTC_PIE_ON, RTC_PIE_OFF, RTC_IRQP_SET, RTC_IRQP_READ ... these icotls | ||
165 | are emulated via a kernel hrtimer. | ||
166 | |||
167 | In many cases, the RTC alarm can be a system wake event, used to force | ||
168 | Linux out of a low power sleep state (or hibernation) back to a fully | ||
169 | operational state. For example, a system could enter a deep power saving | ||
170 | state until it's time to execute some scheduled tasks. | ||
171 | |||
172 | Note that many of these ioctls are handled by the common rtc-dev interface. | ||
173 | Some common examples: | ||
174 | |||
175 | * RTC_RD_TIME, RTC_SET_TIME: the read_time/set_time functions will be | ||
176 | called with appropriate values. | ||
177 | |||
178 | * RTC_ALM_SET, RTC_ALM_READ, RTC_WKALM_SET, RTC_WKALM_RD: gets or sets | ||
179 | the alarm rtc_timer. May call the set_alarm driver function. | ||
180 | |||
181 | * RTC_IRQP_SET, RTC_IRQP_READ: These are emulated by the generic code. | ||
182 | |||
183 | * RTC_PIE_ON, RTC_PIE_OFF: These are also emulated by the generic code. | ||
184 | |||
185 | If all else fails, check out the tools/testing/selftests/timers/rtctest.c test! | ||