Module Name: src Committed By: christos Date: Thu Dec 28 23:28:01 UTC 2017
Modified Files: src/share/man/man4: Makefile Added Files: src/share/man/man4: am2315temp.4 si70xxtemp.4 Log Message: PR/52848: Brad Spencer: Man pages for new drivers To generate a diff of this commit: cvs rdiff -u -r1.647 -r1.648 src/share/man/man4/Makefile cvs rdiff -u -r0 -r1.1 src/share/man/man4/am2315temp.4 \ src/share/man/man4/si70xxtemp.4 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/share/man/man4/Makefile diff -u src/share/man/man4/Makefile:1.647 src/share/man/man4/Makefile:1.648 --- src/share/man/man4/Makefile:1.647 Mon Dec 18 20:46:57 2017 +++ src/share/man/man4/Makefile Thu Dec 28 18:28:00 2017 @@ -1,12 +1,11 @@ -# $NetBSD: Makefile,v 1.647 2017/12/19 01:46:57 christos Exp $ +# $NetBSD: Makefile,v 1.648 2017/12/28 23:28:00 christos Exp $ # @(#)Makefile 8.1 (Berkeley) 6/18/93 MAN= aac.4 ac97.4 acardide.4 aceride.4 acphy.4 \ adbbt.4 adbkbd.4 adbms.4 \ adc.4 adm1026hm.4 admtemp.4 adv.4 adw.4 age.4 agp.4 agr.4 ahb.4 ahc.4 \ - ahcisata.4 ahd.4 \ - aibs.4 alc.4 ale.4 alipm.4 altmem.4 altq.4 amdpm.4 amdtemp.4 amhphy.4 \ - amr.4 aps.4 asus.4 \ + ahcisata.4 ahd.4 \ aibs.4 alc.4 ale.4 alipm.4 altmem.4 altq.4 \ + am2315temp.4 amdpm.4 amdtemp.4 amhphy.4 amr.4 aps.4 asus.4 \ an.4 arcmsr.4 arcofi.4 aria.4 artsata.4 ata.4 atalk.4 ataraid.4 \ ath.4 athn.4 atphy.4 atppc.4 attimer.4 atw.4 \ auacer.4 audio.4 audiocs.4 auich.4 \ @@ -57,8 +56,8 @@ MAN= aac.4 ac97.4 acardide.4 aceride.4 a rnd.4 route.4 rs5c372rtc.4 rtk.4 rtsx.4 rtw.4 rtwn.4 rum.4 run.4 \ s390rtc.4 satalink.4 sbus.4 schide.4 \ scsi.4 sd.4 se.4 seeprom.4 sem.4 \ - ses.4 sf.4 sfb.4 sgsmix.4 shb.4 shmif.4 \ - shpcic.4 siisata.4 siop.4 sip.4 siside.4 sk.4 sl.4 slide.4 \ + ses.4 sf.4 sfb.4 sgsmix.4 shb.4 shmif.4 shpcic.4 si70xxtemp.4 \ + siisata.4 siop.4 sip.4 siside.4 sk.4 sl.4 slide.4 \ sm.4 smsh.4 sn.4 sony.4 spc.4 speaker.4 spif.4 sqphy.4 ss.4 \ st.4 ste.4 stge.4 sti.4 stpcide.4 sv.4 strip.4 \ svwsata.4 swsensor.4 swwdog.4 sysmon.4 \ Added files: Index: src/share/man/man4/am2315temp.4 diff -u /dev/null src/share/man/man4/am2315temp.4:1.1 --- /dev/null Thu Dec 28 18:28:01 2017 +++ src/share/man/man4/am2315temp.4 Thu Dec 28 18:28:00 2017 @@ -0,0 +1,90 @@ +.\" $NetBSD: am2315temp.4,v 1.1 2017/12/28 23:28:00 christos Exp $ +.\" +.\" Copyright (c) 2017 Brad Spencer <b...@anduin.eldar.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 December 28, 2017 +.Dt AM2315TEMP 4 +.Os +.Sh NAME +.Nm am2315temp +.Nd Driver for Aosong AM2315 sensor chip via I2C bus +.Sh SYNOPSIS +.Cd "am2315temp* at iic? addr 0x5c" +.Sh DESCRIPTION +The +.Nm +driver provides measurements from the AM2315 humidity/temperature +sensors via the +.Xr envsys 4 +framework. +The +.Nm +.Ar addr +argument selects the address at the +.Xr iic 4 +bus. The AM2315 has limits on how often the measurements can be read. +Adjustments to the number of times to take reading before considering +it valid, and the number of ticks to wait between readings can be +changed through +.Xr sysctl 8 +nodes. +.Pp +There are other oddities about the AM2315 that should be mentioned. +The datasheet says that the device should read no more often then +every 2 seconds, further, it also implies that a measurement is not +performed until the device is 1) awake 2) has been asked for a +measurement. From observation, it has been noted that it is possible +to ask for measurements more often than every 2 seconds, and actually +get something that looks to be valid. It may, in fact, be valid, but +it has also been noted that the measurements do not appear to change. +This implies that a measurement was done, and then returned time and +time again. It has also been noticed that if measurements are taken +very close to every 2 seconds, that sometimes the device will return a +I2C error on a read. If this happens a lot, increase +hw.am2315temp0.readticks a bit. +.Sh SYSCTL VARIABLES +The following +.Xr sysctl 3 +variables are provided: +.Bl -tag -width indent +.It hw.am2315temp0.readcount +The number of times to take a reading before considering it valid. This defaults to 2. +.It hw.am2315temp0.readticks +The number of ticks to wait in between readings. The default is 100. +.It hw.am2315temp0.debug +If the driver is compiled with AM2315_DEBUG, this node will appear and +can be used to set the debugging level. +.El +.Sh SEE ALSO +.Xr envsys 4 , +.Xr iic 4 , +.Xr envstat 8 , +.Xr sysctl 8 +.Sh HISTORY +The +.Nm +driver first appeared in +.Nx 8.0 . +.Sh AUTHORS +.An -nosplit +The +.Nm +driver was written by +.An Brad Spencer Aq Mt b...@anduin.eldar.org . +.Sh BUGS +The device does not appear to work with the +.Xr gpioiic 4 +bitbang controller. When tried, reads would not error, but no data +was returned. Index: src/share/man/man4/si70xxtemp.4 diff -u /dev/null src/share/man/man4/si70xxtemp.4:1.1 --- /dev/null Thu Dec 28 18:28:01 2017 +++ src/share/man/man4/si70xxtemp.4 Thu Dec 28 18:28:00 2017 @@ -0,0 +1,88 @@ +.\" $NetBSD: si70xxtemp.4,v 1.1 2017/12/28 23:28:00 christos Exp $ +.\" +.\" Copyright (c) 2017 Brad Spencer <b...@anduin.eldar.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 December 28, 2017 +.Dt SI70XXTEMP 4 +.Os +.Sh NAME +.Nm si70xxtemp +.Nd Driver for Silicon Labs SI7013/SI7020/SI7021 and HTU21D sensor chip via I2C bus +.Sh SYNOPSIS +.Cd "si70xxtemp* at iic? addr 0x40" +.Sh DESCRIPTION +The +.Nm +driver provides measurements from the SI7013/SI7020/SI7021 humidity/temperature +sensors via the +.Xr envsys 4 +framework. +The +.Nm +.Ar addr +argument selects the address at the +.Xr iic 4 +bus. +The resolution, heater control and crc validity can be changed through +.Xr sysctl 8 +nodes. +.Sh SYSCTL VARIABLES +The following +.Xr sysctl 3 +variables are provided: +.Bl -tag -width indent +.It hw.si70xxtemp0.resolutions +Lists the resolutions supported by the driver and chip. +.It hw.si70xxtemp0.resolution +Set the resolution, or number of bits, used for %RH and temperature. +Use one of the strings listed in hw.si70xxtemp.resolutions. +.It hw.si70xxtemp0.ignorecrc +If set, the crc calculation for %RH and temperature will be ignored. +.It hw.si70xxtemp0.vddok +If 1, the chip is getting enough power. +.It hw.si70xxtemp0.heateron +Turn the heater on and off. +.It hw.si70xxtemp0.heaterstrength +From 1 to 6, the amount of energy put into the heater. The higher the +number, the more power used. +.It hw.si70xxtemp0.debug +If the driver is compiled with SI70XX_DEBUG, this node will appear and +can be used to set the debugging level. +.It hw.si70xxtemp0.readattempts +To read %RH or temperature the driver uses a No Hold Master command. +This command needs to be sent to the device, a wait must then occur +and then another read command is sent to read back the values. +Depending on the resolution, and other factors, the wait time varies. +The driver will attempt to read back the values readattempts number of +times. The default is 15 which should be more than enough for most +purposes. There is an intial wait of 10,500 microseconds followed by +a additional 1,000 microseconds per read attempt. +.El +.Sh SEE ALSO +.Xr envsys 4 , +.Xr iic 4 , +.Xr envstat 8 , +.Xr sysctl 8 +.Sh HISTORY +The +.Nm +driver first appeared in +.Nx 8.0 . +.Sh AUTHORS +.An -nosplit +The +.Nm +driver was written by +.An Brad Spencer Aq Mt b...@anduin.eldar.org .