Skip to content

Commit bdbf0ac

Browse files
committed
Merge branch 'hwmon-for-linus' of git://jdelvare.pck.nerim.net/jdelvare-2.6
* 'hwmon-for-linus' of git://jdelvare.pck.nerim.net/jdelvare-2.6: (47 commits) hwmon: (adm1026) Prevent log spamming hwmon: (adm1026) Fix debug messages hwmon: (adm1029) Use mask for fan_div value hwmon: (adt7470) Add documentation hwmon: (ibmaem) Automatically load on IBM systems via DMI hwmon: (ibmpex) Automatically load on IBM systems via DMI hwmon: (w83781d) Use new style driver binding hwmon: (w83781d) Stop abusing struct i2c_client for ISA devices hwmon: (w83781d) Make ISA interface depend on CONFIG_ISA hwmon: (w83781d) Additional information about AS99127F PWM hwmon: (w83781d) Detect alias chips hwmon: (w83781d) Refactor beep enable handling hwmon: Drop dead links to old National Semiconductor chip datasheets hwmon: (w83791d) add support for thermal cruise mode hwmon: (w83791d) add pwm_enable support hwmon: (w83791d) add manual PWM support hwmon: (w83791d) fan 4/5 pins can also be used for gpio hwmon: (max1619) Use inline functions instead of macros hwmon: (it87) Fix thermal sensor type values hwmon: (lm78) Convert to a new-style i2c driver ...
2 parents 8eb88c8 + a0cf354 commit bdbf0ac

File tree

28 files changed

+1864
-1095
lines changed

28 files changed

+1864
-1095
lines changed

Documentation/hwmon/adt7470

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
Kernel driver adt7470
2+
=====================
3+
4+
Supported chips:
5+
* Analog Devices ADT7470
6+
Prefix: 'adt7470'
7+
Addresses scanned: I2C 0x2C, 0x2E, 0x2F
8+
Datasheet: Publicly available at the Analog Devices website
9+
10+
Author: Darrick J. Wong
11+
12+
Description
13+
-----------
14+
15+
This driver implements support for the Analog Devices ADT7470 chip. There may
16+
be other chips that implement this interface.
17+
18+
The ADT7470 uses the 2-wire interface compatible with the SMBus 2.0
19+
specification. Using an analog to digital converter it measures up to ten (10)
20+
external temperatures. It has four (4) 16-bit counters for measuring fan speed.
21+
There are four (4) PWM outputs that can be used to control fan speed.
22+
23+
A sophisticated control system for the PWM outputs is designed into the ADT7470
24+
that allows fan speed to be adjusted automatically based on any of the ten
25+
temperature sensors. Each PWM output is individually adjustable and
26+
programmable. Once configured, the ADT7470 will adjust the PWM outputs in
27+
response to the measured temperatures with further host intervention. This
28+
feature can also be disabled for manual control of the PWM's.
29+
30+
Each of the measured inputs (temperature, fan speed) has corresponding high/low
31+
limit values. The ADT7470 will signal an ALARM if any measured value exceeds
32+
either limit.
33+
34+
The ADT7470 DOES NOT sample all inputs continuously. A single pin on the
35+
ADT7470 is connected to a multitude of thermal diodes, but the chip must be
36+
instructed explicitly to read the multitude of diodes. If you want to use
37+
automatic fan control mode, you must manually read any of the temperature
38+
sensors or the fan control algorithm will not run. The chip WILL NOT DO THIS
39+
AUTOMATICALLY; this must be done from userspace. This may be a bug in the chip
40+
design, given that many other AD chips take care of this. The driver will not
41+
read the registers more often than once every 5 seconds. Further,
42+
configuration data is only read once per minute.
43+
44+
Special Features
45+
----------------
46+
47+
The ADT7470 has a 8-bit ADC and is capable of measuring temperatures with 1
48+
degC resolution.
49+
50+
The Analog Devices datasheet is very detailed and describes a procedure for
51+
determining an optimal configuration for the automatic PWM control.
52+
53+
Configuration Notes
54+
-------------------
55+
56+
Besides standard interfaces driver adds the following:
57+
58+
* PWM Control
59+
60+
* pwm#_auto_point1_pwm and pwm#_auto_point1_temp and
61+
* pwm#_auto_point2_pwm and pwm#_auto_point2_temp -
62+
63+
point1: Set the pwm speed at a lower temperature bound.
64+
point2: Set the pwm speed at a higher temperature bound.
65+
66+
The ADT7470 will scale the pwm between the lower and higher pwm speed when
67+
the temperature is between the two temperature boundaries. PWM values range
68+
from 0 (off) to 255 (full speed). Fan speed will be set to maximum when the
69+
temperature sensor associated with the PWM control exceeds
70+
pwm#_auto_point2_temp.
71+
72+
Notes
73+
-----
74+
75+
As stated above, the temperature inputs must be read periodically from
76+
userspace in order for the automatic pwm algorithm to run.

