Skip to contentSkip to conversation

Documentation: rtc: move ioctl to ABI

PATCH Applied Aishwarya Pant 2 participants 4 messages Jan 1, 2018 – Jan 11, 2018

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

cover Documentation: rtc: move ioctl to ABI

Two documentation changes in rtc:
1) Minor change to add file permissions to sysfs interface
2) Move ioctl interface to Documentation/ABI

Aishwarya Pant (2):
Documentation: rtc: add sysfs file permissions
Documentation: rtc: move iotcl interface documentation to ABI

 Documentation/ABI/testing/rtc-cdev        | 42 ++++++++++++++++++++++++++
 Documentation/ABI/testing/sysfs-class-rtc | 44 ++++++++++++++-------------
 Documentation/rtc.txt                     | 49 ++-----------------------------
 3 files changed, 67 insertions(+), 68 deletions(-)
 create mode 100644 Documentation/ABI/testing/rtc-cdev
Signature · 1 line
2.15.1
#1 lore raw

PATCH 1/2 Documentation: rtc: add sysfs file permissions

Annotate the sysfs interface of rtc with file specific permissions (RO/RW).

---
 Documentation/ABI/testing/sysfs-class-rtc | 44 ++++++++++++++++---------------
 1 file changed, 23 insertions(+), 21 deletions(-)
Documentation/ABI/testing/sysfs-class-rtc +23 -21
index df2eca7e2e77..5083841b03d4 100644
@@ -18,14 +18,14 @@ Date:		March 2006
 KernelVersion:	2.6.17
 Contact:	[email protected]
 Description:
-		RTC-provided date in YYYY-MM-DD format
+		(RO) RTC-provided date in YYYY-MM-DD format
 
 What:		/sys/class/rtc/rtcX/hctosys
 Date:		September 2009
 KernelVersion:	2.6.32
 Contact:	[email protected]
 Description:
-		1 if the RTC provided the system time at boot via the
+		(RO) 1 if the RTC provided the system time at boot via the
 		CONFIG_RTC_HCTOSYS kernel option, 0 otherwise
 
 What:		/sys/class/rtc/rtcX/max_user_freq
@@ -33,7 +33,7 @@ Date:		October 2007
 KernelVersion:	2.6.24
 Contact:	[email protected]
 Description:
-		The maximum interrupt rate an unprivileged user may request
+		(RW) The maximum interrupt rate an unprivileged user may request
 		from this RTC.
 
 What:		/sys/class/rtc/rtcX/name
@@ -41,58 +41,60 @@ Date:		March 2006
 KernelVersion:	2.6.17
 Contact:	[email protected]
 Description:
-		The name of the RTC corresponding to this sysfs directory
+		(RO) The name of the RTC corresponding to this sysfs directory
 
 What:		/sys/class/rtc/rtcX/range
 Date:		January 2018
 KernelVersion:	4.16
 Contact:	[email protected]
 Description:
-		Valid time range for the RTC, as seconds from epoch, formatted
-		as [min, max]
+		(RO) Valid time range for the RTC, as seconds from epoch,
+		formatted as [min, max]
 
 What:		/sys/class/rtc/rtcX/since_epoch
 Date:		March 2006
 KernelVersion:	2.6.17
 Contact:	[email protected]
 Description:
-		RTC-provided time as the number of seconds since the epoch
+		(RO) RTC-provided time as the number of seconds since the epoch
 
 What:		/sys/class/rtc/rtcX/time
 Date:		March 2006
 KernelVersion:	2.6.17
 Contact:	[email protected]
 Description:
