blob: 8af059dcb64239c180040cb0dac450df89748422 [file] [log] [blame]
Chris Verges8c14d122013-01-05 01:41:19 -08001Kernel driver lm73
2==================
3
4Supported chips:
5 * Texas Instruments LM73
6 Prefix: 'lm73'
7 Addresses scanned: I2C 0x48, 0x49, 0x4a, 0x4c, 0x4d, and 0x4e
8 Datasheet: Publicly available at the Texas Instruments website
9 http://www.ti.com/product/lm73
10
11Author: Guillaume Ligneul <guillaume.ligneul@gmail.com>
12Documentation: Chris Verges <kg4ysn@gmail.com>
13
14
15Description
16-----------
17
18The LM73 is a digital temperature sensor. All temperature values are
19given in degrees Celsius.
20
21Measurement Resolution Support
22------------------------------
23
24The LM73 supports four resolutions, defined in terms of degrees C per
25LSB: 0.25, 0.125, 0.0625, and 0.3125. Changing the resolution mode
26affects the conversion time of the LM73's analog-to-digital converter.
27From userspace, the desired resolution can be specified as a function of
28conversion time via the 'update_interval' sysfs attribute for the
29device. This attribute will normalize ranges of input values to the
30maximum times defined for the resolution in the datasheet.
31
32 Resolution Conv. Time Input Range
33 (C/LSB) (msec) (msec)
34 --------------------------------------
35 0.25 14 0..14
36 0.125 28 15..28
37 0.0625 56 29..56
38 0.03125 112 57..infinity
39 --------------------------------------
40
41The following examples show how the 'update_interval' attribute can be
42used to change the conversion time:
43
44 $ echo 0 > update_interval
45 $ cat update_interval
46 14
47 $ cat temp1_input
48 24250
49
50 $ echo 22 > update_interval
51 $ cat update_interval
52 28
53 $ cat temp1_input
54 24125
55
56 $ echo 56 > update_interval
57 $ cat update_interval
58 56
59 $ cat temp1_input
60 24062
61
62 $ echo 85 > update_interval
63 $ cat update_interval
64 112
65 $ cat temp1_input
66 24031
67
68As shown here, the lm73 driver automatically adjusts any user input for
69'update_interval' via a step function. Reading back the
70'update_interval' value after a write operation will confirm the
71conversion time actively in use.
72
73Mathematically, the resolution can be derived from the conversion time
74via the following function:
75
76 g(x) = 0.250 * [log(x/14) / log(2)]
77
78where 'x' is the output from 'update_interval' and 'g(x)' is the
79resolution in degrees C per LSB.
Chris Verges2bf92332013-01-05 01:41:20 -080080
81Alarm Support
82-------------
83
84The LM73 features a simple over-temperature alarm mechanism. This
85feature is exposed via the sysfs attributes.
86
87The attributes 'temp1_max_alarm' and 'temp1_min_alarm' are flags
88provided by the LM73 that indicate whether the measured temperature has
89passed the 'temp1_max' and 'temp1_min' thresholds, respectively. These
90values _must_ be read to clear the registers on the LM73.