Documentation/hwmon/it87

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,10 +136,10 @@ once-only alarms.
136136
The IT87xx only updates its values each 1.5 seconds; reading it more often
137137
will do no harm, but will return 'old' values.
138138

139-
To change sensor N to a thermistor, 'echo 2 > tempN_type' where N is 1, 2,
139+
To change sensor N to a thermistor, 'echo 4 > tempN_type' where N is 1, 2,
140140
or 3. To change sensor N to a thermal diode, 'echo 3 > tempN_type'.
141141
Give 0 for unused sensor. Any other value is invalid. To configure this at
142-
startup, consult lm_sensors's /etc/sensors.conf. (2 = thermistor;
142+
startup, consult lm_sensors's /etc/sensors.conf. (4 = thermistor;
143143
3 = thermal diode)
144144

145145

Documentation/hwmon/lm85

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -163,16 +163,6 @@ configured individually according to the following options.
163163
* pwm#_auto_pwm_min - this specifies the PWM value for temp#_auto_temp_off
164164
temperature. (PWM value from 0 to 255)
165165

166-
* pwm#_auto_pwm_freq - select base frequency of PWM output. You can select
167-
in range of 10.0 to 94.0 Hz in .1 Hz units.
168-
(Values 100 to 940).
169-
170-
The pwm#_auto_pwm_freq can be set to one of the following 8 values. Setting the
171-
frequency to a value not on this list, will result in the next higher frequency
172-
being selected. The actual device frequency may vary slightly from this
173-
specification as designed by the manufacturer. Consult the datasheet for more
174-
details. (PWM Frequency values: 100, 150, 230, 300, 380, 470, 620, 940)
175-
176166
* pwm#_auto_pwm_minctl - this flags selects for temp#_auto_temp_off temperature
177167
the bahaviour of fans. Write 1 to let fans spinning at
178168
pwm#_auto_pwm_min or write 0 to let them off.

Documentation/hwmon/lm87

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -65,11 +65,10 @@ The LM87 has four pins which can serve one of two possible functions,
6565
depending on the hardware configuration.
6666

6767
Some functions share pins, so not all functions are available at the same
68-
time. Which are depends on the hardware setup. This driver assumes that
69-
the BIOS configured the chip correctly. In that respect, it differs from
70-
the original driver (from lm_sensors for Linux 2.4), which would force the
71-
LM87 to an arbitrary, compile-time chosen mode, regardless of the actual
72-
chipset wiring.
68+
time. Which are depends on the hardware setup. This driver normally
69+
assumes that firmware configured the chip correctly. Where this is not
70+
the case, platform code must set the I2C client's platform_data to point
71+
to a u8 value to be written to the channel register.
7372

7473
For reference, here is the list of exclusive functions:
7574
- in0+in5 (default) or temp3

Documentation/hwmon/lm90

