]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - share/man/man4/lm75.4
disk(9): Fix a few mandoc related errors
[FreeBSD/FreeBSD.git] / share / man / man4 / lm75.4
1 .\"
2 .\" Copyright (c) 2014 Luiz Otavio O Souza <loos@freebsd.org>
3 .\" All rights reserved.
4 .\"
5 .\" Redistribution and use in source and binary forms, with or without
6 .\" modification, are permitted provided that the following conditions
7 .\" are met:
8 .\" 1. Redistributions of source code must retain the above copyright
9 .\"    notice, this list of conditions and the following disclaimer.
10 .\" 2. Redistributions in binary form must reproduce the above copyright
11 .\"    notice, this list of conditions and the following disclaimer in the
12 .\"    documentation and/or other materials provided with the distribution.
13 .\"
14 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
15 .\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
16 .\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
17 .\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
18 .\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
19 .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
20 .\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
21 .\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22 .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
23 .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24 .\"
25 .\" $FreeBSD$
26 .\"
27 .Dd December 26, 2017
28 .Dt LM75 4
29 .Os
30 .Sh NAME
31 .Nm lm75
32 .Nd lm75 i2c digital temperature sensor driver
33 .Sh SYNOPSIS
34 .Cd "device iic"
35 .Cd "device iicbus"
36 .Cd "device lm75"
37 .Sh DESCRIPTION
38 The
39 .Nm
40 driver provides access to sensor data and configuration over the
41 .Xr iicbus 4 .
42 .Pp
43 It provides an easy and simple way to check the functionality of an i2c bus
44 as it provides read and write access to the
45 .Nm
46 configuration register.
47 .Pp
48 The access to
49 .Nm
50 data is made via the
51 .Xr sysctl 8
52 interface:
53 .Bd -literal
54 dev.lm75.0.%desc: LM75 temperature sensor
55 dev.lm75.0.%driver: lm75
56 dev.lm75.0.%location: addr=0x49
57 dev.lm75.0.%pnpinfo: name=lm750 compat=national,lm75
58 dev.lm75.0.%parent: iicbus3
59 dev.lm75.0.temperature: 27.1C
60 dev.lm75.0.thyst: 75.0C
61 dev.lm75.0.tos: 80.0C
62 dev.lm75.0.faults: 1
63 dev.lm75.0.mode: comparator
64 dev.lm75.0.polarity: active-low
65 dev.lm75.0.shutdown: 0
66 .Ed
67 .Bl -tag -width ".Va dev.lm75.%d.temperature"
68 .It Va dev.lm75.%d.temperature
69 Is the read-only value of the current temperature read by the sensor.
70 .It Va dev.lm75.%d.thyst
71 Sets the hysteresis temperature.
72 Once the temperature gets over the overtemperature shutdown value (tos)
73 it needs to drop below the hysteresis temperature to disable the output
74 (interrupt) pin again.
75 .It Va dev.lm75.%d.tos
76 Sets the overtemperature shutdown value.
77 Once the temperature gets over this value the output pin will be enabled.
78 The way the output (interrupt) pin works, depends on the mode configuration.
79 .It Va dev.lm75.%d.faults
80 Is the number of faults that must occur consecutively to activate the
81 interrupt (output) pin.
82 It can be set to 1, 2, 4, and 6.
83 .It Va dev.lm75.%d.mode
84 Sets the operation mode for the sensor interrupt pin.
85 It can be set to 'comparator' (default) or 'interrupt'.
86 .It Va dev.lm75.%d.polarity
87 Sets the polarity of the sensor interrupt pin.
88 It can be set to 'active-low' (default) or 'active-high'.
89 Please note that the output pin is an open-drain output and it needs a
90 proper pull-up resistor to work.
91 .It Va dev.lm75.%d.shutdown
92 When set to '1' it shuts down the sensor.
93 The temperature conversion stops but the sensor remains with its i2c bus
94 active, i.e., it can be woken up by setting this option to '0' again.
95 .El
96 .Pp
97 Please check the
98 .Nm
99 datasheet for more details.
100 .Pp
101 When used together with
102 .Xr snmp_lm75 3
103 it allows the monitoring of
104 .Nm
105 temperature data over SNMP.
106 .Pp
107 The
108 .Nm
109 driver supports both the low and the high resolution models.
110 .Pp
111 The low resolution model (lm75) provides a 9 bit output with the LSB
112 representing 0.5C.
113 .Pp
114 The high resolution model (lm75a) provides an 11 bit output with the LSB
115 representing 0.125C.
116 .Pp
117 The driver tries to auto-detect the
118 .Nm
119 model, but the detection of some
120 .Nm
121 clones may not work reliably.
122 .Pp
123 On a
124 .Xr device.hints 5
125 based system, such as
126 .Li MIPS ,
127 these values are configurable for
128 .Nm :
129 .Bl -tag -width ".Va hint.lm75.%d.addr"
130 .It Va hint.lm75.%d.at
131 Is the
132 .Xr iicbus 4
133 you are attaching to.
134 .It Va hint.lm75.%d.addr
135 Is the
136 .Nm
137 i2c address on the
138 .Xr iicbus 4 .
139 .El
140 .Pp
141 On a
142 .Xr FDT 4
143 based system, such as
144 .Li ARM ,
145 the DTS part for a
146 .Nm
147 device usually looks like:
148 .Bd -literal
149 i2c {
150         /* Properties describing the controller appear here. */
151         ...
152         lm750@49 {
153                 compatible = "national,lm75";
154                 reg = <0x49>;
155         };
156 };
157 .Ed
158 .Pp
159 Where:
160 .Bl -tag -width ".Va compatible"
161 .It Va compatible
162 Should always be set to "national,lm75".
163 .It Va reg
164 Indicates which 7-bit i2c address the
165 .Nm
166 is wired at.
167 .Nm
168 temperature sensors can be wired to 8 different addresses, allowing up to 8
169 sensors on the same
170 .Xr iicbus 4 .
171 .El
172 .Sh SEE ALSO
173 .Xr snmp_lm75 3 ,
174 .Xr fdt 4 ,
175 .Xr iic 4 ,
176 .Xr iicbus 4 ,
177 .Xr sysctl 8
178 .Sh HISTORY
179 The
180 .Nm
181 driver first appeared in
182 .Fx 11.0 .
183 .Sh AUTHORS
184 .An -nosplit
185 The
186 .Nm
187 driver and this manual page were written by
188 .An Luiz Otavio O Souza Aq Mt loos@FreeBSD.org .