xref: /netbsd-src/share/man/man4/si70xxtemp.4 (revision 901e7e84758515fbf39dfc064cb0b45ab146d8b0)
1.\" $NetBSD: si70xxtemp.4,v 1.7 2021/11/12 15:12:11 brad 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, HTU21D and SHT21 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.Pp
61Some HTU21D chips do not support a heater register.
62These chips are detected and the heater features of the driver will
63be disabled.
64.It hw.si70xxtemp0.debug
65If the driver is compiled with
66.Dv SI70XX_DEBUG ,
67this node will appear and can be used to set the debugging level.
68.It hw.si70xxtemp0.readattempts
69To read %RH or temperature the driver uses a No Hold Master command.
70This command needs to be sent to the device, a wait must then occur
71and then another read command is sent to read back the values.
72Depending on the resolution, and other factors, the wait time varies.
73The driver will attempt to read back the values readattempts number of
74times.
75The default is 40 which should be enough for most purposes.
76There is an initial wait of 10,500 microseconds followed by
77a additional 1,000 microseconds per read attempt.
78.El
79.Sh SEE ALSO
80.Xr envsys 4 ,
81.Xr iic 4 ,
82.Xr envstat 8 ,
83.Xr sysctl 8
84.Sh HISTORY
85The
86.Nm
87driver first appeared in
88.Nx 8.0 .
89.Sh AUTHORS
90.An -nosplit
91The
92.Nm
93driver was written by
94.An Brad Spencer Aq Mt brad@anduin.eldar.org .
95