Lines changed: 29 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Supported chips:
1111
Prefix: 'lm99'
1212
Addresses scanned: I2C 0x4c and 0x4d
1313
Datasheet: Publicly available at the National Semiconductor website
14-
http://www.national.com/pf/LM/LM89.html
14+
http://www.national.com/mpf/LM/LM89.html
1515
* National Semiconductor LM99
1616
Prefix: 'lm99'
1717
Addresses scanned: I2C 0x4c and 0x4d
@@ -21,18 +21,32 @@ Supported chips:
2121
Prefix: 'lm86'
2222
Addresses scanned: I2C 0x4c
2323
Datasheet: Publicly available at the National Semiconductor website
24-
http://www.national.com/pf/LM/LM86.html
24+
http://www.national.com/mpf/LM/LM86.html
2525
* Analog Devices ADM1032
2626
Prefix: 'adm1032'
2727
Addresses scanned: I2C 0x4c and 0x4d
28-
Datasheet: Publicly available at the Analog Devices website
29-
http://www.analog.com/en/prod/0,2877,ADM1032,00.html
28+
Datasheet: Publicly available at the ON Semiconductor website
29+
http://www.onsemi.com/PowerSolutions/product.do?id=ADM1032
3030
* Analog Devices ADT7461
3131
Prefix: 'adt7461'
3232
Addresses scanned: I2C 0x4c and 0x4d
33-
Datasheet: Publicly available at the Analog Devices website
34-
http://www.analog.com/en/prod/0,2877,ADT7461,00.html
35-
Note: Only if in ADM1032 compatibility mode
33+
Datasheet: Publicly available at the ON Semiconductor website
34+
http://www.onsemi.com/PowerSolutions/product.do?id=ADT7461
35+
* Maxim MAX6646
36+
Prefix: 'max6646'
37+
Addresses scanned: I2C 0x4d
38+
Datasheet: Publicly available at the Maxim website
39+
http://www.maxim-ic.com/quick_view2.cfm/qv_pk/3497
40+
* Maxim MAX6647
41+
Prefix: 'max6646'
42+
Addresses scanned: I2C 0x4e
43+
Datasheet: Publicly available at the Maxim website
44+
http://www.maxim-ic.com/quick_view2.cfm/qv_pk/3497
45+
* Maxim MAX6649
46+
Prefix: 'max6646'
47+
Addresses scanned: I2C 0x4c
48+
Datasheet: Publicly available at the Maxim website
49+
http://www.maxim-ic.com/quick_view2.cfm/qv_pk/3497
3650
* Maxim MAX6657
3751
Prefix: 'max6657'
3852
Addresses scanned: I2C 0x4c
@@ -70,25 +84,21 @@ Description
7084

7185
The LM90 is a digital temperature sensor. It senses its own temperature as
7286
well as the temperature of up to one external diode. It is compatible
73-
with many other devices such as the LM86, the LM89, the LM99, the ADM1032,
74-
the MAX6657, MAX6658, MAX6659, MAX6680 and the MAX6681 all of which are
75-
supported by this driver.
87+
with many other devices, many of which are supported by this driver.
7688

7789
Note that there is no easy way to differentiate between the MAX6657,
7890
MAX6658 and MAX6659 variants. The extra address and features of the
7991
MAX6659 are not supported by this driver. The MAX6680 and MAX6681 only
8092
differ in their pinout, therefore they obviously can't (and don't need to)
81-
be distinguished. Additionally, the ADT7461 is supported if found in
82-
ADM1032 compatibility mode.
93+
be distinguished.
8394

8495
The specificity of this family of chipsets over the ADM1021/LM84
8596
family is that it features critical limits with hysteresis, and an
8697
increased resolution of the remote temperature measurement.
8798

8899
The different chipsets of the family are not strictly identical, although
89-
very similar. This driver doesn't handle any specific feature for now,
90-
with the exception of SMBus PEC. For reference, here comes a non-exhaustive
91-
list of specific features:
100+
very similar. For reference, here comes a non-exhaustive list of specific
101+
features:
92102

93103
LM90:
94104
* Filter and alert configuration register at 0xBF.
@@ -114,9 +124,11 @@ ADT7461:
114124
* Lower resolution for remote temperature
115125

116126
MAX6657 and MAX6658:
127+
* Better local resolution
117128
* Remote sensor type selection
118129

119130
MAX6659:
131+
* Better local resolution
120132
* Selectable address
121133
* Second critical temperature limit
122134
* Remote sensor type selection
@@ -127,7 +139,8 @@ MAX6680 and MAX6681:
127139

128140
All temperature values are given in degrees Celsius. Resolution
129141
is 1.0 degree for the local temperature, 0.125 degree for the remote
130-
temperature.
142+
temperature, except for the MAX6657, MAX6658 and MAX6659 which have a
143+
resolution of 0.125 degree for both temperatures.
131144

132145
Each sensor has its own high and low limits, plus a critical limit.
133146
Additionally, there is a relative hysteresis value common to both critical

