99 lines · plain
1Kernel driver lm732==================3 4Supported chips:5 6 * Texas Instruments LM737 8 Prefix: 'lm73'9 10 Addresses scanned: I2C 0x48, 0x49, 0x4a, 0x4c, 0x4d, and 0x4e11 12 Datasheet: Publicly available at the Texas Instruments website13 14 https://www.ti.com/product/lm7315 16 17Author: Guillaume Ligneul <guillaume.ligneul@gmail.com>18 19Documentation: Chris Verges <kg4ysn@gmail.com>20 21 22Description23-----------24 25The LM73 is a digital temperature sensor. All temperature values are26given in degrees Celsius.27 28Measurement Resolution Support29------------------------------30 31The LM73 supports four resolutions, defined in terms of degrees C per32LSB: 0.25, 0.125, 0.0625, and 0.3125. Changing the resolution mode33affects the conversion time of the LM73's analog-to-digital converter.34From userspace, the desired resolution can be specified as a function of35conversion time via the 'update_interval' sysfs attribute for the36device. This attribute will normalize ranges of input values to the37maximum times defined for the resolution in the datasheet.38 39 ============= ============= ============40 Resolution Conv. Time Input Range41 (C/LSB) (msec) (msec)42 ============= ============= ============43 0.25 14 0..1444 0.125 28 15..2845 0.0625 56 29..5646 0.03125 112 57..infinity47 ============= ============= ============48 49The following examples show how the 'update_interval' attribute can be50used to change the conversion time::51 52 $ echo 0 > update_interval53 $ cat update_interval54 1455 $ cat temp1_input56 2425057 58 $ echo 22 > update_interval59 $ cat update_interval60 2861 $ cat temp1_input62 2412563 64 $ echo 56 > update_interval65 $ cat update_interval66 5667 $ cat temp1_input68 2406269 70 $ echo 85 > update_interval71 $ cat update_interval72 11273 $ cat temp1_input74 2403175 76As shown here, the lm73 driver automatically adjusts any user input for77'update_interval' via a step function. Reading back the78'update_interval' value after a write operation will confirm the79conversion time actively in use.80 81Mathematically, the resolution can be derived from the conversion time82via the following function:83 84 g(x) = 0.250 * [log(x/14) / log(2)]85 86where 'x' is the output from 'update_interval' and 'g(x)' is the87resolution in degrees C per LSB.88 89Alarm Support90-------------91 92The LM73 features a simple over-temperature alarm mechanism. This93feature is exposed via the sysfs attributes.94 95The attributes 'temp1_max_alarm' and 'temp1_min_alarm' are flags96provided by the LM73 that indicate whether the measured temperature has97passed the 'temp1_max' and 'temp1_min' thresholds, respectively. These98values _must_ be read to clear the registers on the LM73.99