summaryrefslogtreecommitdiffstats
path: root/man4/rtc.4
diff options
context:
space:
mode:
Diffstat (limited to 'man4/rtc.4')
-rw-r--r--man4/rtc.456
1 files changed, 28 insertions, 28 deletions
diff --git a/man4/rtc.4 b/man4/rtc.4
index 9619ff23c..e11844322 100644
--- a/man4/rtc.4
+++ b/man4/rtc.4
@@ -38,9 +38,9 @@ They usually won't offer the same functionality as the RTC from a PC/AT.
.SS RTC vs system clock
RTCs should not be confused with the system clock, which is
a software clock maintained by the kernel and used to implement
-.BR gettimeofday (2)
+.MR gettimeofday 2
and
-.BR time (2),
+.MR time 2 ,
as well as setting timestamps on files, and so on.
The system clock reports seconds and microseconds since a start point,
defined to be the POSIX Epoch: 1970-01-01 00:00:00 +0000 (UTC).
@@ -59,9 +59,9 @@ Systems without an RTC need to set the system clock using another clock,
maybe across the network or by entering that data manually.
.SS RTC functionality
RTCs can be read and written with
-.BR hwclock (8),
+.MR hwclock 8 ,
or directly with the
-.BR ioctl (2)
+.MR ioctl 2
requests listed below.
.P
Besides tracking the date and time, many RTCs can also generate
@@ -91,9 +91,9 @@ The
etc.)
device can be opened only once (until it is closed) and it is read-only.
On
-.BR read (2)
+.MR read 2
and
-.BR select (2)
+.MR select 2
the calling process is blocked until the next interrupt from that RTC
is received.
Following the interrupt, the process can read a long integer, of which
@@ -101,10 +101,10 @@ the least significant byte contains a bit mask encoding
the types of interrupt that occurred,
while the remaining 3 bytes contain the number of interrupts since the
last
-.BR read (2).
+.MR read 2 .
.SS ioctl(2) interface
The following
-.BR ioctl (2)
+.MR ioctl 2
requests are defined on file descriptors connected to RTC devices:
.TP
.B RTC_RD_TIME
@@ -129,16 +129,16 @@ struct rtc_time {
The fields in this structure have the same meaning and ranges as for the
.I tm
structure described in
-.BR gmtime (3).
+.MR gmtime 3 .
A pointer to this structure should be passed as the third
-.BR ioctl (2)
+.MR ioctl 2
argument.
.TP
.B RTC_SET_TIME
Sets this RTC's time to the time specified by the
.I rtc_time
structure pointed to by the third
-.BR ioctl (2)
+.MR ioctl 2
argument.
To set the
RTC's time the process must be privileged (i.e., have the
@@ -153,7 +153,7 @@ The alarm interrupt must be separately enabled or disabled using the
.BR RTC_AIE_ON ", " RTC_AIE_OFF
requests.
The third
-.BR ioctl (2)
+.MR ioctl 2
argument is a pointer to an
.I rtc_time
structure.
@@ -173,7 +173,7 @@ The periodic interrupt must be separately enabled or disabled using the
.BR RTC_PIE_ON ", " RTC_PIE_OFF
requests.
The third
-.BR ioctl (2)
+.MR ioctl 2
argument is an
.I "unsigned long\ *"
or an
@@ -193,7 +193,7 @@ capability) can set frequencies above the value specified in
.B RTC_AIE_OFF
Enable or disable the alarm interrupt, for RTCs that support alarms.
The third
-.BR ioctl (2)
+.MR ioctl 2
argument is ignored.
.TP
.B RTC_UIE_ON
@@ -202,7 +202,7 @@ argument is ignored.
Enable or disable the interrupt on every clock update,
for RTCs that support this once-per-second interrupt.
The third
-.BR ioctl (2)
+.MR ioctl 2
argument is ignored.
.TP
.B RTC_PIE_ON
@@ -211,7 +211,7 @@ argument is ignored.
Enable or disable the periodic interrupt,
for RTCs that support these periodic interrupts.
The third
-.BR ioctl (2)
+.MR ioctl 2
argument is ignored.
Only a privileged process (i.e., one having the
.B CAP_SYS_RESOURCE
@@ -234,7 +234,7 @@ With some RTCs,
these operations can be used to read or to set the RTC's Epoch,
respectively.
The third
-.BR ioctl (2)
+.MR ioctl 2
argument is an
.I "unsigned long\ *"
or an
@@ -288,7 +288,7 @@ and
.I tm_year
fields are also valid.
A pointer to this structure should be passed as the third
-.BR ioctl (2)
+.MR ioctl 2
argument.
.SH FILES
.TP
@@ -306,7 +306,7 @@ status of the (first) RTC.
.SH NOTES
When the kernel's system time is synchronized with an external
reference using
-.BR adjtimex (2)
+.MR adjtimex 2
it will update a designated RTC periodically every 11 minutes.
To do so, the kernel has to briefly turn off periodic interrupts;
this might affect programs using that RTC.
@@ -333,15 +333,15 @@ nonvolatile memory;
and other hardware
capabilities that are not currently exposed by this API.
.SH SEE ALSO
-.BR date (1),
-.BR adjtimex (2),
-.BR gettimeofday (2),
-.BR settimeofday (2),
-.BR stime (2),
-.BR time (2),
-.BR gmtime (3),
-.BR time (7),
-.BR hwclock (8)
+.MR date 1 ,
+.MR adjtimex 2 ,
+.MR gettimeofday 2 ,
+.MR settimeofday 2 ,
+.MR stime 2 ,
+.MR time 2 ,
+.MR gmtime 3 ,
+.MR time 7 ,
+.MR hwclock 8
.P
.I Documentation/rtc.txt
in the Linux kernel source tree