]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - share/man/man4/lm75.4
MFC r314183: add jedec_ts.4 to the list of manual pages
[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 May 11, 2014
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, like
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, like
144 .Li ARM ,
145 the DTS part for a
146 .Nm
147 device usually looks like:
148 .Bd -literal
149 i2c {
150
151         ...
152
153         lm750 {
154                 compatible = "national,lm75";
155                 i2c-address = <0x49>;
156         };
157 };
158 .Ed
159 .Pp
160 Where:
161 .Bl -tag -width ".Va i2c-address"
162 .It Va compatible
163 Should always be set to "national,lm75".
164 .It Va i2c-address
165 The
166 .Va i2c-address
167 property indicates which i2c address the
168 .Nm
169 is wired at.
170 .Nm
171 temperature sensors can be wired to 8 different addresses, allowing up to 8
172 sensors on the same
173 .Xr iicbus 4 .
174 .El
175 .Sh SEE ALSO
176 .Xr snmp_lm75 3 ,
177 .Xr fdt 4 ,
178 .Xr iic 4 ,
179 .Xr iicbus 4 ,
180 .Xr sysctl 8
181 .Sh HISTORY
182 The
183 .Nm
184 driver first appeared in
185 .Fx 11.0 .
186 .Sh AUTHORS
187 .An -nosplit
188 The
189 .Nm
190 driver and this manual page were written by
191 .An Luiz Otavio O Souza Aq Mt loos@FreeBSD.org .