diff options
-rw-r--r-- | share/man/man4/Makefile | 4 | ||||
-rw-r--r-- | share/man/man4/gpiodcf.4 | 104 |
2 files changed, 106 insertions, 2 deletions
diff --git a/share/man/man4/Makefile b/share/man/man4/Makefile index 9ad73c5060f..5fc7d59e606 100644 --- a/share/man/man4/Makefile +++ b/share/man/man4/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.468 2008/11/27 14:08:07 kevlo Exp $ +# $OpenBSD: Makefile,v 1.469 2008/11/28 17:45:38 mbalmer Exp $ MAN= aac.4 ac97.4 acphy.4 \ acpi.4 acpiac.4 acpiasus.4 acpibat.4 acpibtn.4 acpicpu.4 acpidock.4 \ @@ -21,7 +21,7 @@ MAN= aac.4 ac97.4 acphy.4 \ eso.4 ess.4 et.4 etphy.4 ex.4 exphy.4 \ faith.4 fd.4 fdc.4 fins.4 fintek.4 fms.4 fpa.4 fxp.4 gdt.4 \ gentbi.4 gem.4 gif.4 \ - glenv.4 gpio.4 gpioiic.4 gpioow.4 gpr.4 gre.4 gscsio.4 gtp.4 \ + glenv.4 gpio.4 gpiodcf.4 gpioiic.4 gpioow.4 gpr.4 gre.4 gscsio.4 gtp.4 \ hifn.4 hil.4 hilid.4 hilkbd.4 hilms.4 hme.4 hotplug.4 hsq.4 \ ichiic.4 ichwdt.4 icmp.4 icmp6.4 icsphy.4 ifmedia.4 \ iha.4 iic.4 inet.4 inet6.4 inphy.4 iop.4 iophy.4 ioprbs.4 \ diff --git a/share/man/man4/gpiodcf.4 b/share/man/man4/gpiodcf.4 new file mode 100644 index 00000000000..516b8a1967d --- /dev/null +++ b/share/man/man4/gpiodcf.4 @@ -0,0 +1,104 @@ +.\" $OpenBSD: gpiodcf.4,v 1.1 2008/11/28 17:45:38 mbalmer Exp $ +.\" +.\" Copyright (c) 2008 Alexander Yurchenko <mbalmer@openbsd.org> +.\" +.\" Permission to use, copy, modify, and distribute this software for any +.\" purpose with or without fee is hereby granted, provided that the above +.\" copyright notice and this permission notice appear in all copies. +.\" +.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +.\" +.Dd $Mdocdate: November 28 2008 $ +.Dt GPIODCF 4 +.Os +.Sh NAME +.Nm gpiodcf +.Nd DCF77/HBG timedelta sensor through GPIO pin +.Sh SYNOPSIS +.Cd "gpiodcf* at gpio? offset 0 mask 0x1" +.Cd "gpiodcf* at gpio?" +.Sh DESCRIPTION +The +.Nm +driver allows to decode the DCF77 or HBG time signal code using one GPIO pin. +The pin is used as a data signal. +The GPIO pin must be able to read an input. +.Pp +The pin number can be specified in the kernel configuration with the +.Ar offset +locator. +The +.Ar mask +locator should always be 0x1 in this case. +The +.Ar offset +and +.Ar mask +can also be specified when +.Nm +is attached at runtime using the +.Dv GPIOATTACH +.Xr ioctl 2 +on the +.Xr gpio 4 +device. +.Pp +.Nm +implements a timedelta sensor and the delta (in nanoseconds) between the +received time information and the local time can be accessed through the +.Xr sysctl 8 +interface. +The clock type is indicated in the sensor description: +.Bl -tag -width "CRITICALXX" -offset indent +.It DCF77 +German DCF77 time signal station +(77.5 kHz longwave transmitter located in Mainflingen near Frankfurt). +.It HBG +Swiss HBG time signal station +(75 kHz longwave transmitter located in Prangins near Geneva). +.It Unknown +The clock type has not been determined. +.El +.Pp +The quality of the timedelta is reported as the sensor status: +.Bl -tag -width "CRITICALXX" -offset indent +.It UNKNOWN +No valid time information has been received yet. +.It OK +The time information is valid and the timedelta is safe to use for +applications like +.Xr ntpd 8 . +.It WARN +The time information is still valid, but no new time information has been +decoded for at least 5 minutes due to a reception or parity error. +The timedelta should be used with care. +.It CRITICAL +No valid time information has been received for more than 15 minutes since +the sensor state degraded from OK to WARN. +This is an indication that hardware should be checked +to see if it is still functional. +The timedelta will eventually degrade to a lie +as all computer internal clocks have a drift. +.El +.Sh SEE ALSO +.Xr intro 4 , +.Xr gpio 4 , +.Xr ntpd 8 , +.Xr sysctl 8 +.Sh HISTORY +The +.Nm +driver first appeared in +.Ox 4.5 . +.Sh AUTHORS +.An -nosplit +The +.Nm +driver was written by +.An Marc Balmer Aq mbalmer@openbsd.org . |