-		RTC-provided time in 24-hour notation (hh:mm:ss)
+		(RO) RTC-provided time in 24-hour notation (hh:mm:ss)
 
 What:		/sys/class/rtc/rtcX/*/nvmem
 Date:		February 2016
 KernelVersion:	4.6
 Contact:	[email protected]
 Description:
-		The non volatile storage exported as a raw file, as described in
-		Documentation/nvmem/nvmem.txt
+		(RW) The non volatile storage exported as a raw file, as
+		described in Documentation/nvmem/nvmem.txt
 
 What:		/sys/class/rtc/rtcX/offset
 Date:		February 2016
 KernelVersion:	4.6
 Contact:	[email protected]
 Description:
-		The amount which the rtc clock has been adjusted in firmware.
-		Visible only if the driver supports clock offset adjustment.
-		The unit is parts per billion, i.e. The number of clock ticks
-		which are added to or removed from the rtc's base clock per
-		billion ticks. A positive value makes a day pass more slowly,
-		longer, and a negative value makes a day pass more quickly.
+		(RW) The amount which the rtc clock has been adjusted in
+		firmware. Visible only if the driver supports clock offset
+		adjustment. The unit is parts per billion, i.e. The number of
+		clock ticks which are added to or removed from the rtc's base
+		clock per billion ticks. A positive value makes a day pass more
+		slowly, longer, and a negative value makes a day pass more
+		quickly.
 
 What:		/sys/class/rtc/rtcX/wakealarm
 Date:		February 2007
 KernelVersion:	2.6.20
 Contact:	[email protected]
 Description:
-		The time at which the clock will generate a system wakeup event.
-		This is a one shot wakeup event, so must be reset after wake if
-		a daily wakeup is required. Format is seconds since the epoch by
-		default, or if there's a leading +, seconds in the future, or if
-		there is a leading +=, seconds ahead of the current alarm.
+		(RW) The time at which the clock will generate a system wakeup
+		event. This is a one shot wakeup event, so must be reset after
+		wake if a daily wakeup is required. Format is seconds since the
+		epoch by default, or if there's a leading +, seconds in the
+		future, or if there is a leading +=, seconds ahead of the
+		current alarm.
 
Signature · 1 line
2.15.1
#2 lore raw

PATCH 2/2 Documentation: rtc: move iotcl interface documentation to ABI

In reply to Aishwarya Pant

The ioctl interface should be in Documentation/ABI along with the rest of the interfaces.

---
 Documentation/ABI/testing/rtc-cdev | 42 ++++++++++++++++++++++++++++++++
 Documentation/rtc.txt              | 49 ++------------------------------------
 2 files changed, 44 insertions(+), 47 deletions(-)
 create mode 100644 Documentation/ABI/testing/rtc-cdev
Documentation/ABI/testing/rtc-cdev new file +42 -0
new file mode 100644
index 000000000000..97447283f13b
@@ -0,0 +1,42 @@
+What:		/dev/rtcX
+Date:		April 2005
+KernelVersion:	2.6.12
+Contact:	[email protected]
+Description:
+		The ioctl interface to drivers for real-time clocks (RTCs).
+		Following actions are supported:
+
+		* RTC_RD_TIME, RTC_SET_TIME: Read or set the RTC time. Time
+		  format is a Gregorian calendar date and 24 hour wall clock
+		  time.
+
+		* RTC_AIE_ON, RTC_AIE_OFF: Enable or disable the alarm interrupt
+		  for RTCs that support alarms
+
+		* RTC_ALM_READ, RTC_ALM_SET: Read or set the alarm time for
+		  RTCs that support alarms. Can be set upto 24 hours in the
+		  future. Requires a separate RTC_AIE_ON call to enable the
+		  alarm interrupt. (Prefer to use RTC_WKALM_*)
+
+		* RTC_WKALM_RD, RTC_WKALM_SET: For RTCs that support a more
+		  powerful interface, which can issue alarms beyond 24 hours and
+		  enable IRQs in the same request.
+
+		* RTC_PIE_ON, RTC_PIE_OFF: Enable or disable the periodic
+		  interrupt for RTCs that support periodic interrupts.
+
+		* RTC_UIE_ON, RTC_UIE_OFF: Enable or disable the update
+		  interrupt for RTCs that support it.
+
+		* RTC_IRQP_READ, RTC_IRQP_SET: Read or set the frequency for
+		  periodic interrupts for RTCs that support periodic interrupts.
+		  Requires a separate RTC_PIE_ON call to enable the periodic
+		  interrupts.
+
+		The ioctl() calls supported by the older /dev/rtc interface are
+		also supported by the newer RTC class framework. However,
+		because the chips and systems are not standardized, some PC/AT
+		functionality might not be provided. And in the same way, some
+		newer features -- including those enabled by ACPI -- are exposed
+		by the RTC class framework, but can't be supported by the older
+		driver.
Documentation/rtc.txt +2 -47

52 lines not on this page · raw message

Signature · 1 line
2.15.1
#3 lore raw
In reply to Aishwarya Pant
Quoted 8 lines · Aishwarya Pant

Two documentation changes in rtc:
1) Minor change to add file permissions to sysfs interface
2) Move ioctl interface to Documentation/ABI

Aishwarya Pant (2):
Documentation: rtc: add sysfs file permissions
Documentation: rtc: move iotcl interface documentation to ABI

Applied, thanks.

Signature · 3 lines
Alexandre Belloni, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com