Documentation/hwmon/pc87360

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,7 @@ Supported chips:
55
* National Semiconductor PC87360, PC87363, PC87364, PC87365 and PC87366
66
Prefixes: 'pc87360', 'pc87363', 'pc87364', 'pc87365', 'pc87366'
77
Addresses scanned: none, address read from Super I/O config space
8-
Datasheets:
9-
http://www.national.com/pf/PC/PC87360.html
10-
http://www.national.com/pf/PC/PC87363.html
11-
http://www.national.com/pf/PC/PC87364.html
12-
http://www.national.com/pf/PC/PC87365.html
13-
http://www.national.com/pf/PC/PC87366.html
8+
Datasheets: No longer available
149

1510
Authors: Jean Delvare <[email protected]>
1611

Documentation/hwmon/pc87427

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Supported chips:
55
* National Semiconductor PC87427
66
Prefix: 'pc87427'
77
Addresses scanned: none, address read from Super I/O config space
8-
Datasheet: http://www.winbond.com.tw/E-WINBONDHTM/partner/apc_007.html
8+
Datasheet: No longer available
99

1010
Author: Jean Delvare <[email protected]>
1111

Documentation/hwmon/w83781d

Lines changed: 35 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,7 @@ in6=255
353353

354354
# PWM
355355

