| 1 | Kernel driver `lm87.o' |
|---|
| 2 | ====================== |
|---|
| 3 | |
|---|
| 4 | Status: Complete and somewhat tested |
|---|
| 5 | |
|---|
| 6 | Supported chips: |
|---|
| 7 | * National Semiconductors LM87 |
|---|
| 8 | Prefix `lm87' |
|---|
| 9 | Addresses scanned: I2C 0x2c - 0x2f (inclusive) |
|---|
| 10 | |
|---|
| 11 | Authors: Frodo Looijaard <frodol@dds.nl>, |
|---|
| 12 | Philip Edelbrock <phil@netroedge.com>, |
|---|
| 13 | Mark Studebaker <mdsxyz123@yahoo.com>, |
|---|
| 14 | and Stephen Rousset <stephen.rousset@rocketlogix.com> |
|---|
| 15 | |
|---|
| 16 | |
|---|
| 17 | Module Parameters |
|---|
| 18 | ----------------- |
|---|
| 19 | |
|---|
| 20 | * force: short array (min = 1, max = 48) |
|---|
| 21 | List of adapter,address pairs to boldly assume to be present |
|---|
| 22 | * force_lm87: short array (min = 1, max = 48) |
|---|
| 23 | List of adapter,address pairs which are unquestionably assumed to contain |
|---|
| 24 | a `lm87' chip |
|---|
| 25 | * ignore: short array (min = 1, max = 48) |
|---|
| 26 | List of adapter,address pairs not to scan |
|---|
| 27 | * ignore_range: short array (min = 1, max = 48) |
|---|
| 28 | List of adapter,start-addr,end-addr triples not to scan |
|---|
| 29 | * probe: short array (min = 1, max = 48) |
|---|
| 30 | List of adapter,address pairs to scan additionally |
|---|
| 31 | * probe_range: short array (min = 1, max = 48) |
|---|
| 32 | List of adapter,start-addr,end-addr triples to scan additionally |
|---|
| 33 | |
|---|
| 34 | |
|---|
| 35 | Description |
|---|
| 36 | ----------- |
|---|
| 37 | |
|---|
| 38 | This driver implements support for the National Semiconductors LM87. |
|---|
| 39 | |
|---|
| 40 | The LM87 implements up to three temperature sensors, up to two FAN |
|---|
| 41 | rotation speed sensors, up to seven voltage sensors, alarms, and some |
|---|
| 42 | miscellaneous stuff. |
|---|
| 43 | |
|---|
| 44 | Temperatures are measured in degrees Celcius. Each input has a high |
|---|
| 45 | and low alarm settings. A high limit produces an alarm when the value |
|---|
| 46 | goes above it, and an alarm is also produced when the value goes below |
|---|
| 47 | the low limit. |
|---|
| 48 | |
|---|
| 49 | FAN rotation speeds are reported in RPM (rotations per minute). An alarm is |
|---|
| 50 | triggered if the rotation speed has dropped below a programmable limit. FAN |
|---|
| 51 | readings can be divided by a programmable divider (1, 2, 4 or 8) to give |
|---|
| 52 | the readings more range or accuracy. This is important because some FANs |
|---|
| 53 | report only one 'tick' each rotation, while others report two - making |
|---|
| 54 | all readings twice as high. Not all RPM values can accurately be represented, |
|---|
| 55 | so some rounding is done. With a divider of 2, the lowest representable |
|---|
| 56 | value is around 2600 RPM. |
|---|
| 57 | |
|---|
| 58 | Voltage sensors (also known as IN sensors) report their values in |
|---|
| 59 | volts. An alarm is triggered if the voltage has crossed a programmable |
|---|
| 60 | minimum or maximum limit. Note that minimum in this case always means |
|---|
| 61 | 'closest to zero'; this is important for negative voltage |
|---|
| 62 | measurements. |
|---|
| 63 | |
|---|
| 64 | If an alarm triggers, it will remain triggered until the hardware register |
|---|
| 65 | is read at least once. This means that the cause for the alarm may |
|---|
| 66 | already have disappeared! Note that in the current implementation, all |
|---|
| 67 | hardware registers are read whenever any data is read (unless it is less |
|---|
| 68 | than 2.0 seconds since the last update). This means that you can easily |
|---|
| 69 | miss once-only alarms. |
|---|
| 70 | |
|---|
| 71 | The LM87 only updates its values each 1.0 seconds; reading it more |
|---|
| 72 | often will do no harm, but will return 'old' values. |
|---|
| 73 | |
|---|
| 74 | |
|---|
| 75 | Hardware Configurations |
|---|
| 76 | ----------------------- |
|---|
| 77 | |
|---|
| 78 | The LM87 has four pins which can serve one of two possible functions, |
|---|
| 79 | depending on the hardware configuration. These pins are: |
|---|
| 80 | |
|---|
| 81 | Vccp2/D2- (pin 17) |
|---|
| 82 | +2.5V(IN0)/D2+ (pin 18) |
|---|
| 83 | FAN1/AIN1 (pin 5) |
|---|
| 84 | FAN2/AIN2 (pin 6) |
|---|
| 85 | |
|---|
| 86 | The most common configuration is to use the values shown here on the |
|---|
| 87 | left (Vccp2, 2.5V, FAN1, and FAN2). However, for a third temperature |
|---|
| 88 | sensor, it is possible to do away with Vccp2 and 2.5V (IN0) for the |
|---|
| 89 | second external temp diode inputs. Strangely, it seems that you can |
|---|
| 90 | monitor the core voltage of the second processor or its temperature, |
|---|
| 91 | but never both at the same time. Also, either/both FAN1 and FAN2 |
|---|
| 92 | inputs can be substituted for aux analog inputs AIN1 and/or AIN2, |
|---|
| 93 | respectively. |
|---|
| 94 | |
|---|
| 95 | To adjust the driver for a hardware configuration other than the |
|---|
| 96 | default, simply uncomment the appropriate #defines in the |
|---|
| 97 | kernel/chips/lm87.c driver header, and then recompile/reinstall. |
|---|
| 98 | Here is a copy (as of this writing) of the header: |
|---|
| 99 | |
|---|
| 100 | |
|---|
| 101 | --snip-- |
|---|
| 102 | /* Chip configuration settings. These should be set to reflect the |
|---|
| 103 | HARDWARE configuration of your chip. By default (read: when all of |
|---|
| 104 | these are left commented out), this driver assumes that the |
|---|
| 105 | configuration is the same as National's defaults for the Channel Mode |
|---|
| 106 | register. |
|---|
| 107 | |
|---|
| 108 | Set to '1' the appropriate defines, as nessesary: |
|---|
| 109 | |
|---|
| 110 | - External temp sensors 2 (possible second CPU temp) |
|---|
| 111 | This will disable the 2.5V and Vccp2 readings. |
|---|
| 112 | Strangely, National decided that you can read the |
|---|
| 113 | temperature of a second CPU or its core voltage, |
|---|
| 114 | but not both! Comment out if FAULT is reported. */ |
|---|
| 115 | |
|---|
| 116 | /* #define LM87_EXT2 1 */ |
|---|
| 117 | |
|---|
| 118 | /* Aux analog input. When enabled, the Fan 1 reading |
|---|
| 119 | will be disabled */ |
|---|
| 120 | |
|---|
| 121 | /* #define LM87_AIN1 1 */ |
|---|
| 122 | |
|---|
| 123 | /* Aux analog input 2. When enabled, the Fan 2 reading |
|---|
| 124 | will be disabled */ |
|---|
| 125 | |
|---|
| 126 | /* #define LM87_AIN2 1 */ |
|---|
| 127 | |
|---|
| 128 | /* Internal Vcc is 5V instead of 3.3V */ |
|---|
| 129 | |
|---|
| 130 | /* #define LM87_5V_VCC 1 */ |
|---|
| 131 | |
|---|
| 132 | /* That's the end of the hardware config defines. I would have made |
|---|
| 133 | them insmod params, but it would be too much work. ;') */ |
|---|
| 134 | --snip-- |
|---|
| 135 | |
|---|
| 136 | Please note: Only adjust the #defines to reflect your HARDWARE |
|---|
| 137 | configuration. Otherwise some, if not all, the readings will be |
|---|
| 138 | wrong. Simply enabling different driver configurations does not |
|---|
| 139 | provide the desired readings. You must make hardware changes (which |
|---|
| 140 | is hard) if you really wish to get a different set of readings!! |
|---|
| 141 | |
|---|
| 142 | If you may suspect that your configuration may be different than the |
|---|
| 143 | default, try enabling the different #defines. If you get a 'FAULT' |
|---|
| 144 | when using D2, it is most likely that you don't have a second external |
|---|
| 145 | diode, so recomment-out the #define. If you get strange readings for |
|---|
| 146 | some/all of the other values when enabling a AIN, then recomment-out |
|---|
| 147 | that #define. |
|---|
| 148 | |
|---|
| 149 | Unfortunately, it's tough to 'detect' all hardware config's |
|---|
| 150 | automaticly. And, I needed to resort to using #defines instead of |
|---|
| 151 | insmod params to make life easier on myself. |
|---|