xref: /netbsd-src/share/man/man4/si70xxtemp.4 (revision c38e7cc395b1472a774ff828e46123de44c628e9)
1.\" $NetBSD: si70xxtemp.4,v 1.4 2018/02/08 09:03:23 dholland Exp $
2.\"
3.\" Copyright (c) 2017 Brad Spencer <brad@anduin.eldar.org>
4.\"
5.\" Permission to use, copy, modify, and distribute this software for any
6.\" purpose with or without fee is hereby granted, provided that the above
7.\" copyright notice and this permission notice appear in all copies.
8.\"
9.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16.\"
17.Dd December 28, 2017
18.Dt SI70XXTEMP 4
19.Os
20.Sh NAME
21.Nm si70xxtemp
22.Nd Driver for Silicon Labs SI7013/SI7020/SI7021 and HTU21D sensor chip via I2C bus
23.Sh SYNOPSIS
24.Cd "si70xxtemp* at iic? addr 0x40"
25.Sh DESCRIPTION
26The
27.Nm
28driver provides measurements from the SI7013/SI7020/SI7021 humidity/temperature
29sensors via the
30.Xr envsys 4
31framework.
32The
33.Nm
34.Ar addr
35argument selects the address at the
36.Xr iic 4
37bus.
38The resolution, heater control and crc validity can be changed through
39.Xr sysctl 8
40nodes.
41.Sh SYSCTL VARIABLES
42The following
43.Xr sysctl 3
44variables are provided:
45.Bl -tag -width indent
46.It hw.si70xxtemp0.resolutions
47Lists the resolutions supported by the driver and chip.
48.It hw.si70xxtemp0.resolution
49Set the resolution, or number of bits, used for %RH and temperature.
50Use one of the strings listed in hw.si70xxtemp.resolutions.
51.It hw.si70xxtemp0.ignorecrc
52If set, the crc calculation for %RH and temperature will be ignored.
53.It hw.si70xxtemp0.vddok
54If 1, the chip is getting enough power.
55.It hw.si70xxtemp0.heateron
56Turn the heater on and off.
57.It hw.si70xxtemp0.heaterstrength
58From 1 to 6, the amount of energy put into the heater.
59The higher the number, the more power used.
60.It hw.si70xxtemp0.debug
61If the driver is compiled with
62.Dv SI70XX_DEBUG ,
63this node will appear and can be used to set the debugging level.
64.It hw.si70xxtemp0.readattempts
65To read %RH or temperature the driver uses a No Hold Master command.
66This command needs to be sent to the device, a wait must then occur
67and then another read command is sent to read back the values.
68Depending on the resolution, and other factors, the wait time varies.
69The driver will attempt to read back the values readattempts number of
70times.
71The default is 25 which should be more than enough for most purposes.
72There is an initial wait of 10,500 microseconds followed by
73a additional 1,000 microseconds per read attempt.
74.El
75.Sh SEE ALSO
76.Xr envsys 4 ,
77.Xr iic 4 ,
78.Xr envstat 8 ,
79.Xr sysctl 8
80.Sh HISTORY
81The
82.Nm
83driver first appeared in
84.Nx 8.0 .
85.Sh AUTHORS
86.An -nosplit
87The
88.Nm
89driver was written by
90.An Brad Spencer Aq Mt brad@anduin.eldar.org .
91