^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1) Kernel driver lm87
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2) ==================
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 4) Supported chips:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 5)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 6) * National Semiconductor LM87
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 7)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 8) Prefix: 'lm87'
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 9)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10) Addresses scanned: I2C 0x2c - 0x2e
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12) Datasheet: http://www.national.com/pf/LM/LM87.html
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14) * Analog Devices ADM1024
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16) Prefix: 'adm1024'
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18) Addresses scanned: I2C 0x2c - 0x2e
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20) Datasheet: https://www.analog.com/en/prod/0,2877,ADM1024,00.html
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23) Authors:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24) - Frodo Looijaard <frodol@dds.nl>,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25) - Philip Edelbrock <phil@netroedge.com>,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26) - Mark Studebaker <mdsxyz123@yahoo.com>,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27) - Stephen Rousset <stephen.rousset@rocketlogix.com>,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 28) - Dan Eaton <dan.eaton@rocketlogix.com>,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 29) - Jean Delvare <jdelvare@suse.de>,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 30) - Original 2.6 port Jeff Oliver
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 31)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 32) Description
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 33) -----------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 34)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 35) This driver implements support for the National Semiconductor LM87
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 36) and the Analog Devices ADM1024.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 37)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 38) The LM87 implements up to three temperature sensors, up to two fan
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 39) rotation speed sensors, up to seven voltage sensors, alarms, and some
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 40) miscellaneous stuff. The ADM1024 is fully compatible.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 41)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 42) Temperatures are measured in degrees Celsius. Each input has a high
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 43) and low alarm settings. A high limit produces an alarm when the value
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 44) goes above it, and an alarm is also produced when the value goes below
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 45) the low limit.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 46)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 47) Fan rotation speeds are reported in RPM (rotations per minute). An alarm is
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 48) triggered if the rotation speed has dropped below a programmable limit. Fan
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 49) readings can be divided by a programmable divider (1, 2, 4 or 8) to give
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 50) the readings more range or accuracy. Not all RPM values can accurately be
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 51) represented, so some rounding is done. With a divider of 2, the lowest
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 52) representable value is around 2600 RPM.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 53)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 54) Voltage sensors (also known as IN sensors) report their values in
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 55) volts. An alarm is triggered if the voltage has crossed a programmable
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 56) minimum or maximum limit. Note that minimum in this case always means
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 57) 'closest to zero'; this is important for negative voltage measurements.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 58)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 59) If an alarm triggers, it will remain triggered until the hardware register
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 60) is read at least once. This means that the cause for the alarm may
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 61) already have disappeared! Note that in the current implementation, all
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 62) hardware registers are read whenever any data is read (unless it is less
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 63) than 1.0 seconds since the last update). This means that you can easily
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 64) miss once-only alarms.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 65)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 66) The lm87 driver only updates its values each 1.0 seconds; reading it more
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 67) often will do no harm, but will return 'old' values.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 68)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 69)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 70) Hardware Configurations
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 71) -----------------------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 72)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 73) The LM87 has four pins which can serve one of two possible functions,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 74) depending on the hardware configuration.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 75)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 76) Some functions share pins, so not all functions are available at the same
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 77) time. Which are depends on the hardware setup. This driver normally
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 78) assumes that firmware configured the chip correctly. Where this is not
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 79) the case, platform code must set the I2C client's platform_data to point
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 80) to a u8 value to be written to the channel register.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 81)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 82) For reference, here is the list of exclusive functions:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 83) - in0+in5 (default) or temp3
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 84) - fan1 (default) or in6
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 85) - fan2 (default) or in7
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 86) - VID lines (default) or IRQ lines (not handled by this driver)