356-
Additional info about PWM on the AS99127F (may apply to other Asus
356+
* Additional info about PWM on the AS99127F (may apply to other Asus
357357
chips as well) by Jean Delvare as of 2004-04-09:
358358

359359
AS99127F revision 2 seems to have two PWM registers at 0x59 and 0x5A,
@@ -396,7 +396,7 @@ Please contact us if you can figure out how it is supposed to work. As
396396
long as we don't know more, the w83781d driver doesn't handle PWM on
397397
AS99127F chips at all.
398398

399-
Additional info about PWM on the AS99127F rev.1 by Hector Martin:
399+
* Additional info about PWM on the AS99127F rev.1 by Hector Martin:
400400

401401
I've been fiddling around with the (in)famous 0x59 register and
402402
found out the following values do work as a form of coarse pwm:
@@ -418,3 +418,36 @@ change.
418418
My mobo is an ASUS A7V266-E. This behavior is similar to what I got
419419
with speedfan under Windows, where 0-15% would be off, 15-2x% (can't
420420
remember the exact value) would be 70% and higher would be full on.
421+
422+
* Additional info about PWM on the AS99127F rev.1 from lm-sensors
423+
ticket #2350:
424+
425+
I conducted some experiment on Asus P3B-F motherboard with AS99127F
426+
(Ver. 1).
427+
428+
I confirm that 0x59 register control the CPU_Fan Header on this
429+
motherboard, and 0x5a register control PWR_Fan.
430+
431+
In order to reduce the dependency of specific fan, the measurement is
432+
conducted with a digital scope without fan connected. I found out that
433+
P3B-F actually output variable DC voltage on fan header center pin,
434+
looks like PWM is filtered on this motherboard.
435+
436+
Here are some of measurements:
437+
438+
0x80 20 mV
439+
0x81 20 mV
440+
0x82 232 mV
441+
0x83 1.2 V
442+
0x84 2.31 V
443+
0x85 3.44 V
444+
0x86 4.62 V
445+
0x87 5.81 V
446+
0x88 7.01 V
447+
9x89 8.22 V
448+
0x8a 9.42 V
449+
0x8b 10.6 V
450+
0x8c 11.9 V
451+
0x8d 12.4 V
452+
0x8e 12.4 V
453+
0x8f 12.4 V

Documentation/hwmon/w83791d

Lines changed: 33 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -58,29 +58,35 @@ internal state that allows no clean access (Bank with ID register is not
5858
currently selected). If you know the address of the chip, use a 'force'
5959
parameter; this will put it into a more well-behaved state first.
6060

61-
The driver implements three temperature sensors, five fan rotation speed
62-
sensors, and ten voltage sensors.
61+
The driver implements three temperature sensors, ten voltage sensors,
62+
five fan rotation speed sensors and manual PWM control of each fan.
6363

6464
Temperatures are measured in degrees Celsius and measurement resolution is 1
6565
degC for temp1 and 0.5 degC for temp2 and temp3. An alarm is triggered when
6666
the temperature gets higher than the Overtemperature Shutdown value; it stays
6767
on until the temperature falls below the Hysteresis value.
6868

69+
Voltage sensors (also known as IN sensors) report their values in millivolts.
70+
An alarm is triggered if the voltage has crossed a programmable minimum
71+
or maximum limit.
72+
6973
Fan rotation speeds are reported in RPM (rotations per minute). An alarm is
7074
triggered if the rotation speed has dropped below a programmable limit. Fan
7175
readings can be divided by a programmable divider (1, 2, 4, 8, 16,
7276
32, 64 or 128 for all fans) to give the readings more range or accuracy.
7377

74-
Voltage sensors (also known as IN sensors) report their values in millivolts.
75-
An alarm is triggered if the voltage has crossed a programmable minimum
76-
or maximum limit.
78+
Each fan controlled is controlled by PWM. The PWM duty cycle can be read and
79+
set for each fan separately. Valid values range from 0 (stop) to 255 (full).
80+
PWM 1-3 support Thermal Cruise mode, in which the PWMs are automatically
81+
regulated to keep respectively temp 1-3 at a certain target temperature.
82+
See below for the description of the sysfs-interface.
7783

7884
The w83791d has a global bit used to enable beeping from the speaker when an
7985
alarm is triggered as well as a bitmask to enable or disable the beep for
8086
specific alarms. You need both the global beep enable bit and the
8187
corresponding beep bit to be on for a triggered alarm to sound a beep.
8288

83-
The sysfs interface to the gloabal enable is via the sysfs beep_enable file.
89+
The sysfs interface to the global enable is via the sysfs beep_enable file.
8490
This file is used for both legacy and new code.
8591

8692
The sysfs interface to the beep bitmask has migrated from the original legacy
@@ -105,6 +111,27 @@ going forward.
105111
The driver reads the hardware chip values at most once every three seconds.
106112
User mode code requesting values more often will receive cached values.
107113

114+
/sys files
115+
----------
116+
The sysfs-interface is documented in the 'sysfs-interface' file. Only
117+
chip-specific options are documented here.
118+
119+
pwm[1-3]_enable - this file controls mode of fan/temperature control for
120+
fan 1-3. Fan/PWM 4-5 only support manual mode.
121+
* 1 Manual mode
122+
* 2 Thermal Cruise mode
123+
* 3 Fan Speed Cruise mode (no further support)
124+
125+
temp[1-3]_target - defines the target temperature for Thermal Cruise mode.
126+
Unit: millidegree Celsius
127+
RW
128+
129+
temp[1-3]_tolerance - temperature tolerance for Thermal Cruise mode.
130+
Specifies an interval around the target temperature
131+
in which the fan speed is not changed.
132+
Unit: millidegree Celsius
133+
RW
134+
108135
Alarms bitmap vs. beep_mask bitmask
109136
------------------------------------
110137
For legacy code using the alarms and beep_mask files:
@@ -132,7 +159,3 @@ tart2 : alarms: 0x020000 beep_mask: 0x080000 <== mismatch
132159
tart3 : alarms: 0x040000 beep_mask: 0x100000 <== mismatch
133160
case_open : alarms: 0x001000 beep_mask: 0x001000
134161
global_enable: alarms: -------- beep_mask: 0x800000 (modified via beep_enable)
135-
136-
W83791D TODO:
137-
---------------
138-
Provide a patch for smart-fan control (still need appropriate motherboard/fans)

drivers/hwmon/Kconfig

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -510,11 +510,9 @@ config SENSORS_LM90
510510
depends on I2C
511511
help
512512
If you say yes here you get support for National Semiconductor LM90,
513-
LM86, LM89 and LM99, Analog Devices ADM1032 and Maxim MAX6657,
514-
MAX6658, MAX6659, MAX6680 and MAX6681 sensor chips.
515-
516-
The Analog Devices ADT7461 sensor chip is also supported, but only
517-
if found in ADM1032 compatibility mode.
513+
LM86, LM89 and LM99, Analog Devices ADM1032 and ADT7461, and Maxim
514+
MAX6646, MAX6647, MAX6649, MAX6657, MAX6658, MAX6659, MAX6680 and
515+
MAX6681 sensor chips.
518516

519517
This driver can also be built as a module. If so, the module
520518
will be called lm90.

0 commit comments

Comments
 (0)