xref: /OK3568_Linux_fs/kernel/Documentation/ABI/testing/rtc-cdev (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593SmuzhiyunWhat:		/dev/rtcX
2*4882a593SmuzhiyunDate:		April 2005
3*4882a593SmuzhiyunKernelVersion:	2.6.12
4*4882a593SmuzhiyunContact:	linux-rtc@vger.kernel.org
5*4882a593SmuzhiyunDescription:
6*4882a593Smuzhiyun		The ioctl interface to drivers for real-time clocks (RTCs).
7*4882a593Smuzhiyun		Following actions are supported:
8*4882a593Smuzhiyun
9*4882a593Smuzhiyun		* RTC_RD_TIME, RTC_SET_TIME: Read or set the RTC time. Time
10*4882a593Smuzhiyun		  format is a Gregorian calendar date and 24 hour wall clock
11*4882a593Smuzhiyun		  time.
12*4882a593Smuzhiyun
13*4882a593Smuzhiyun		* RTC_AIE_ON, RTC_AIE_OFF: Enable or disable the alarm interrupt
14*4882a593Smuzhiyun		  for RTCs that support alarms
15*4882a593Smuzhiyun
16*4882a593Smuzhiyun		* RTC_ALM_READ, RTC_ALM_SET: Read or set the alarm time for
17*4882a593Smuzhiyun		  RTCs that support alarms. Can be set upto 24 hours in the
18*4882a593Smuzhiyun		  future. Requires a separate RTC_AIE_ON call to enable the
19*4882a593Smuzhiyun		  alarm interrupt. (Prefer to use RTC_WKALM_*)
20*4882a593Smuzhiyun
21*4882a593Smuzhiyun		* RTC_WKALM_RD, RTC_WKALM_SET: For RTCs that support a more
22*4882a593Smuzhiyun		  powerful interface, which can issue alarms beyond 24 hours and
23*4882a593Smuzhiyun		  enable IRQs in the same request.
24*4882a593Smuzhiyun
25*4882a593Smuzhiyun		* RTC_PIE_ON, RTC_PIE_OFF: Enable or disable the periodic
26*4882a593Smuzhiyun		  interrupt for RTCs that support periodic interrupts.
27*4882a593Smuzhiyun
28*4882a593Smuzhiyun		* RTC_UIE_ON, RTC_UIE_OFF: Enable or disable the update
29*4882a593Smuzhiyun		  interrupt for RTCs that support it.
30*4882a593Smuzhiyun
31*4882a593Smuzhiyun		* RTC_IRQP_READ, RTC_IRQP_SET: Read or set the frequency for
32*4882a593Smuzhiyun		  periodic interrupts for RTCs that support periodic interrupts.
33*4882a593Smuzhiyun		  Requires a separate RTC_PIE_ON call to enable the periodic
34*4882a593Smuzhiyun		  interrupts.
35*4882a593Smuzhiyun
36*4882a593Smuzhiyun		* RTC_VL_READ: Read the voltage inputs status of the RTC when
37*4882a593Smuzhiyun		  supported. The value is a bit field of RTC_VL_*, giving the
38*4882a593Smuzhiyun		  status of the main and backup voltages.
39*4882a593Smuzhiyun
40*4882a593Smuzhiyun		* RTC_VL_CLEAR: Clear the voltage status of the RTC. Some RTCs
41*4882a593Smuzhiyun		  need user interaction when the backup power provider is
42*4882a593Smuzhiyun		  replaced or charged to be able to clear the status.
43*4882a593Smuzhiyun
44*4882a593Smuzhiyun		The ioctl() calls supported by the older /dev/rtc interface are
45*4882a593Smuzhiyun		also supported by the newer RTC class framework. However,
46*4882a593Smuzhiyun		because the chips and systems are not standardized, some PC/AT
47*4882a593Smuzhiyun		functionality might not be provided. And in the same way, some
48*4882a593Smuzhiyun		newer features -- including those enabled by ACPI -- are exposed
49*4882a593Smuzhiyun		by the RTC class framework, but can't be supported by the older
50*4882a593Smuzhiyun		driver.
51