Merge lp:~mfisch/ubuntu/trusty/lm-sensors/merge-to-3.3.4 into lp:ubuntu/trusty/lm-sensors

Proposed by Matt Fischer
Status: Merged
Merge reported by: Martin Pitt
Merged at revision: not available
Proposed branch: lp:~mfisch/ubuntu/trusty/lm-sensors/merge-to-3.3.4
Merge into: lp:ubuntu/trusty/lm-sensors
Diff against target: 5424 lines (+1106/-2370)
40 files modified
.pc/06-sensors-detect-debian.patch/prog/detect/sensors-detect (+128/-111)
.pc/08-sensors-detect-lm85.patch/prog/detect/sensors-detect (+128/-98)
.pc/09-sensors-detect-sch5524.patch/prog/detect/sensors-detect (+128/-98)
.pc/10-pwmconfig.patch/prog/pwm/pwmconfig (+0/-1019)
.pc/100_recommend_using_upstart.patch/prog/detect/sensors-detect (+128/-98)
.pc/11-fancontrol-check.patch/prog/pwm/fancontrol (+25/-9)
.pc/12-sensors-detect-superio-x86.patch/prog/detect/sensors-detect (+128/-98)
.pc/14-2-digits-kernel.patch/prog/detect/sensors-detect (+128/-98)
.pc/applied-patches (+0/-1)
CHANGES (+19/-0)
debian/changelog (+23/-0)
debian/control (+1/-1)
debian/fancontrol.init (+5/-5)
debian/fancontrol.service (+14/-0)
debian/lm-sensors.dirs (+0/-1)
debian/lm-sensors.docs (+0/-1)
debian/lm-sensors.service (+0/-1)
debian/patches/06-sensors-detect-debian.patch (+3/-16)
debian/patches/09-sensors-detect-sch5524.patch (+1/-1)
debian/patches/10-pwmconfig.patch (+0/-148)
debian/patches/11-fancontrol-check.patch (+1/-1)
debian/patches/12-sensors-detect-superio-x86.patch (+1/-1)
debian/patches/14-2-digits-kernel.patch (+1/-1)
debian/patches/series (+0/-1)
debian/rules (+13/-1)
doc/chips/MODPARMS (+0/-139)
doc/chips/SUMMARY (+0/-297)
doc/developers/lm_sensors.lsm (+4/-4)
doc/developers/smbus_company_id (+28/-0)
doc/donations (+4/-5)
doc/libsensors-API.txt (+1/-1)
lib/sensors.conf.5 (+6/-2)
prog/detect/sensors-detect (+128/-98)
prog/init/fancontrol.service (+13/-0)
prog/init/sensord.service (+13/-0)
prog/pwm/fancontrol (+25/-9)
prog/pwm/pwmconfig (+2/-2)
prog/sensors/main.c (+1/-1)
prog/sensors/sensors.1 (+5/-2)
version.h (+1/-1)
To merge this branch: bzr merge lp:~mfisch/ubuntu/trusty/lm-sensors/merge-to-3.3.4
Reviewer Review Type Date Requested Status
Martin Pitt Approve
Review via email: mp+200364@code.launchpad.net

Description of the change

Sorry before I had this going to saucy, old habits I guess. Correct target now:

Merge to 3.3.4. We still maintain a small patch here to recommend upstart. This version has a new build dep on dh-systemd. I assume that's okay.

Here's a diff of the debian folder:

mfisch@virgon:~/tmp/lm-sensors/debian$ diff -r . ../../lm-sensors.debian/debian/
diff -r ./changelog ../../lm-sensors.debian/debian/changelog
1,8d0
< lm-sensors (1:3.3.4-2ubuntu1) trusty; urgency=low
<
< * Merge from Debian unstable (LP: #1256671). Remaining changes:
< - Add 100_recommend_using_upstart.patch: Recommend use of upstart rather
< than init-script.
<
< -- Matt Fischer <email address hidden> Mon, 02 Dec 2013 21:07:32 -0700
<
24,31d15
< lm-sensors (1:3.3.3-1ubuntu1) saucy; urgency=low
<
< * Merge from Debian unstable (LP: #1178520). Remaining changes:
< - Add 100_recommend_using_upstart.patch: Recommend use of upstart rather
< than init-script.
<
< -- Matthew Fischer <email address hidden> Thu, 09 May 2013 21:55:15 -0600
<
45,53d28
< lm-sensors (1:3.3.2-2ubuntu1) raring-proposed; urgency=low
<
< * Merge from Debian unstable (LP: #1075010). Remaining changes:
< - Add 100_recommend_using_upstart.patch: Recommend use of upstart rather
< than init-script.
< * Update 100_recommend_using_upstart.patch to reflect kmod transition.
<
< -- Logan Rosen <email address hidden> Mon, 05 Nov 2012 13:18:21 -0500
<
71,84d45
< lm-sensors (1:3.3.1-2ubuntu2) quantal; urgency=low
<
< * Rebuild for new armel compiler default of ARMv5t.
<
< -- Colin Watson <email address hidden> Fri, 05 Oct 2012 11:37:42 +0100
<
< lm-sensors (1:3.3.1-2ubuntu1) precise; urgency=low
<
< * Merge from debian testing, remaining changes are:
< - Add 100_recommend_using_upstart.patch: Recommend use of upstart rather
< than init-script.
<
< -- Chuck Short <email address hidden> Tue, 21 Feb 2012 08:53:20 -0500
<
1779a1741,1743
> Local variables:
> mode: debian-changelog
> End:
diff -r ./control ../../lm-sensors.debian/debian/control
5,6c5
< Maintainer: Ubuntu Developers <email address hidden>
< XSBC-Original-Maintainer: Aurelien Jarno <email address hidden>
---
> Maintainer: Aurelien Jarno <email address hidden>
Only in ./patches: 100_recommend_using_upstart.patch
diff -r ./patches/series ../../lm-sensors.debian/debian/patches/series
13d12
< 100_recommend_using_upstart.patch

To post a comment you must log in.
Revision history for this message
Martin Pitt (pitti) wrote :

Thanks! Uploaded.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file '.pc/06-sensors-detect-debian.patch/prog/detect/sensors-detect'
2--- .pc/06-sensors-detect-debian.patch/prog/detect/sensors-detect 2013-05-06 23:37:35 +0000
3+++ .pc/06-sensors-detect-debian.patch/prog/detect/sensors-detect 2014-01-03 03:11:39 +0000
4@@ -41,7 +41,7 @@
5 use vars qw(@pci_adapters @chip_ids @ipmi_ifs @non_hwmon_chip_ids
6 $i2c_addresses_to_scan $revision @i2c_byte_cache);
7
8-$revision = '$Revision: 6085 $ ($Date: 2012-10-30 18:18:45 +0100 (mar. 30 oct. 2012) $)';
9+$revision = '$Revision: 6170 $ ($Date: 2013-05-20 21:25:22 +0200 (lun. 20 mai 2013) $)';
10 $revision =~ s/\$\w+: (.*?) \$/$1/g;
11 $revision =~ s/ \([^()]*\)//;
12
13@@ -637,8 +637,8 @@
14 i2c_addrs => [0x2c..0x2e],
15 i2c_detect => sub { adt7490_detect(@_); },
16 }, {
17- name => "Analog Devices ADT7410",
18- driver => "to-be-written",
19+ name => "Analog Devices ADT7410/ADT7420",
20+ driver => "adt7410",
21 i2c_addrs => [0x48..0x4b],
22 i2c_detect => sub { adt7410_detect(@_); },
23 }, {
24@@ -803,11 +803,6 @@
25 i2c_addrs => [0x2c..0x2f],
26 i2c_detect => sub { adm9240_detect(@_, 0); },
27 }, {
28- name => "Dallas Semiconductor DS1621/DS1631",
29- driver => "ds1621",
30- i2c_addrs => [0x48..0x4f],
31- i2c_detect => sub { ds1621_detect(@_); },
32- }, {
33 name => "Dallas Semiconductor DS1780",
34 driver => "adm9240",
35 i2c_addrs => [0x2c..0x2f],
36@@ -1023,6 +1018,16 @@
37 i2c_addrs => [0x4c, 0x4d],
38 i2c_detect => sub { tmp42x_detect(@_, 2); },
39 }, {
40+ name => "Texas Instruments TMP431",
41+ driver => "to-be-written", # tmp401
42+ i2c_addrs => [0x4c, 0x4d],
43+ i2c_detect => sub { lm90_detect(@_, 16); },
44+ }, {
45+ name => "Texas Instruments TMP432",
46+ driver => "to-be-written", # tmp401
47+ i2c_addrs => [0x4c, 0x4d],
48+ i2c_detect => sub { lm90_detect(@_, 17); },
49+ }, {
50 name => "Texas Instruments AMC6821",
51 driver => "amc6821",
52 i2c_addrs => [0x18..0x1a, 0x2c..0x2e, 0x4c..0x4e],
53@@ -1033,6 +1038,11 @@
54 i2c_addrs => [0x2b, 0x19, 0x2a],
55 i2c_detect => sub { lm95231_detect(@_, 0); },
56 }, {
57+ name => "National Semiconductor LM95234",
58+ driver => "to-be-written", # lm95234
59+ i2c_addrs => [0x18, 0x4d, 0x4e],
60+ i2c_detect => sub { lm95231_detect(@_, 3); },
61+ }, {
62 name => "National Semiconductor LM95241",
63 driver => "lm95241",
64 i2c_addrs => [0x2b, 0x19, 0x2a],
65@@ -1400,6 +1410,11 @@
66 i2c_addrs => [0x18..0x1f],
67 i2c_detect => sub { jedec_JC42_4_detect(@_, 7); },
68 }, {
69+ name => "Microchip MCP98244",
70+ driver => "jc42",
71+ i2c_addrs => [0x18..0x1f],
72+ i2c_detect => sub { jedec_JC42_4_detect(@_, 15); },
73+ }, {
74 name => "Microchip MCP9843",
75 driver => "jc42",
76 i2c_addrs => [0x18..0x1f],
77@@ -1945,6 +1960,10 @@
78 logdev => 0x0b,
79 features => FEAT_IN | FEAT_FAN | FEAT_TEMP,
80 }, {
81+ name => "Winbond W83627SF/GF Super IO",
82+ driver => "not-a-sensor",
83+ devid => 0x59,
84+ }, {
85 name => "Winbond W83627THF/THG Super IO Sensors",
86 driver => "w83627hf",
87 devid => 0x82,
88@@ -2019,7 +2038,7 @@
89 logdev => 0x0b,
90 features => FEAT_IN | FEAT_FAN | FEAT_TEMP,
91 }, {
92- name => "Nuvoton W83677HG-I (NCT6771F/NCT6772F/NCT6775F) Super IO Sensors",
93+ name => "Nuvoton W83677HG-I (NCT5572D/NCT6771F/NCT6772F/NCT6775F) Super IO Sensors",
94 driver => "w83627ehf",
95 devid => 0xB470,
96 devid_mask => 0xFFF0,
97@@ -2030,27 +2049,24 @@
98 driver => "not-a-sensor",
99 devid => 0x61,
100 }, {
101- name => "Nuvoton NCT5577D Super IO Sensors",
102- driver => "to-be-written",
103- devid => 0xC331,
104- logdev => 0x0b,
105- features => FEAT_IN | FEAT_FAN | FEAT_TEMP,
106- }, {
107- name => "Nuvoton NCT6776F Super IO Sensors",
108- driver => "w83627ehf",
109- devid => 0xC333,
110- logdev => 0x0b,
111- features => FEAT_IN | FEAT_FAN | FEAT_TEMP,
112- }, {
113- name => "Nuvoton NCT6779D Super IO Sensors",
114- driver => "to-be-written", # nct6775, new driver
115- devid => 0xC562,
116- logdev => 0x0b,
117- features => FEAT_IN | FEAT_FAN | FEAT_TEMP,
118- }, {
119- name => "Nuvoton NCT6102D/NCT6106D Super IO Sensors",
120- driver => "to-be-written", # nct6775, new driver
121- devid => 0x1061,
122+ name => "Nuvoton NCT5577D/NCT6776F Super IO Sensors",
123+ driver => "nct6775",
124+ devid => 0xC330,
125+ devid_mask => 0xFFF0,
126+ logdev => 0x0b,
127+ features => FEAT_IN | FEAT_FAN | FEAT_TEMP,
128+ }, {
129+ name => "Nuvoton NCT5532D/NCT6779D Super IO Sensors",
130+ driver => "nct6775",
131+ devid => 0xC560,
132+ devid_mask => 0xFFF0,
133+ logdev => 0x0b,
134+ features => FEAT_IN | FEAT_FAN | FEAT_TEMP,
135+ }, {
136+ name => "Nuvoton NCT6102D/NCT6104D/NCT6106D Super IO Sensors",
137+ driver => "to-be-written", # nct6775
138+ devid => 0xC450,
139+ devid_mask => 0xFFF0,
140 logdev => 0x0b,
141 features => FEAT_IN | FEAT_FAN | FEAT_TEMP,
142 }, {
143@@ -2220,14 +2236,20 @@
144 logdev => 0x04,
145 features => FEAT_IN | FEAT_FAN | FEAT_TEMP,
146 }, {
147+ name => "ITE IT8752F Super IO Sensors",
148+ driver => "to-be-written", # it87
149+ devid => 0x8752,
150+ logdev => 0x04,
151+ features => FEAT_IN | FEAT_FAN | FEAT_TEMP,
152+ }, {
153 name => "ITE IT8771E Super IO Sensors",
154- driver => "to-be-written", # it87
155+ driver => "it87",
156 devid => 0x8771,
157 logdev => 0x04,
158 features => FEAT_IN | FEAT_FAN | FEAT_TEMP,
159 }, {
160 name => "ITE IT8772E Super IO Sensors",
161- driver => "to-be-written", # it87
162+ driver => "it87",
163 devid => 0x8772,
164 logdev => 0x04,
165 features => FEAT_IN | FEAT_FAN | FEAT_TEMP,
166@@ -2239,13 +2261,13 @@
167 features => FEAT_IN | FEAT_FAN | FEAT_TEMP,
168 }, {
169 name => "ITE IT8782F Super IO Sensors",
170- driver => "to-be-written", # it87
171+ driver => "it87",
172 devid => 0x8782,
173 logdev => 0x04,
174 features => FEAT_IN | FEAT_FAN | FEAT_TEMP,
175 }, {
176 name => "ITE IT8783F Super IO Sensors",
177- driver => "to-be-written", # it87
178+ driver => "it87",
179 devid => 0x8783,
180 logdev => 0x04,
181 features => FEAT_IN | FEAT_FAN | FEAT_TEMP,
182@@ -2349,6 +2371,10 @@
183 driver => "fam15h_power",
184 detect => sub { amd_pci_detect('1604') },
185 }, {
186+ name => "AMD Family 16h power sensors",
187+ driver => "fam15h_power",
188+ detect => sub { amd_pci_detect('1534') },
189+ }, {
190 name => "Intel digital thermal sensor",
191 driver => "coretemp",
192 detect => \&coretemp_detect,
193@@ -2463,9 +2489,12 @@
194
195 sub initialize_ioports
196 {
197- sysopen(IOPORTS, "/dev/port", O_RDWR)
198- or die "/dev/port: $!\n";
199- binmode(IOPORTS);
200+ if (sysopen(IOPORTS, "/dev/port", O_RDWR)) {
201+ binmode(IOPORTS);
202+ return 1;
203+ }
204+ print STDERR "/dev/port: $!\n";
205+ return 0;
206 }
207
208 sub close_ioports
209@@ -2765,9 +2794,19 @@
210 {
211 local $_;
212
213+ # /sys/module contains built-in drivers too, but doesn't exist on
214+ # older kernels (added in kernel 2.6.7)
215+ if (opendir(local *MODULES, "$sysfs_root/module")) {
216+ while (defined($_ = readdir(MODULES))) {
217+ next if m/^\./;
218+ $modules_list{$1} = 1 if m/^(\S*)/;
219+ }
220+ return;
221+ }
222+
223+ # Fall back to /proc/modules as it is always available
224 open(local *INPUTFILE, "/proc/modules") or return;
225 while (<INPUTFILE>) {
226- tr/-/_/; # Probably not needed
227 $modules_list{$1} = 1 if m/^(\S*)/;
228 }
229 }
230@@ -3493,13 +3532,14 @@
231 print("Can't set I2C address for $dev\n"),
232 next;
233
234- initialize_ioports();
235- $alias_detect = $detected->[$isa]->{alias_detect};
236- $is_alias = &$alias_detect($detected->[$isa]->{isa_addr},
237- \*FILE,
238- $detected->[$i2c]->{i2c_addr});
239+ if (initialize_ioports()) {
240+ $alias_detect = $detected->[$isa]->{alias_detect};
241+ $is_alias = &$alias_detect($detected->[$isa]->{isa_addr},
242+ \*FILE,
243+ $detected->[$i2c]->{i2c_addr});
244+ close_ioports();
245+ }
246 close(FILE);
247- close_ioports();
248
249 next unless $is_alias;
250 # This is an alias: copy the I2C data into the ISA
251@@ -4312,47 +4352,6 @@
252 return ($chip == 0) ? 4 : 2;
253 }
254
255-# Registers used:
256-# 0xAA: Temperature
257-# 0xA1: High limit
258-# 0xA2: Low limit
259-# 0xA8: Counter
260-# 0xA9: Slope
261-# 0xAC: Configuration
262-# Detection is weak. We check if bit 4 (NVB) is clear, because it is
263-# unlikely to be set (would mean that EEPROM is currently being accessed).
264-# We also check the value of the counter and slope registers, the datasheet
265-# doesn't mention the possible values but the conversion formula together
266-# with experimental evidence suggest possible sanity checks.
267-# Not all devices enjoy SMBus read word transactions, so we do as much as
268-# possible with read byte transactions first, and only use read word
269-# transactions second.
270-sub ds1621_detect
271-{
272- my ($file, $addr) = @_;
273-
274- my $conf = i2c_smbus_read_byte_data($file, 0xAC);
275- return if ($conf & 0x10);
276-
277- my $temp = i2c_smbus_read_word_data($file, 0xAA);
278- return if $temp < 0 || ($temp & 0x0f00);
279- # On the DS1631, the following two checks are too strict in theory,
280- # but in practice I very much doubt that anyone will set temperature
281- # limits not a multiple of 0.5 degrees C.
282- my $high = i2c_smbus_read_word_data($file, 0xA1);
283- return if $high < 0 || ($high & 0x7f00);
284- my $low = i2c_smbus_read_word_data($file, 0xA2);
285- return if $low < 0 || ($low & 0x7f00);
286-
287- return if ($temp == 0 && $high == 0 && $low == 0 && $conf == 0);
288-
289- # Old versions of the DS1621 apparently don't have the counter and
290- # slope registers (or they return crap)
291- my $counter = i2c_smbus_read_byte_data($file, 0xA8);
292- my $slope = i2c_smbus_read_byte_data($file, 0xA9);
293- return ($slope == 0x10 && $counter <= $slope) ? 3 : 2;
294-}
295-
296 # Chip to detect: 0 = LM80, 1 = LM96080
297 # Registers used:
298 # 0x00: Configuration register
299@@ -4499,7 +4498,7 @@
300 # 8 = W83L771W/G, 9 = TMP401, 10 = TMP411,
301 # 11 = W83L771AWG/ASG, 12 = MAX6690,
302 # 13 = ADT7461A/NCT1008, 14 = SA56004,
303-# 15 = G781
304+# 15 = G781, 16 = TMP431, 17 = TMP432
305 # Registers used:
306 # 0x03: Configuration
307 # 0x04: Conversion rate
308@@ -4617,6 +4616,18 @@
309 return if $mid != 0x47; # GMT
310 return 8 if $cid == 0x01; # G781
311 }
312+ if ($chip == 16) {
313+ return if ($conf & 0x1B) != 0;
314+ return if $rate > 0x0F;
315+ return if $mid != 0x55; # Texas Instruments
316+ return 6 if ($cid == 0x31); # TMP431A/B/C/D
317+ }
318+ if ($chip == 17) {
319+ return if ($conf & 0x1B) != 0;
320+ return if $rate > 0x0F;
321+ return if $mid != 0x55; # Texas Instruments
322+ return 6 if ($cid == 0x32); # TMP432A/B
323+ }
324 return;
325 }
326
327@@ -4688,14 +4699,17 @@
328 return 5;
329 }
330
331-# Chip to detect: 0 = LM95231, 1 = LM95241, 2 = LM95245
332+# Chip to detect: 0 = LM95231, 1 = LM95241, 2 = LM95245, 3 = LM95234
333 # Registers used:
334 # 0x02: Status (3 unused bits)
335 # 0x03: Configuration (3 unused bits)
336+# 0x04: Conversion rate (6 unused bits, LM95234)
337 # 0x06: Remote diode filter control (6 unused bits, LM95231 and LM95241)
338 # 0x30: Remote diode model type select (6 unused bits, LM95231 and LM95241)
339 # 0x30: Local Temperature LSB (5 unused bits, LM95245)
340+# 0x30: Diode model (4 unused bits, LM95234)
341 # 0x33: Status register 2 (6 unused bits, LM95245)
342+# 0x38: Diode model status (4 unused bits, LM95234)
343 # 0xfe: Manufacturer ID
344 # 0xff: Revision ID
345 sub lm95231_detect
346@@ -4719,6 +4733,13 @@
347 return if i2c_smbus_read_byte_data($file, 0x03) & 0xa1;
348 return if i2c_smbus_read_byte_data($file, 0x30) & 0x1f;
349 return if i2c_smbus_read_byte_data($file, 0x33) & 0x3f;
350+ } elsif ($chip == 3) {
351+ return if $cid != 0x79; # LM95234
352+ return if i2c_smbus_read_byte_data($file, 0x02) & 0x30;
353+ return if i2c_smbus_read_byte_data($file, 0x03) & 0xbc;
354+ return if i2c_smbus_read_byte_data($file, 0x04) & 0xfc;
355+ return if i2c_smbus_read_byte_data($file, 0x30) & 0xe1;
356+ return if i2c_smbus_read_byte_data($file, 0x38) & 0xe1;
357 }
358
359 return 6;
360@@ -6030,7 +6051,7 @@
361 # 4 = TS3000/TSE2002, 5 = MAX6604, 6 = MCP98242,
362 # 7 = MCP98243, 8 = MCP9843, 9 = CAT6095 / CAT34TS02,
363 # 10 = STTS424E, 11 = STTS2002, 12 = STTS3000
364-# 13 = MCP9804, 14 = AT30TS00
365+# 13 = MCP9804, 14 = AT30TS00, 15 = MCP98244
366 # Registers used:
367 # 0x00: Capabilities
368 # 0x01: Configuration
369@@ -6099,6 +6120,9 @@
370 } elsif ($chip == 14) {
371 return unless $manid == 0x00; # Atmel
372 return unless $devid == 0x82; # AT30TS00
373+ } elsif ($chip == 15) {
374+ return unless $manid == 0x00; # MCP
375+ return unless $devid == 0x22; # MCP98244
376 }
377
378 # Now, do it all again with words. Note that we get
379@@ -6156,6 +6180,9 @@
380 } elsif ($chip == 14) {
381 return unless $manid == 0x1f00; # Atmel
382 return unless ($devid & 0xfeff) == 0x0082; # AT30TS00
383+ } elsif ($chip == 15) {
384+ return unless $manid == 0x5400; # MCP
385+ return unless ($devid & 0xfcff) == 0x0022; # MCP98244
386 }
387
388 return 5;
389@@ -6677,19 +6704,6 @@
390 print SYSCONFIG "BUS_MODULES=\"", join(" ", @{$bus_modules}), "\"\n"
391 if @{$bus_modules};
392 print SYSCONFIG "HWMON_MODULES=\"", join(" ", @{$hwmon_modules}), "\"\n";
393-
394- print SYSCONFIG <<'EOT';
395-
396-# For compatibility reasons, modules are also listed individually as variables
397-# MODULE_0, MODULE_1, MODULE_2, etc.
398-# You should use BUS_MODULES and HWMON_MODULES instead if possible.
399-
400-EOT
401- my $i = 0;
402- foreach (@{$bus_modules}, @{$hwmon_modules}) {
403- print SYSCONFIG "MODULE_$i=$_\n";
404- $i++;
405- }
406 close(SYSCONFIG);
407
408 if (-x "/bin/systemctl" && -d "/lib/systemd/system" &&
409@@ -6814,10 +6828,11 @@
410 "standard I/O ports to probe them. This is usually safe.\n";
411 print "Do you want to scan for Super I/O sensors? (YES/no): ";
412 unless (<STDIN> =~ /^\s*n/i) {
413- initialize_ioports();
414- $superio_features |= scan_superio(0x2e, 0x2f);
415- $superio_features |= scan_superio(0x4e, 0x4f);
416- close_ioports();
417+ if (initialize_ioports()) {
418+ $superio_features |= scan_superio(0x2e, 0x2f);
419+ $superio_features |= scan_superio(0x4e, 0x4f);
420+ close_ioports();
421+ }
422 }
423 print "\n";
424
425@@ -6830,9 +6845,10 @@
426 "interfaces? (YES/no): ";
427 unless (<STDIN> =~ /^\s*n/i) {
428 if (!ipmi_from_smbios()) {
429- initialize_ioports();
430- scan_isa_bus(\@ipmi_ifs);
431- close_ioports();
432+ if (initialize_ioports()) {
433+ scan_isa_bus(\@ipmi_ifs);
434+ close_ioports();
435+ }
436 }
437 }
438 print "\n";
439@@ -6846,9 +6862,10 @@
440 $input = <STDIN>;
441 unless ($input =~ /^\s*n/i
442 || ($superio_features && $input !~ /^\s*y/i)) {
443- initialize_ioports();
444- scan_isa_bus(\@chip_ids);
445- close_ioports();
446+ if (initialize_ioports()) {
447+ scan_isa_bus(\@chip_ids);
448+ close_ioports();
449+ }
450 }
451 print "\n";
452 }
453
454=== modified file '.pc/08-sensors-detect-lm85.patch/prog/detect/sensors-detect'
455--- .pc/08-sensors-detect-lm85.patch/prog/detect/sensors-detect 2013-05-06 23:37:35 +0000
456+++ .pc/08-sensors-detect-lm85.patch/prog/detect/sensors-detect 2014-01-03 03:11:39 +0000
457@@ -41,7 +41,7 @@
458 use vars qw(@pci_adapters @chip_ids @ipmi_ifs @non_hwmon_chip_ids
459 $i2c_addresses_to_scan $revision @i2c_byte_cache);
460
461-$revision = '$Revision: 6085 $ ($Date: 2012-10-30 18:18:45 +0100 (mar. 30 oct. 2012) $)';
462+$revision = '$Revision: 6170 $ ($Date: 2013-05-20 21:25:22 +0200 (lun. 20 mai 2013) $)';
463 $revision =~ s/\$\w+: (.*?) \$/$1/g;
464 $revision =~ s/ \([^()]*\)//;
465
466@@ -637,8 +637,8 @@
467 i2c_addrs => [0x2c..0x2e],
468 i2c_detect => sub { adt7490_detect(@_); },
469 }, {
470- name => "Analog Devices ADT7410",
471- driver => "to-be-written",
472+ name => "Analog Devices ADT7410/ADT7420",
473+ driver => "adt7410",
474 i2c_addrs => [0x48..0x4b],
475 i2c_detect => sub { adt7410_detect(@_); },
476 }, {
477@@ -803,11 +803,6 @@
478 i2c_addrs => [0x2c..0x2f],
479 i2c_detect => sub { adm9240_detect(@_, 0); },
480 }, {
481- name => "Dallas Semiconductor DS1621/DS1631",
482- driver => "ds1621",
483- i2c_addrs => [0x48..0x4f],
484- i2c_detect => sub { ds1621_detect(@_); },
485- }, {
486 name => "Dallas Semiconductor DS1780",
487 driver => "adm9240",
488 i2c_addrs => [0x2c..0x2f],
489@@ -1023,6 +1018,16 @@
490 i2c_addrs => [0x4c, 0x4d],
491 i2c_detect => sub { tmp42x_detect(@_, 2); },
492 }, {
493+ name => "Texas Instruments TMP431",
494+ driver => "to-be-written", # tmp401
495+ i2c_addrs => [0x4c, 0x4d],
496+ i2c_detect => sub { lm90_detect(@_, 16); },
497+ }, {
498+ name => "Texas Instruments TMP432",
499+ driver => "to-be-written", # tmp401
500+ i2c_addrs => [0x4c, 0x4d],
501+ i2c_detect => sub { lm90_detect(@_, 17); },
502+ }, {
503 name => "Texas Instruments AMC6821",
504 driver => "amc6821",
505 i2c_addrs => [0x18..0x1a, 0x2c..0x2e, 0x4c..0x4e],
506@@ -1033,6 +1038,11 @@
507 i2c_addrs => [0x2b, 0x19, 0x2a],
508 i2c_detect => sub { lm95231_detect(@_, 0); },
509 }, {
510+ name => "National Semiconductor LM95234",
511+ driver => "to-be-written", # lm95234
512+ i2c_addrs => [0x18, 0x4d, 0x4e],
513+ i2c_detect => sub { lm95231_detect(@_, 3); },
514+ }, {
515 name => "National Semiconductor LM95241",
516 driver => "lm95241",
517 i2c_addrs => [0x2b, 0x19, 0x2a],
518@@ -1400,6 +1410,11 @@
519 i2c_addrs => [0x18..0x1f],
520 i2c_detect => sub { jedec_JC42_4_detect(@_, 7); },
521 }, {
522+ name => "Microchip MCP98244",
523+ driver => "jc42",
524+ i2c_addrs => [0x18..0x1f],
525+ i2c_detect => sub { jedec_JC42_4_detect(@_, 15); },
526+ }, {
527 name => "Microchip MCP9843",
528 driver => "jc42",
529 i2c_addrs => [0x18..0x1f],
530@@ -1945,6 +1960,10 @@
531 logdev => 0x0b,
532 features => FEAT_IN | FEAT_FAN | FEAT_TEMP,
533 }, {
534+ name => "Winbond W83627SF/GF Super IO",
535+ driver => "not-a-sensor",
536+ devid => 0x59,
537+ }, {
538 name => "Winbond W83627THF/THG Super IO Sensors",
539 driver => "w83627hf",
540 devid => 0x82,
541@@ -2019,7 +2038,7 @@
542 logdev => 0x0b,
543 features => FEAT_IN | FEAT_FAN | FEAT_TEMP,
544 }, {
545- name => "Nuvoton W83677HG-I (NCT6771F/NCT6772F/NCT6775F) Super IO Sensors",
546+ name => "Nuvoton W83677HG-I (NCT5572D/NCT6771F/NCT6772F/NCT6775F) Super IO Sensors",
547 driver => "w83627ehf",
548 devid => 0xB470,
549 devid_mask => 0xFFF0,
550@@ -2030,27 +2049,24 @@
551 driver => "not-a-sensor",
552 devid => 0x61,
553 }, {
554- name => "Nuvoton NCT5577D Super IO Sensors",
555- driver => "to-be-written",
556- devid => 0xC331,
557- logdev => 0x0b,
558- features => FEAT_IN | FEAT_FAN | FEAT_TEMP,
559- }, {
560- name => "Nuvoton NCT6776F Super IO Sensors",
561- driver => "w83627ehf",
562- devid => 0xC333,
563- logdev => 0x0b,
564- features => FEAT_IN | FEAT_FAN | FEAT_TEMP,
565- }, {
566- name => "Nuvoton NCT6779D Super IO Sensors",
567- driver => "to-be-written", # nct6775, new driver
568- devid => 0xC562,
569- logdev => 0x0b,
570- features => FEAT_IN | FEAT_FAN | FEAT_TEMP,
571- }, {
572- name => "Nuvoton NCT6102D/NCT6106D Super IO Sensors",
573- driver => "to-be-written", # nct6775, new driver
574- devid => 0x1061,
575+ name => "Nuvoton NCT5577D/NCT6776F Super IO Sensors",
576+ driver => "nct6775",
577+ devid => 0xC330,
578+ devid_mask => 0xFFF0,
579+ logdev => 0x0b,
580+ features => FEAT_IN | FEAT_FAN | FEAT_TEMP,
581+ }, {
582+ name => "Nuvoton NCT5532D/NCT6779D Super IO Sensors",
583+ driver => "nct6775",
584+ devid => 0xC560,
585+ devid_mask => 0xFFF0,
586+ logdev => 0x0b,
587+ features => FEAT_IN | FEAT_FAN | FEAT_TEMP,
588+ }, {
589+ name => "Nuvoton NCT6102D/NCT6104D/NCT6106D Super IO Sensors",
590+ driver => "to-be-written", # nct6775
591+ devid => 0xC450,
592+ devid_mask => 0xFFF0,
593 logdev => 0x0b,
594 features => FEAT_IN | FEAT_FAN | FEAT_TEMP,
595 }, {
596@@ -2220,14 +2236,20 @@
597 logdev => 0x04,
598 features => FEAT_IN | FEAT_FAN | FEAT_TEMP,
599 }, {
600+ name => "ITE IT8752F Super IO Sensors",
601+ driver => "to-be-written", # it87
602+ devid => 0x8752,
603+ logdev => 0x04,
604+ features => FEAT_IN | FEAT_FAN | FEAT_TEMP,
605+ }, {
606 name => "ITE IT8771E Super IO Sensors",
607- driver => "to-be-written", # it87
608+ driver => "it87",
609 devid => 0x8771,
610 logdev => 0x04,
611 features => FEAT_IN | FEAT_FAN | FEAT_TEMP,
612 }, {
613 name => "ITE IT8772E Super IO Sensors",
614- driver => "to-be-written", # it87
615+ driver => "it87",
616 devid => 0x8772,
617 logdev => 0x04,
618 features => FEAT_IN | FEAT_FAN | FEAT_TEMP,
619@@ -2239,13 +2261,13 @@
620 features => FEAT_IN | FEAT_FAN | FEAT_TEMP,
621 }, {
622 name => "ITE IT8782F Super IO Sensors",
623- driver => "to-be-written", # it87
624+ driver => "it87",
625 devid => 0x8782,
626 logdev => 0x04,
627 features => FEAT_IN | FEAT_FAN | FEAT_TEMP,
628 }, {
629 name => "ITE IT8783F Super IO Sensors",
630- driver => "to-be-written", # it87
631+ driver => "it87",
632 devid => 0x8783,
633 logdev => 0x04,
634 features => FEAT_IN | FEAT_FAN | FEAT_TEMP,
635@@ -2349,6 +2371,10 @@
636 driver => "fam15h_power",
637 detect => sub { amd_pci_detect('1604') },
638 }, {
639+ name => "AMD Family 16h power sensors",
640+ driver => "fam15h_power",
641+ detect => sub { amd_pci_detect('1534') },
642+ }, {
643 name => "Intel digital thermal sensor",
644 driver => "coretemp",
645 detect => \&coretemp_detect,
646@@ -2463,9 +2489,12 @@
647
648 sub initialize_ioports
649 {
650- sysopen(IOPORTS, "/dev/port", O_RDWR)
651- or die "/dev/port: $!\n";
652- binmode(IOPORTS);
653+ if (sysopen(IOPORTS, "/dev/port", O_RDWR)) {
654+ binmode(IOPORTS);
655+ return 1;
656+ }
657+ print STDERR "/dev/port: $!\n";
658+ return 0;
659 }
660
661 sub close_ioports
662@@ -2765,9 +2794,19 @@
663 {
664 local $_;
665
666+ # /sys/module contains built-in drivers too, but doesn't exist on
667+ # older kernels (added in kernel 2.6.7)
668+ if (opendir(local *MODULES, "$sysfs_root/module")) {
669+ while (defined($_ = readdir(MODULES))) {
670+ next if m/^\./;
671+ $modules_list{$1} = 1 if m/^(\S*)/;
672+ }
673+ return;
674+ }
675+
676+ # Fall back to /proc/modules as it is always available
677 open(local *INPUTFILE, "/proc/modules") or return;
678 while (<INPUTFILE>) {
679- tr/-/_/; # Probably not needed
680 $modules_list{$1} = 1 if m/^(\S*)/;
681 }
682 }
683@@ -3493,13 +3532,14 @@
684 print("Can't set I2C address for $dev\n"),
685 next;
686
687- initialize_ioports();
688- $alias_detect = $detected->[$isa]->{alias_detect};
689- $is_alias = &$alias_detect($detected->[$isa]->{isa_addr},
690- \*FILE,
691- $detected->[$i2c]->{i2c_addr});
692+ if (initialize_ioports()) {
693+ $alias_detect = $detected->[$isa]->{alias_detect};
694+ $is_alias = &$alias_detect($detected->[$isa]->{isa_addr},
695+ \*FILE,
696+ $detected->[$i2c]->{i2c_addr});
697+ close_ioports();
698+ }
699 close(FILE);
700- close_ioports();
701
702 next unless $is_alias;
703 # This is an alias: copy the I2C data into the ISA
704@@ -4312,47 +4352,6 @@
705 return ($chip == 0) ? 4 : 2;
706 }
707
708-# Registers used:
709-# 0xAA: Temperature
710-# 0xA1: High limit
711-# 0xA2: Low limit
712-# 0xA8: Counter
713-# 0xA9: Slope
714-# 0xAC: Configuration
715-# Detection is weak. We check if bit 4 (NVB) is clear, because it is
716-# unlikely to be set (would mean that EEPROM is currently being accessed).
717-# We also check the value of the counter and slope registers, the datasheet
718-# doesn't mention the possible values but the conversion formula together
719-# with experimental evidence suggest possible sanity checks.
720-# Not all devices enjoy SMBus read word transactions, so we do as much as
721-# possible with read byte transactions first, and only use read word
722-# transactions second.
723-sub ds1621_detect
724-{
725- my ($file, $addr) = @_;
726-
727- my $conf = i2c_smbus_read_byte_data($file, 0xAC);
728- return if ($conf & 0x10);
729-
730- my $temp = i2c_smbus_read_word_data($file, 0xAA);
731- return if $temp < 0 || ($temp & 0x0f00);
732- # On the DS1631, the following two checks are too strict in theory,
733- # but in practice I very much doubt that anyone will set temperature
734- # limits not a multiple of 0.5 degrees C.
735- my $high = i2c_smbus_read_word_data($file, 0xA1);
736- return if $high < 0 || ($high & 0x7f00);
737- my $low = i2c_smbus_read_word_data($file, 0xA2);
738- return if $low < 0 || ($low & 0x7f00);
739-
740- return if ($temp == 0 && $high == 0 && $low == 0 && $conf == 0);
741-
742- # Old versions of the DS1621 apparently don't have the counter and
743- # slope registers (or they return crap)
744- my $counter = i2c_smbus_read_byte_data($file, 0xA8);
745- my $slope = i2c_smbus_read_byte_data($file, 0xA9);
746- return ($slope == 0x10 && $counter <= $slope) ? 3 : 2;
747-}
748-
749 # Chip to detect: 0 = LM80, 1 = LM96080
750 # Registers used:
751 # 0x00: Configuration register
752@@ -4499,7 +4498,7 @@
753 # 8 = W83L771W/G, 9 = TMP401, 10 = TMP411,
754 # 11 = W83L771AWG/ASG, 12 = MAX6690,
755 # 13 = ADT7461A/NCT1008, 14 = SA56004,
756-# 15 = G781
757+# 15 = G781, 16 = TMP431, 17 = TMP432
758 # Registers used:
759 # 0x03: Configuration
760 # 0x04: Conversion rate
761@@ -4617,6 +4616,18 @@
762 return if $mid != 0x47; # GMT
763 return 8 if $cid == 0x01; # G781
764 }
765+ if ($chip == 16) {
766+ return if ($conf & 0x1B) != 0;
767+ return if $rate > 0x0F;
768+ return if $mid != 0x55; # Texas Instruments
769+ return 6 if ($cid == 0x31); # TMP431A/B/C/D
770+ }
771+ if ($chip == 17) {
772+ return if ($conf & 0x1B) != 0;
773+ return if $rate > 0x0F;
774+ return if $mid != 0x55; # Texas Instruments
775+ return 6 if ($cid == 0x32); # TMP432A/B
776+ }
777 return;
778 }
779
780@@ -4688,14 +4699,17 @@
781 return 5;
782 }
783
784-# Chip to detect: 0 = LM95231, 1 = LM95241, 2 = LM95245
785+# Chip to detect: 0 = LM95231, 1 = LM95241, 2 = LM95245, 3 = LM95234
786 # Registers used:
787 # 0x02: Status (3 unused bits)
788 # 0x03: Configuration (3 unused bits)
789+# 0x04: Conversion rate (6 unused bits, LM95234)
790 # 0x06: Remote diode filter control (6 unused bits, LM95231 and LM95241)
791 # 0x30: Remote diode model type select (6 unused bits, LM95231 and LM95241)
792 # 0x30: Local Temperature LSB (5 unused bits, LM95245)
793+# 0x30: Diode model (4 unused bits, LM95234)
794 # 0x33: Status register 2 (6 unused bits, LM95245)
795+# 0x38: Diode model status (4 unused bits, LM95234)
796 # 0xfe: Manufacturer ID
797 # 0xff: Revision ID
798 sub lm95231_detect
799@@ -4719,6 +4733,13 @@
800 return if i2c_smbus_read_byte_data($file, 0x03) & 0xa1;
801 return if i2c_smbus_read_byte_data($file, 0x30) & 0x1f;
802 return if i2c_smbus_read_byte_data($file, 0x33) & 0x3f;
803+ } elsif ($chip == 3) {
804+ return if $cid != 0x79; # LM95234
805+ return if i2c_smbus_read_byte_data($file, 0x02) & 0x30;
806+ return if i2c_smbus_read_byte_data($file, 0x03) & 0xbc;
807+ return if i2c_smbus_read_byte_data($file, 0x04) & 0xfc;
808+ return if i2c_smbus_read_byte_data($file, 0x30) & 0xe1;
809+ return if i2c_smbus_read_byte_data($file, 0x38) & 0xe1;
810 }
811
812 return 6;
813@@ -6030,7 +6051,7 @@
814 # 4 = TS3000/TSE2002, 5 = MAX6604, 6 = MCP98242,
815 # 7 = MCP98243, 8 = MCP9843, 9 = CAT6095 / CAT34TS02,
816 # 10 = STTS424E, 11 = STTS2002, 12 = STTS3000
817-# 13 = MCP9804, 14 = AT30TS00
818+# 13 = MCP9804, 14 = AT30TS00, 15 = MCP98244
819 # Registers used:
820 # 0x00: Capabilities
821 # 0x01: Configuration
822@@ -6099,6 +6120,9 @@
823 } elsif ($chip == 14) {
824 return unless $manid == 0x00; # Atmel
825 return unless $devid == 0x82; # AT30TS00
826+ } elsif ($chip == 15) {
827+ return unless $manid == 0x00; # MCP
828+ return unless $devid == 0x22; # MCP98244
829 }
830
831 # Now, do it all again with words. Note that we get
832@@ -6156,6 +6180,9 @@
833 } elsif ($chip == 14) {
834 return unless $manid == 0x1f00; # Atmel
835 return unless ($devid & 0xfeff) == 0x0082; # AT30TS00
836+ } elsif ($chip == 15) {
837+ return unless $manid == 0x5400; # MCP
838+ return unless ($devid & 0xfcff) == 0x0022; # MCP98244
839 }
840
841 return 5;
842@@ -6754,10 +6781,11 @@
843 "standard I/O ports to probe them. This is usually safe.\n";
844 print "Do you want to scan for Super I/O sensors? (YES/no): ";
845 unless (<STDIN> =~ /^\s*n/i) {
846- initialize_ioports();
847- $superio_features |= scan_superio(0x2e, 0x2f);
848- $superio_features |= scan_superio(0x4e, 0x4f);
849- close_ioports();
850+ if (initialize_ioports()) {
851+ $superio_features |= scan_superio(0x2e, 0x2f);
852+ $superio_features |= scan_superio(0x4e, 0x4f);
853+ close_ioports();
854+ }
855 }
856 print "\n";
857
858@@ -6770,9 +6798,10 @@
859 "interfaces? (YES/no): ";
860 unless (<STDIN> =~ /^\s*n/i) {
861 if (!ipmi_from_smbios()) {
862- initialize_ioports();
863- scan_isa_bus(\@ipmi_ifs);
864- close_ioports();
865+ if (initialize_ioports()) {
866+ scan_isa_bus(\@ipmi_ifs);
867+ close_ioports();
868+ }
869 }
870 }
871 print "\n";
872@@ -6786,9 +6815,10 @@
873 $input = <STDIN>;
874 unless ($input =~ /^\s*n/i
875 || ($superio_features && $input !~ /^\s*y/i)) {
876- initialize_ioports();
877- scan_isa_bus(\@chip_ids);
878- close_ioports();
879+ if (initialize_ioports()) {
880+ scan_isa_bus(\@chip_ids);
881+ close_ioports();
882+ }
883 }
884 print "\n";
885 }
886
887=== modified file '.pc/09-sensors-detect-sch5524.patch/prog/detect/sensors-detect'
888--- .pc/09-sensors-detect-sch5524.patch/prog/detect/sensors-detect 2013-05-06 23:37:35 +0000
889+++ .pc/09-sensors-detect-sch5524.patch/prog/detect/sensors-detect 2014-01-03 03:11:39 +0000
890@@ -41,7 +41,7 @@
891 use vars qw(@pci_adapters @chip_ids @ipmi_ifs @non_hwmon_chip_ids
892 $i2c_addresses_to_scan $revision @i2c_byte_cache);
893
894-$revision = '$Revision: 6085 $ ($Date: 2012-10-30 18:18:45 +0100 (mar. 30 oct. 2012) $)';
895+$revision = '$Revision: 6170 $ ($Date: 2013-05-20 21:25:22 +0200 (lun. 20 mai 2013) $)';
896 $revision =~ s/\$\w+: (.*?) \$/$1/g;
897 $revision =~ s/ \([^()]*\)//;
898
899@@ -637,8 +637,8 @@
900 i2c_addrs => [0x2c..0x2e],
901 i2c_detect => sub { adt7490_detect(@_); },
902 }, {
903- name => "Analog Devices ADT7410",
904- driver => "to-be-written",
905+ name => "Analog Devices ADT7410/ADT7420",
906+ driver => "adt7410",
907 i2c_addrs => [0x48..0x4b],
908 i2c_detect => sub { adt7410_detect(@_); },
909 }, {
910@@ -803,11 +803,6 @@
911 i2c_addrs => [0x2c..0x2f],
912 i2c_detect => sub { adm9240_detect(@_, 0); },
913 }, {
914- name => "Dallas Semiconductor DS1621/DS1631",
915- driver => "ds1621",
916- i2c_addrs => [0x48..0x4f],
917- i2c_detect => sub { ds1621_detect(@_); },
918- }, {
919 name => "Dallas Semiconductor DS1780",
920 driver => "adm9240",
921 i2c_addrs => [0x2c..0x2f],
922@@ -1023,6 +1018,16 @@
923 i2c_addrs => [0x4c, 0x4d],
924 i2c_detect => sub { tmp42x_detect(@_, 2); },
925 }, {
926+ name => "Texas Instruments TMP431",
927+ driver => "to-be-written", # tmp401
928+ i2c_addrs => [0x4c, 0x4d],
929+ i2c_detect => sub { lm90_detect(@_, 16); },
930+ }, {
931+ name => "Texas Instruments TMP432",
932+ driver => "to-be-written", # tmp401
933+ i2c_addrs => [0x4c, 0x4d],
934+ i2c_detect => sub { lm90_detect(@_, 17); },
935+ }, {
936 name => "Texas Instruments AMC6821",
937 driver => "amc6821",
938 i2c_addrs => [0x18..0x1a, 0x2c..0x2e, 0x4c..0x4e],
939@@ -1033,6 +1038,11 @@
940 i2c_addrs => [0x2b, 0x19, 0x2a],
941 i2c_detect => sub { lm95231_detect(@_, 0); },
942 }, {
943+ name => "National Semiconductor LM95234",
944+ driver => "to-be-written", # lm95234
945+ i2c_addrs => [0x18, 0x4d, 0x4e],
946+ i2c_detect => sub { lm95231_detect(@_, 3); },
947+ }, {
948 name => "National Semiconductor LM95241",
949 driver => "lm95241",
950 i2c_addrs => [0x2b, 0x19, 0x2a],
951@@ -1400,6 +1410,11 @@
952 i2c_addrs => [0x18..0x1f],
953 i2c_detect => sub { jedec_JC42_4_detect(@_, 7); },
954 }, {
955+ name => "Microchip MCP98244",
956+ driver => "jc42",
957+ i2c_addrs => [0x18..0x1f],
958+ i2c_detect => sub { jedec_JC42_4_detect(@_, 15); },
959+ }, {
960 name => "Microchip MCP9843",
961 driver => "jc42",
962 i2c_addrs => [0x18..0x1f],
963@@ -1945,6 +1960,10 @@
964 logdev => 0x0b,
965 features => FEAT_IN | FEAT_FAN | FEAT_TEMP,
966 }, {
967+ name => "Winbond W83627SF/GF Super IO",
968+ driver => "not-a-sensor",
969+ devid => 0x59,
970+ }, {
971 name => "Winbond W83627THF/THG Super IO Sensors",
972 driver => "w83627hf",
973 devid => 0x82,
974@@ -2019,7 +2038,7 @@
975 logdev => 0x0b,
976 features => FEAT_IN | FEAT_FAN | FEAT_TEMP,
977 }, {
978- name => "Nuvoton W83677HG-I (NCT6771F/NCT6772F/NCT6775F) Super IO Sensors",
979+ name => "Nuvoton W83677HG-I (NCT5572D/NCT6771F/NCT6772F/NCT6775F) Super IO Sensors",
980 driver => "w83627ehf",
981 devid => 0xB470,
982 devid_mask => 0xFFF0,
983@@ -2030,27 +2049,24 @@
984 driver => "not-a-sensor",
985 devid => 0x61,
986 }, {
987- name => "Nuvoton NCT5577D Super IO Sensors",
988- driver => "to-be-written",
989- devid => 0xC331,
990- logdev => 0x0b,
991- features => FEAT_IN | FEAT_FAN | FEAT_TEMP,
992- }, {
993- name => "Nuvoton NCT6776F Super IO Sensors",
994- driver => "w83627ehf",
995- devid => 0xC333,
996- logdev => 0x0b,
997- features => FEAT_IN | FEAT_FAN | FEAT_TEMP,
998- }, {
999- name => "Nuvoton NCT6779D Super IO Sensors",
1000- driver => "to-be-written", # nct6775, new driver
1001- devid => 0xC562,
1002- logdev => 0x0b,
1003- features => FEAT_IN | FEAT_FAN | FEAT_TEMP,
1004- }, {
1005- name => "Nuvoton NCT6102D/NCT6106D Super IO Sensors",
1006- driver => "to-be-written", # nct6775, new driver
1007- devid => 0x1061,
1008+ name => "Nuvoton NCT5577D/NCT6776F Super IO Sensors",
1009+ driver => "nct6775",
1010+ devid => 0xC330,
1011+ devid_mask => 0xFFF0,
1012+ logdev => 0x0b,
1013+ features => FEAT_IN | FEAT_FAN | FEAT_TEMP,
1014+ }, {
1015+ name => "Nuvoton NCT5532D/NCT6779D Super IO Sensors",
1016+ driver => "nct6775",
1017+ devid => 0xC560,
1018+ devid_mask => 0xFFF0,
1019+ logdev => 0x0b,
1020+ features => FEAT_IN | FEAT_FAN | FEAT_TEMP,
1021+ }, {
1022+ name => "Nuvoton NCT6102D/NCT6104D/NCT6106D Super IO Sensors",
1023+ driver => "to-be-written", # nct6775
1024+ devid => 0xC450,
1025+ devid_mask => 0xFFF0,
1026 logdev => 0x0b,
1027 features => FEAT_IN | FEAT_FAN | FEAT_TEMP,
1028 }, {
1029@@ -2220,14 +2236,20 @@
1030 logdev => 0x04,
1031 features => FEAT_IN | FEAT_FAN | FEAT_TEMP,
1032 }, {
1033+ name => "ITE IT8752F Super IO Sensors",
1034+ driver => "to-be-written", # it87
1035+ devid => 0x8752,
1036+ logdev => 0x04,
1037+ features => FEAT_IN | FEAT_FAN | FEAT_TEMP,
1038+ }, {
1039 name => "ITE IT8771E Super IO Sensors",
1040- driver => "to-be-written", # it87
1041+ driver => "it87",
1042 devid => 0x8771,
1043 logdev => 0x04,
1044 features => FEAT_IN | FEAT_FAN | FEAT_TEMP,
1045 }, {
1046 name => "ITE IT8772E Super IO Sensors",
1047- driver => "to-be-written", # it87
1048+ driver => "it87",
1049 devid => 0x8772,
1050 logdev => 0x04,
1051 features => FEAT_IN | FEAT_FAN | FEAT_TEMP,
1052@@ -2239,13 +2261,13 @@
1053 features => FEAT_IN | FEAT_FAN | FEAT_TEMP,
1054 }, {
1055 name => "ITE IT8782F Super IO Sensors",
1056- driver => "to-be-written", # it87
1057+ driver => "it87",
1058 devid => 0x8782,
1059 logdev => 0x04,
1060 features => FEAT_IN | FEAT_FAN | FEAT_TEMP,
1061 }, {
1062 name => "ITE IT8783F Super IO Sensors",
1063- driver => "to-be-written", # it87
1064+ driver => "it87",
1065 devid => 0x8783,
1066 logdev => 0x04,
1067 features => FEAT_IN | FEAT_FAN | FEAT_TEMP,
1068@@ -2349,6 +2371,10 @@
1069 driver => "fam15h_power",
1070 detect => sub { amd_pci_detect('1604') },
1071 }, {
1072+ name => "AMD Family 16h power sensors",
1073+ driver => "fam15h_power",
1074+ detect => sub { amd_pci_detect('1534') },
1075+ }, {
1076 name => "Intel digital thermal sensor",
1077 driver => "coretemp",
1078 detect => \&coretemp_detect,
1079@@ -2463,9 +2489,12 @@
1080
1081 sub initialize_ioports
1082 {
1083- sysopen(IOPORTS, "/dev/port", O_RDWR)
1084- or die "/dev/port: $!\n";
1085- binmode(IOPORTS);
1086+ if (sysopen(IOPORTS, "/dev/port", O_RDWR)) {
1087+ binmode(IOPORTS);
1088+ return 1;
1089+ }
1090+ print STDERR "/dev/port: $!\n";
1091+ return 0;
1092 }
1093
1094 sub close_ioports
1095@@ -2765,9 +2794,19 @@
1096 {
1097 local $_;
1098
1099+ # /sys/module contains built-in drivers too, but doesn't exist on
1100+ # older kernels (added in kernel 2.6.7)
1101+ if (opendir(local *MODULES, "$sysfs_root/module")) {
1102+ while (defined($_ = readdir(MODULES))) {
1103+ next if m/^\./;
1104+ $modules_list{$1} = 1 if m/^(\S*)/;
1105+ }
1106+ return;
1107+ }
1108+
1109+ # Fall back to /proc/modules as it is always available
1110 open(local *INPUTFILE, "/proc/modules") or return;
1111 while (<INPUTFILE>) {
1112- tr/-/_/; # Probably not needed
1113 $modules_list{$1} = 1 if m/^(\S*)/;
1114 }
1115 }
1116@@ -3493,13 +3532,14 @@
1117 print("Can't set I2C address for $dev\n"),
1118 next;
1119
1120- initialize_ioports();
1121- $alias_detect = $detected->[$isa]->{alias_detect};
1122- $is_alias = &$alias_detect($detected->[$isa]->{isa_addr},
1123- \*FILE,
1124- $detected->[$i2c]->{i2c_addr});
1125+ if (initialize_ioports()) {
1126+ $alias_detect = $detected->[$isa]->{alias_detect};
1127+ $is_alias = &$alias_detect($detected->[$isa]->{isa_addr},
1128+ \*FILE,
1129+ $detected->[$i2c]->{i2c_addr});
1130+ close_ioports();
1131+ }
1132 close(FILE);
1133- close_ioports();
1134
1135 next unless $is_alias;
1136 # This is an alias: copy the I2C data into the ISA
1137@@ -4312,47 +4352,6 @@
1138 return ($chip == 0) ? 4 : 2;
1139 }
1140
1141-# Registers used:
1142-# 0xAA: Temperature
1143-# 0xA1: High limit
1144-# 0xA2: Low limit
1145-# 0xA8: Counter
1146-# 0xA9: Slope
1147-# 0xAC: Configuration
1148-# Detection is weak. We check if bit 4 (NVB) is clear, because it is
1149-# unlikely to be set (would mean that EEPROM is currently being accessed).
1150-# We also check the value of the counter and slope registers, the datasheet
1151-# doesn't mention the possible values but the conversion formula together
1152-# with experimental evidence suggest possible sanity checks.
1153-# Not all devices enjoy SMBus read word transactions, so we do as much as
1154-# possible with read byte transactions first, and only use read word
1155-# transactions second.
1156-sub ds1621_detect
1157-{
1158- my ($file, $addr) = @_;
1159-
1160- my $conf = i2c_smbus_read_byte_data($file, 0xAC);
1161- return if ($conf & 0x10);
1162-
1163- my $temp = i2c_smbus_read_word_data($file, 0xAA);
1164- return if $temp < 0 || ($temp & 0x0f00);
1165- # On the DS1631, the following two checks are too strict in theory,
1166- # but in practice I very much doubt that anyone will set temperature
1167- # limits not a multiple of 0.5 degrees C.
1168- my $high = i2c_smbus_read_word_data($file, 0xA1);
1169- return if $high < 0 || ($high & 0x7f00);
1170- my $low = i2c_smbus_read_word_data($file, 0xA2);
1171- return if $low < 0 || ($low & 0x7f00);
1172-
1173- return if ($temp == 0 && $high == 0 && $low == 0 && $conf == 0);
1174-
1175- # Old versions of the DS1621 apparently don't have the counter and
1176- # slope registers (or they return crap)
1177- my $counter = i2c_smbus_read_byte_data($file, 0xA8);
1178- my $slope = i2c_smbus_read_byte_data($file, 0xA9);
1179- return ($slope == 0x10 && $counter <= $slope) ? 3 : 2;
1180-}
1181-
1182 # Chip to detect: 0 = LM80, 1 = LM96080
1183 # Registers used:
1184 # 0x00: Configuration register
1185@@ -4499,7 +4498,7 @@
1186 # 8 = W83L771W/G, 9 = TMP401, 10 = TMP411,
1187 # 11 = W83L771AWG/ASG, 12 = MAX6690,
1188 # 13 = ADT7461A/NCT1008, 14 = SA56004,
1189-# 15 = G781
1190+# 15 = G781, 16 = TMP431, 17 = TMP432
1191 # Registers used:
1192 # 0x03: Configuration
1193 # 0x04: Conversion rate
1194@@ -4617,6 +4616,18 @@
1195 return if $mid != 0x47; # GMT
1196 return 8 if $cid == 0x01; # G781
1197 }
1198+ if ($chip == 16) {
1199+ return if ($conf & 0x1B) != 0;
1200+ return if $rate > 0x0F;
1201+ return if $mid != 0x55; # Texas Instruments
1202+ return 6 if ($cid == 0x31); # TMP431A/B/C/D
1203+ }
1204+ if ($chip == 17) {
1205+ return if ($conf & 0x1B) != 0;
1206+ return if $rate > 0x0F;
1207+ return if $mid != 0x55; # Texas Instruments
1208+ return 6 if ($cid == 0x32); # TMP432A/B
1209+ }
1210 return;
1211 }
1212
1213@@ -4688,14 +4699,17 @@
1214 return 5;
1215 }
1216
1217-# Chip to detect: 0 = LM95231, 1 = LM95241, 2 = LM95245
1218+# Chip to detect: 0 = LM95231, 1 = LM95241, 2 = LM95245, 3 = LM95234
1219 # Registers used:
1220 # 0x02: Status (3 unused bits)
1221 # 0x03: Configuration (3 unused bits)
1222+# 0x04: Conversion rate (6 unused bits, LM95234)
1223 # 0x06: Remote diode filter control (6 unused bits, LM95231 and LM95241)
1224 # 0x30: Remote diode model type select (6 unused bits, LM95231 and LM95241)
1225 # 0x30: Local Temperature LSB (5 unused bits, LM95245)
1226+# 0x30: Diode model (4 unused bits, LM95234)
1227 # 0x33: Status register 2 (6 unused bits, LM95245)
1228+# 0x38: Diode model status (4 unused bits, LM95234)
1229 # 0xfe: Manufacturer ID
1230 # 0xff: Revision ID
1231 sub lm95231_detect
1232@@ -4719,6 +4733,13 @@
1233 return if i2c_smbus_read_byte_data($file, 0x03) & 0xa1;
1234 return if i2c_smbus_read_byte_data($file, 0x30) & 0x1f;
1235 return if i2c_smbus_read_byte_data($file, 0x33) & 0x3f;
1236+ } elsif ($chip == 3) {
1237+ return if $cid != 0x79; # LM95234
1238+ return if i2c_smbus_read_byte_data($file, 0x02) & 0x30;
1239+ return if i2c_smbus_read_byte_data($file, 0x03) & 0xbc;
1240+ return if i2c_smbus_read_byte_data($file, 0x04) & 0xfc;
1241+ return if i2c_smbus_read_byte_data($file, 0x30) & 0xe1;
1242+ return if i2c_smbus_read_byte_data($file, 0x38) & 0xe1;
1243 }
1244
1245 return 6;
1246@@ -6030,7 +6051,7 @@
1247 # 4 = TS3000/TSE2002, 5 = MAX6604, 6 = MCP98242,
1248 # 7 = MCP98243, 8 = MCP9843, 9 = CAT6095 / CAT34TS02,
1249 # 10 = STTS424E, 11 = STTS2002, 12 = STTS3000
1250-# 13 = MCP9804, 14 = AT30TS00
1251+# 13 = MCP9804, 14 = AT30TS00, 15 = MCP98244
1252 # Registers used:
1253 # 0x00: Capabilities
1254 # 0x01: Configuration
1255@@ -6099,6 +6120,9 @@
1256 } elsif ($chip == 14) {
1257 return unless $manid == 0x00; # Atmel
1258 return unless $devid == 0x82; # AT30TS00
1259+ } elsif ($chip == 15) {
1260+ return unless $manid == 0x00; # MCP
1261+ return unless $devid == 0x22; # MCP98244
1262 }
1263
1264 # Now, do it all again with words. Note that we get
1265@@ -6156,6 +6180,9 @@
1266 } elsif ($chip == 14) {
1267 return unless $manid == 0x1f00; # Atmel
1268 return unless ($devid & 0xfeff) == 0x0082; # AT30TS00
1269+ } elsif ($chip == 15) {
1270+ return unless $manid == 0x5400; # MCP
1271+ return unless ($devid & 0xfcff) == 0x0022; # MCP98244
1272 }
1273
1274 return 5;
1275@@ -6754,10 +6781,11 @@
1276 "standard I/O ports to probe them. This is usually safe.\n";
1277 print "Do you want to scan for Super I/O sensors? (YES/no): ";
1278 unless (<STDIN> =~ /^\s*n/i) {
1279- initialize_ioports();
1280- $superio_features |= scan_superio(0x2e, 0x2f);
1281- $superio_features |= scan_superio(0x4e, 0x4f);
1282- close_ioports();
1283+ if (initialize_ioports()) {
1284+ $superio_features |= scan_superio(0x2e, 0x2f);
1285+ $superio_features |= scan_superio(0x4e, 0x4f);
1286+ close_ioports();
1287+ }
1288 }
1289 print "\n";
1290
1291@@ -6770,9 +6798,10 @@
1292 "interfaces? (YES/no): ";
1293 unless (<STDIN> =~ /^\s*n/i) {
1294 if (!ipmi_from_smbios()) {
1295- initialize_ioports();
1296- scan_isa_bus(\@ipmi_ifs);
1297- close_ioports();
1298+ if (initialize_ioports()) {
1299+ scan_isa_bus(\@ipmi_ifs);
1300+ close_ioports();
1301+ }
1302 }
1303 }
1304 print "\n";
1305@@ -6786,9 +6815,10 @@
1306 $input = <STDIN>;
1307 unless ($input =~ /^\s*n/i
1308 || ($superio_features && $input !~ /^\s*y/i)) {
1309- initialize_ioports();
1310- scan_isa_bus(\@chip_ids);
1311- close_ioports();
1312+ if (initialize_ioports()) {
1313+ scan_isa_bus(\@chip_ids);
1314+ close_ioports();
1315+ }
1316 }
1317 print "\n";
1318 }
1319
1320=== removed directory '.pc/10-pwmconfig.patch'
1321=== removed directory '.pc/10-pwmconfig.patch/prog'
1322=== removed directory '.pc/10-pwmconfig.patch/prog/pwm'
1323=== removed file '.pc/10-pwmconfig.patch/prog/pwm/pwmconfig'
1324--- .pc/10-pwmconfig.patch/prog/pwm/pwmconfig 2013-05-06 23:37:35 +0000
1325+++ .pc/10-pwmconfig.patch/prog/pwm/pwmconfig 1970-01-01 00:00:00 +0000
1326@@ -1,1019 +0,0 @@
1327-#!/bin/bash
1328-#
1329-# pwmconfig
1330-# Tests the pwm outputs of sensors and configures fancontrol
1331-# Supported Linux kernel versions: 2.6.5 and later
1332-#
1333-# Warning!!! This program will stop your fans, one at a time,
1334-# for approximately 5 seconds each!!!
1335-# This may cause your processor temperature to rise!!!
1336-# Verify that all fans are running at normal speed after this
1337-# program has exited!!!
1338-#
1339-# Copyright (C) 2007-2009 Jean Delvare <khali@linux-fr.org>
1340-#
1341-# This program is free software; you can redistribute it and/or modify
1342-# it under the terms of the GNU General Public License as published by
1343-# the Free Software Foundation; either version 2 of the License, or
1344-# (at your option) any later version.
1345-#
1346-# This program is distributed in the hope that it will be useful,
1347-# but WITHOUT ANY WARRANTY; without even the implied warranty of
1348-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1349-# GNU General Public License for more details.
1350-#
1351-# You should have received a copy of the GNU General Public License
1352-# along with this program; if not, write to the Free Software
1353-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
1354-# MA 02110-1301 USA.
1355-#
1356-#
1357-
1358-REVISION=$(echo '$Revision: 5857 $' | cut -d' ' -f2)
1359-REVDATE=$(echo '$Date: 2010-08-22 18:17:57 +0200 (dim. 22 août 2010) $' | cut -d' ' -f2)
1360-PIDFILE="/var/run/fancontrol.pid"
1361-
1362-if [ -f "$PIDFILE" ]
1363-then
1364- echo "File $PIDFILE exists. This typically means that the"
1365- echo "fancontrol deamon is running. You should stop it before running pwmconfig."
1366- echo "If you are certain that fancontrol is not running, then you can delete"
1367- echo "$PIDFILE manually."
1368- exit 1
1369-fi
1370-
1371-if [ "`id -u`" != "0" ]
1372-then
1373- echo "You need to be root to run this script."
1374- exit 1
1375-fi
1376-
1377-echo "# pwmconfig revision $REVISION ($REVDATE)"
1378-echo 'This program will search your sensors for pulse width modulation (pwm)'
1379-echo 'controls, and test each one to see if it controls a fan on'
1380-echo 'your motherboard. Note that many motherboards do not have pwm'
1381-echo 'circuitry installed, even if your sensor chip supports pwm.'
1382-echo
1383-echo 'We will attempt to briefly stop each fan using the pwm controls.'
1384-echo 'The program will attempt to restore each fan to full speed'
1385-echo 'after testing. However, it is ** very important ** that you'
1386-echo 'physically verify that the fans have been to full speed'
1387-echo 'after the program has completed.'
1388-echo
1389-
1390-DELAY=5 # 3 seconds delay is too short for large fans, thus I increased it to 5
1391-MAX=255
1392-
1393-if [ -d "/sys/class/hwmon" ]
1394-then
1395- SYSFS=2
1396- DIR="/sys/class/hwmon"
1397- PREFIX='hwmon*'
1398-elif [ -d "/sys/bus/i2c/devices" ]
1399-then
1400- SYSFS=1
1401- DIR="/sys/bus/i2c/devices"
1402- PREFIX='*-*'
1403-else
1404- echo $0: 'No sensors found! (modprobe sensor modules?)'
1405- exit 1
1406-fi
1407-
1408-cd $DIR
1409-DEVICES=`echo $PREFIX`
1410-if [ "$PREFIX" = "$DEVICES" ]
1411-then
1412- echo $0: 'No sensors found! (modprobe sensor modules?)'
1413- exit 1
1414-fi
1415-
1416-# We may need to adjust the device path
1417-if [ "$SYSFS" = "2" ]
1418-then
1419- OLD_DEVICES="$DEVICES"
1420- DEVICES=""
1421-
1422- for device in $OLD_DEVICES
1423- do
1424- if [ ! -r "$device/name" ]
1425- then
1426- device="$device/device"
1427- fi
1428-
1429- DEVICES="$DEVICES $device"
1430- done
1431-fi
1432-
1433-
1434-for device in $DEVICES
1435-do
1436- # Find available fan control outputs
1437- MATCH=$device/'pwm[1-9]'
1438- device_pwm=`echo $MATCH`
1439- if [ "$SYSFS" = "1" -a "$MATCH" = "$device_pwm" ]
1440- then
1441- # Deprecated naming scheme (used in kernels 2.6.5 to 2.6.9)
1442- MATCH=$device/'fan[1-9]_pwm'
1443- device_pwm=`echo $MATCH`
1444- fi
1445- if [ "$MATCH" != "$device_pwm" ]
1446- then
1447- PWM="$PWM $device_pwm"
1448- fi
1449-
1450- # Find available fan monitoring inputs
1451- MATCH=$device/'fan[1-9]_input'
1452- device_fan=`echo $MATCH`
1453- if [ "$MATCH" != "$device_fan" ]
1454- then
1455- FAN="$FAN $device_fan"
1456- fi
1457-done
1458-
1459-if [ -z "$PWM" ]
1460-then
1461- echo $0: 'There are no pwm-capable sensor modules installed'
1462- exit 1
1463-fi
1464-if [ -z "$FAN" ]
1465-then
1466- echo $0: 'There are no fan-capable sensor modules installed'
1467- exit 1
1468-fi
1469-
1470-# $1 = padding
1471-function print_devices()
1472-{
1473- local name
1474-
1475- for device in $DEVICES
1476- do
1477- name=`cat $device/name 2> /dev/null`
1478- [ -z "$name" ] && name="unknown (no name attribute)"
1479- echo "$1$device is $name"
1480- done
1481-}
1482-
1483-# $1 = pwm file name
1484-function is_pwm_auto()
1485-{
1486- ENABLE=${1}_enable
1487- if [ -f $ENABLE ]
1488- then
1489- if [ "`cat $ENABLE`" -gt 1 ]
1490- then
1491- return 0
1492- fi
1493- fi
1494-
1495- return 1
1496-}
1497-
1498-# $1 = pwm file name
1499-function pwmdisable()
1500-{
1501- ENABLE=${1}_enable
1502- # No enable file? Just set to max
1503- if [ ! -f $ENABLE ]
1504- then
1505- echo $MAX > $1
1506- return 0
1507- fi
1508-
1509- # Try pwmN_enable=0
1510- echo 0 2>/dev/null > $ENABLE
1511- if [ "`cat $ENABLE`" -eq 0 ]
1512- then
1513- # Success
1514- return 0
1515- fi
1516-
1517- # It didn't work, try pwmN_enable=1 pwmN=255
1518- echo 1 2>/dev/null > $ENABLE
1519- if [ "`cat $ENABLE`" -ne 1 ]
1520- then
1521- echo "$ENABLE stuck to `cat $ENABLE`" >&2
1522- return 1
1523- fi
1524-
1525- echo $MAX > $1
1526- if [ "`cat $1`" -ge 190 ]
1527- then
1528- # Success
1529- return 0
1530- fi
1531-
1532- # Nothing worked
1533- echo "$1 stuck to `cat $1`" >&2
1534- return 1
1535-}
1536-
1537-# $1 = pwm file name
1538-function pwmenable()
1539-{
1540- ENABLE=${1}_enable
1541- if [ -w $ENABLE ]
1542- then
1543- echo 1 2>/dev/null > $ENABLE
1544- if [ $? -ne 0 ]
1545- then
1546- return 1
1547- fi
1548- fi
1549- echo $MAX > $1
1550-}
1551-
1552-# $1 = pwm file name; $2 = pwm value 0-255
1553-function pwmset()
1554-{
1555- echo $2 > $1
1556-}
1557-
1558-echo 'Found the following devices:'
1559-print_devices " "
1560-echo
1561-
1562-echo 'Found the following PWM controls:'
1563-for i in $PWM
1564-do
1565- echo " $i"
1566- if [ -w $i ]
1567- then
1568- # First check if PWM output is in automatic mode
1569- if is_pwm_auto $i
1570- then
1571- echo "$i is currently setup for automatic speed control."
1572- echo 'In general, automatic mode is preferred over manual mode, as'
1573- echo 'it is more efficient and it reacts faster. Are you sure that'
1574- echo -n 'you want to setup this output for manual control? (n) '
1575- read X
1576- if [ "$X" = "" -o "$X" != "y" -a "$X" != "Y" ]
1577- then
1578- continue
1579- fi
1580- fi
1581-
1582- pwmdisable $i
1583- if [ $? -ne 0 ]
1584- then
1585- echo "Manual control mode not supported, skipping $i."
1586- elif [ "$GOODPWM" = "" ]
1587- then
1588- GOODPWM=$i
1589- else
1590- GOODPWM="$GOODPWM $i"
1591- fi
1592- else
1593- echo "Can't write to $i, skipping."
1594- fi
1595-done
1596-
1597-if [ "$GOODPWM" = "" ]
1598-then
1599- echo 'There are no usable PWM outputs.'
1600- exit 1
1601-fi
1602-
1603-echo
1604-echo "Giving the fans some time to reach full speed..."
1605-sleep $DELAY
1606-echo 'Found the following fan sensors:'
1607-for i in $FAN
1608-do
1609- S=`cat $i`
1610- if [ "$S" = "0" -o "$S" = "-1" ]
1611- then
1612- echo " $i current speed: 0 ... skipping!"
1613- else
1614- echo " $i current speed: $S RPM"
1615- if [ "$GOODFAN" = "" ]
1616- then
1617- GOODFAN=$i
1618- SPEEDS=$S
1619- else
1620- GOODFAN="$GOODFAN $i"
1621- SPEEDS="$SPEEDS $S"
1622- fi
1623- fi
1624-done
1625-echo
1626-
1627-if [ "$GOODFAN" = "" ]
1628-then
1629- echo 'There are no working fan sensors, all readings are 0.'
1630- echo 'Make sure you have a 3-wire fan connected.'
1631- echo 'You may also need to increase the fan divisors.'
1632- echo 'See doc/fan-divisors for more information.'
1633- exit 1
1634-fi
1635-
1636-echo 'Warning!!! This program will stop your fans, one at a time,'
1637-echo "for approximately $DELAY seconds each!!!"
1638-echo 'This may cause your processor temperature to rise!!!'
1639-echo 'If you do not want to do this hit control-C now!!!'
1640-echo -n 'Hit return to continue: '
1641-read X
1642-echo
1643-
1644-PLOTTER=gnuplot
1645-STEP=15
1646-PDELAY=2
1647-# Use a smaller step for low PWM values as this is typically where the
1648-# more important fan speed changes are happening.
1649-STEP2=2
1650-STEP2_BELOW=31
1651-
1652-function pwmdetail()
1653-{
1654- P=$1
1655- F=$2
1656- PLOT=
1657-
1658- type $PLOTTER > /dev/null 2>&1
1659- if [ $? -eq 0 ]
1660- then
1661- echo -n "Would you like to generate a graphical plot using $PLOTTER (y)? "
1662- read X
1663- if [ "$X" = "y" -o "$X" = "Y" -o "$X" = "" ]
1664- then
1665- PLOT=y
1666- fi
1667- else
1668- if [ -n "$DISPLAY" ]
1669- then
1670- echo "Note: If you had $PLOTTER installed, I could generate a graphical plot."
1671- fi
1672- fi
1673-
1674- if [ "$PLOT" = "y" ]
1675- then
1676- TMP1=`mktemp -t pwmtest1.XXXXXXXXXX` || { echo "$0: Cannot create temporary file" >&2; exit 1; }
1677- TMP2=`mktemp -t pwmtest2.XXXXXXXXXX` || { rm -f $TMP1 ; echo "$0: Cannot create temporary file" >&2; exit 1; }
1678- echo "set xlabel \"PWM: $P\"" > $TMP1
1679- echo "set ylabel \"FAN: $F (RPM)\"" >> $TMP1
1680- echo 'set nokey' >> $TMP1
1681- echo 'set xrange [0:255]' >> $TMP1
1682- echo "plot \"$TMP2\" with lines" >> $TMP1
1683- echo 'pause -1 " Hit return to continue..."' >> $TMP1
1684- > $TMP2
1685- fi
1686-
1687- local threshold=100000
1688- let pwm=$MAX
1689- pwmenable $P
1690- while [ $pwm -ge 0 ]
1691- do
1692- pwmset $P $pwm
1693- sleep $PDELAY
1694- if [ $? -ne 0 ]
1695- then
1696- pwmdisable $P
1697- echo '^C received, aborting...'
1698- rm -f $TMP1 $TMP2
1699- exit 1
1700- fi
1701- S=`cat $F`
1702- # Fan speed should never increase significantly
1703- if [ $S -gt $threshold ]
1704- then
1705- echo " PWM $pwm FAN $S (probably incorrect)"
1706- else
1707- echo " PWM $pwm FAN $S"
1708- let threshold=S*6/5
1709- fi
1710-
1711- if [ "$PLOT" = "y" ]
1712- then
1713- echo "$pwm $S" >> $TMP2
1714- fi
1715- if [ "$S" = "0" -o "$S" = "-1" ]
1716- then
1717- pwmdisable $P
1718- echo " Fan Stopped at PWM = $pwm"
1719- if [ $pwm -eq $MAX ]
1720- then
1721- echo " This fan appears to stop when the PWM is enabled;"
1722- echo " perhaps the fan input shares a pin with the PWM output"
1723- echo " on the sensor chip."
1724- echo " You cannot control this fan with this PWM output."
1725- rm -f $TMP1 $TMP2
1726- echo
1727- return 0
1728- fi
1729- break
1730- fi
1731- if [ $pwm -lt $STEP2_BELOW ]
1732- then
1733- let pwm=$pwm-$STEP2
1734- else
1735- let pwm=$pwm-$STEP
1736- fi
1737- done
1738- pwmdisable $P
1739- if [ "$PLOT" = "y" ]
1740- then
1741- $PLOTTER $TMP1
1742- rm -f $TMP1 $TMP2
1743- fi
1744- echo
1745-}
1746-
1747-for i in $GOODPWM
1748-do
1749- echo Testing pwm control $i ...
1750- pwmenable $i
1751- if [ $? -ne 0 ]
1752- then
1753- echo "Manual control mode not supported, skipping."
1754- continue
1755- fi
1756- pwmset $i 0
1757- sleep $DELAY
1758- if [ $? -ne 0 ]
1759- then
1760- pwmdisable $i
1761- echo '^C received, restoring PWM and aborting...'
1762- exit 1
1763- fi
1764-
1765- # Sample all current fan speeds at once, so that we can quickly
1766- # disable PWM and return all fans to full speed
1767- CURRENT_SPEEDS="`cat $GOODFAN`"
1768- pwmdisable $i
1769-
1770- let pwmactivecount=0
1771- let count=1
1772- for j in $GOODFAN
1773- do
1774- OS=`echo $SPEEDS | cut -d' ' -f$count`
1775- S=`echo $CURRENT_SPEEDS | cut -d' ' -f$count`
1776- echo " $j ... speed was $OS now $S"
1777- let threshold=2*$OS/3
1778- if [ $S -lt $threshold ]
1779- then
1780- echo " It appears that fan $j"
1781- echo " is controlled by pwm $i"
1782-#
1783-# a PWM can control more than one fan....
1784-#
1785- if [ $pwmactivecount -eq 0 ]
1786- then
1787- let pwmactivecount=1
1788- pwmactive="$i ${pwmactive}"
1789- fanactive="$j ${fanactive}"
1790- fanactive_min="$S ${fanactive_min}"
1791-
1792- # Give all correlated fans time to return to full speed
1793- sleep $DELAY
1794- if [ $? -ne 0 ]
1795- then
1796- echo '^C received, aborting...'
1797- exit 1
1798- fi
1799- else
1800- fanactive="$j+${fanactive}" #not supported yet by fancontrol
1801- fanactive_min="$S+${fanactive_min}"
1802- fi
1803- S=`cat $j`
1804- if [ $S -lt $threshold ]
1805- then
1806- echo " Fan $j has not returned to speed, please investigate!"
1807- else
1808- echo -n "Would you like to generate a detailed correlation (y)? "
1809- read X
1810- if [ "$X" = "y" -o "$X" = "Y" -o "$X" = "" ]
1811- then
1812- pwmdetail $i $j
1813- fi
1814- fi
1815- else
1816- echo " no correlation"
1817- fi
1818- let count=count+1
1819- done
1820- echo
1821- if [ "$pwmactivecount" = "0" ]
1822- then
1823- echo "No correlations were detected."
1824- echo "There is either no fan connected to the output of $i,"
1825- echo "or the connected fan has no rpm-signal connected to one of"
1826- echo "the tested fan sensors. (Note: not all motherboards have"
1827- echo "the pwm outputs connected to the fan connectors,"
1828- echo "check out the hardware database on http://www.almico.com/forumindex.php)"
1829- echo
1830- echo -n "Did you see/hear a fan stopping during the above test (n)? "
1831- read X
1832- if [ "$X" = "y" -o "$X" = "Y" ]
1833- then
1834- pwmactive="$i ${pwmactive}"
1835- fi
1836- echo
1837- fi
1838-done
1839-
1840-
1841-echo 'Testing is complete.'
1842-echo 'Please verify that all fans have returned to their normal speed.'
1843-echo
1844-echo 'The fancontrol script can automatically respond to temperature changes'
1845-echo 'of your system by changing fanspeeds.'
1846-echo -n 'Do you want to set up its configuration file now (y)? '
1847-
1848-read X
1849-if [ "$X" = "n" -o "$X" = "N" ]
1850-then
1851- exit
1852-fi
1853-
1854-for device in $DEVICES
1855-do
1856- # Find available temperature monitoring inputs
1857- MATCH=$device/'temp[1-9]_input'
1858- device_temp=`echo $MATCH`
1859- if [ "$MATCH" != "$device_temp" ]
1860- then
1861- TEMPS="$TEMPS $device_temp"
1862- fi
1863-done
1864-
1865-if [ -z "$TEMPS" ]
1866-then
1867- echo $0: 'There are no temperature-capable sensor modules installed'
1868- exit 1
1869-fi
1870-
1871-function DevicePath()
1872-{
1873- if [ -h "$1/device" ]
1874- then
1875- readlink -f "$1/device" | sed -e 's/^\/sys\///'
1876- fi
1877-}
1878-
1879-function DeviceName()
1880-{
1881- if [ -r "$1/name" ]
1882- then
1883- cat "$1/name" | sed -e 's/[[:space:]=]/_/g'
1884- elif [ -r "$1/device/name" ]
1885- then
1886- cat "$1/device/name" | sed -e 's/[[:space:]=]/_/g'
1887- fi
1888-}
1889-
1890-function ValidateDevices()
1891-{
1892- local OLD_DEVPATH="$1" OLD_DEVNAME="$2" outdated=0
1893- local entry device name path
1894-
1895- for entry in $OLD_DEVPATH
1896- do
1897- device=`echo "$entry" | sed -e 's/=[^=]*$//'`
1898- path=`echo "$entry" | sed -e 's/^[^=]*=//'`
1899-
1900- if [ "`DevicePath "$device"`" != "$path" ]
1901- then
1902- echo "Device path of $device has changed"
1903- outdated=1
1904- fi
1905- done
1906-
1907- for entry in $OLD_DEVNAME
1908- do
1909- device=`echo "$entry" | sed -e 's/=[^=]*$//'`
1910- name=`echo "$entry" | sed -e 's/^[^=]*=//'`
1911-
1912- if [ "`DeviceName "$device"`" != "$name" ]
1913- then
1914- echo "Device name of $device has changed"
1915- outdated=1
1916- fi
1917- done
1918-
1919- return $outdated
1920-}
1921-
1922-function AskPath()
1923-{
1924- echo -n 'What should be the path to your fancontrol config file (/etc/fancontrol)? '
1925-
1926- read FCCONFIG
1927- if [ "$FCCONFIG" = "" ]
1928- then
1929- FCCONFIG="/etc/fancontrol"
1930- fi
1931-}
1932-
1933-AskPath
1934-
1935-function ClearConfig()
1936-{
1937- FCTEMPS=""
1938- FCFANS=""
1939- MINTEMP=""
1940- MAXTEMP=""
1941- MINSTART=""
1942- MINSTOP=""
1943- MINPWM=""
1944- MAXPWM=""
1945-}
1946-
1947-function LoadConfig()
1948-{
1949- local OLD_DEVPATH OLD_DEVNAME
1950-
1951- # Nothing to do
1952- if [ ! -f "$1" ]
1953- then
1954- ClearConfig
1955- return 0
1956- fi
1957-
1958- echo "Loading configuration from $1 ..."
1959- INTERVAL=`egrep '^INTERVAL=.*$' $1 | sed -e 's/INTERVAL= *//g'`
1960- OLD_DEVPATH=`egrep '^DEVPATH=.*$' $1 | sed -e 's/DEVPATH= *//g'`
1961- OLD_DEVNAME=`egrep '^DEVNAME=.*$' $1 | sed -e 's/DEVNAME= *//g'`
1962- FCTEMPS=`egrep '^FCTEMPS=.*$' $1 | sed -e 's/FCTEMPS= *//g'`
1963- FCFANS=`egrep '^FCFANS=.*$' $1 | sed -e 's/FCFANS= *//g'`
1964- MINTEMP=`egrep '^MINTEMP=.*$' $1 | sed -e 's/MINTEMP= *//g'`
1965- MAXTEMP=`egrep '^MAXTEMP=.*$' $1 | sed -e 's/MAXTEMP= *//g'`
1966- MINSTART=`egrep '^MINSTART=.*$' $1 | sed -e 's/MINSTART= *//g'`
1967- MINSTOP=`egrep '^MINSTOP=.*$' $1 | sed -e 's/MINSTOP= *//g'`
1968- MINPWM=`egrep '^MINPWM=.*$' $1 | sed -e 's/MINPWM= *//g'`
1969- MAXPWM=`egrep '^MAXPWM=.*$' $1 | sed -e 's/MAXPWM= *//g'`
1970-
1971- # Check for configuration change
1972- if ! ValidateDevices "$OLD_DEVPATH" "$OLD_DEVNAME"
1973- then
1974- echo "Configuration appears to be outdated, discarded"
1975- ClearConfig
1976- return 0
1977- fi
1978-}
1979-
1980-LoadConfig $FCCONFIG
1981-
1982-# $1 = pwm value below which the fan is stopped
1983-function TestMinStart()
1984-{
1985- echo
1986- echo 'Now we increase the PWM value in 10-unit-steps.'
1987- echo 'Let the fan stop completely, then press return until the'
1988- echo "fan starts spinning. Then enter 'y'."
1989- echo 'We will use this value +20 as the starting speed.'
1990- let fanok=0
1991- let fanval="$1"
1992-
1993- pwmenable $pwms
1994- until [ "$fanok" = "1" ]
1995- do
1996- if [ $fanval -gt 240 ] ; then let fanval=$MAX ; let fanok=1 ; fi
1997- echo -n "Setting $pwms to $fanval..."
1998- pwmset $pwms $fanval
1999- read FANTEST
2000- if [ "$FANTEST" != "" ] ; then let fanok=1 ; fi
2001- let fanval=fanval+10
2002- done
2003- pwmdisable $pwms
2004-
2005- let fanval=fanval+20
2006- if [ $fanval -gt 240 ] ; then let fanval=$MAX ; fi
2007- echo "OK, using $fanval"
2008-}
2009-
2010-# $1 = fan input to read the fan speed from
2011-function TestMinStop()
2012-{
2013- local faninput=$1
2014- local threshold=100000
2015- local fanspeed
2016-
2017- echo
2018- echo 'Now we decrease the PWM value to figure out the lowest usable value.'
2019- echo 'We will use a slightly greater value as the minimum speed.'
2020- let fanval=$MAX
2021-
2022- pwmenable $pwms
2023- while [ $fanval -ge 0 ]
2024- do
2025- pwmset $pwms $fanval
2026- sleep $PDELAY
2027- fanspeed=`cat $faninput`
2028- if [ $fanspeed -gt $threshold ]
2029- then
2030- echo " PWM $fanval -> $fanspeed RPM (probably incorrect)"
2031- break
2032- else
2033- echo " PWM $fanval -> $fanspeed RPM"
2034- if [ $fanspeed = "0" -o $fanspeed = "-1" ]
2035- then
2036- break
2037- fi
2038- let threshold=fanspeed*6/5
2039- fi
2040- if [ $fanval -lt $STEP2_BELOW ]
2041- then
2042- let fanval=$fanval-$STEP2
2043- else
2044- let fanval=$fanval-$STEP
2045- fi
2046- done
2047- pwmdisable $pwms
2048-
2049- if [ $fanval -lt $STEP2_BELOW ]
2050- then
2051- let 'fanval=fanval+2*STEP2'
2052- else
2053- let 'fanval=fanval+STEP'
2054- fi
2055- echo "OK, using $fanval"
2056-}
2057-
2058-# Remember the path and name of each device with at least one
2059-# reference (pwm, temp or fan) in the configuration file.
2060-# This function sets globals DEVPATH and DEVNAME as a side effect.
2061-function RememberDevices()
2062-{
2063- local used entry device name path tempfandev pwmdev
2064- DEVPATH=""
2065- DEVNAME=""
2066-
2067- for device in $DEVICES
2068- do
2069- device=`echo "$device" | sed -e 's/\/.*$//'`
2070-
2071- used=0
2072- for entry in $1 $2
2073- do
2074- pwmdev=`echo "$entry" | sed -e 's/\/.*$//'`
2075- tempfandev=`echo "$entry" | sed -e 's/^[^=]*=//' -e 's/\/.*$//'`
2076-
2077- if [ "$device" = "$pwmdev" -o "$device" = "$tempfandev" ]
2078- then
2079- used=1
2080- fi
2081- done
2082- if [ "$used" -eq 0 ]
2083- then
2084- continue
2085- fi
2086-
2087- # Record the device path and name. This lets the fancontrol
2088- # script check that they didn't change. If they did, then the
2089- # configuration file can no longer be trusted.
2090- path=`DevicePath "$device"`
2091- if [ -z "$DEVPATH" ]
2092- then
2093- DEVPATH="$device=$path"
2094- else
2095- DEVPATH="$DEVPATH $device=$path"
2096- fi
2097-
2098- name=`DeviceName "$device"`
2099- if [ -z "$DEVNAME" ]
2100- then
2101- DEVNAME="$device=$name"
2102- else
2103- DEVNAME="$DEVNAME $device=$name"
2104- fi
2105- done
2106-}
2107-
2108-function SaveConfig()
2109-{
2110- RememberDevices "$FCTEMPS" "$FCFANS"
2111-
2112- echo
2113- echo "Saving configuration to $FCCONFIG..."
2114- tmpfile=`mktemp -t pwmcfg.XXXXXXXXXX` || { echo "$0: Cannot create temporary file" >&2; exit 1; }
2115- trap " [ -f \"$tmpfile\" ] && /bin/rm -f -- \"$tmpfile\"" 0 1 2 3 13 15
2116- echo "# Configuration file generated by pwmconfig, changes will be lost" >$tmpfile
2117- echo "INTERVAL=$INTERVAL" >>$tmpfile
2118- echo "DEVPATH=$DEVPATH" >>$tmpfile
2119- echo "DEVNAME=$DEVNAME" >>$tmpfile
2120- echo "FCTEMPS=$FCTEMPS" >>$tmpfile
2121- echo "FCFANS=$FCFANS" >>$tmpfile
2122- echo "MINTEMP=$MINTEMP" >>$tmpfile
2123- echo "MAXTEMP=$MAXTEMP" >>$tmpfile
2124- echo "MINSTART=$MINSTART" >>$tmpfile
2125- echo "MINSTOP=$MINSTOP" >>$tmpfile
2126- [ -n "$MINPWM" ] && echo "MINPWM=$MINPWM" >>$tmpfile
2127- [ -n "$MAXPWM" ] && echo "MAXPWM=$MAXPWM" >>$tmpfile
2128- mv $tmpfile $FCCONFIG
2129- chmod +r $FCCONFIG
2130- #check if file was written correctly
2131- echo 'Configuration saved'
2132-}
2133-
2134-INTERVAL=10
2135-PS3='select (1-n): '
2136-DEFMINTEMP=20
2137-DEFMAXTEMP=60
2138-DEFMINSTART=150
2139-DEFMINSTOP=100
2140-
2141-function filter_cfgvar()
2142-{
2143- echo "$1" | sed -e 's/ /\n/g' \
2144- | egrep "$2" \
2145- | sed -e 's/.*=//g'
2146-}
2147-
2148-# "select" won't repeat the list of options, so we enclose it in a
2149-# never-ending loop so that it starts over again with each iteration.
2150-# I admit it's not exactly nice, but I do not have a better idea to
2151-# keep usability at an acceptable level.
2152-while [ 1 ] ; do
2153-echo
2154-echo 'Select fan output to configure, or other action:'
2155-select pwms in $pwmactive "Change INTERVAL" "Just quit" "Save and quit" "Show configuration"; do
2156- case $pwms in
2157- "Change INTERVAL")
2158- echo
2159- echo "Current interval is $INTERVAL seconds."
2160- echo -n "Enter the interval at which fancontrol should update PWM values (in s): "
2161- read INTERVAL #check user input here
2162- break ;;
2163- "Just quit")
2164- exit ;;
2165- "Save and quit")
2166- SaveConfig
2167- exit ;;
2168- "Show configuration")
2169- echo
2170- echo "Common Settings:"
2171- echo "INTERVAL=$INTERVAL"
2172- for pwmo in $pwmactive
2173- do
2174- echo
2175- echo "Settings of ${pwmo}:"
2176- echo " Depends on `filter_cfgvar "$FCTEMPS" "$pwmo"`"
2177- echo " Controls `filter_cfgvar "$FCFANS" "$pwmo"`"
2178- echo " MINTEMP=`filter_cfgvar "$MINTEMP" $pwmo`"
2179- echo " MAXTEMP=`filter_cfgvar "$MAXTEMP" "$pwmo"`"
2180- echo " MINSTART=`filter_cfgvar "$MINSTART" "$pwmo"`"
2181- echo " MINSTOP=`filter_cfgvar "$MINSTOP" "$pwmo"`"
2182- XMINP=`filter_cfgvar "$MINPWM" "$pwmo"`
2183- [ -n "$XMINP" ] && echo " MINPWM=$XMINP"
2184- XMAXP=`filter_cfgvar "$MAXPWM" "$pwmo"`
2185- [ -n "$XMAXP" ] && echo " MAXPWM=$XMAXP"
2186- done
2187- echo
2188- break ;;
2189-
2190- "`echo ${pwmactive} |sed -e 's/ /\n/g' | egrep "${pwms}"`" )
2191- pwmsed=`echo ${pwms} | sed -e 's/\//\\\\\//g'` #escape / for sed
2192- echo
2193-
2194- echo 'Devices:'
2195- print_devices ""
2196- echo
2197-
2198- echo 'Current temperature readings are as follows:'
2199- for j in $TEMPS
2200- do
2201- S=`cat $j`
2202- let S="$S / 1000"
2203- echo "$j $S"
2204- done
2205- FAN=`echo $fanactive|cut -d' ' -f$REPLY`
2206- FAN_MIN=`echo $fanactive_min|cut -d' ' -f$REPLY`
2207- FCFANS="`echo $FCFANS | sed -e "s/${pwmsed}[^ ]* *//g"` ${pwms}=$FAN"
2208- echo
2209- echo "Select a temperature sensor as source for ${pwms}:"
2210- select tempss in $TEMPS "None (Do not affect this PWM output)"; do
2211- if [ "$tempss" = "None (Do not affect this PWM output)" ]
2212- then
2213-
2214- break;
2215- else
2216- if [ "$FCTEMPS" = "" ]
2217- then
2218- FCTEMPS="${pwms}=${tempss}"
2219- else
2220- FCTEMPS="`echo $FCTEMPS | sed -e "s/${pwmsed}[^ ]* *//g"` ${pwms}=${tempss}"
2221- fi
2222- fi
2223- echo
2224- echo 'Enter the low temperature (degree C)'
2225- echo -n "below which the fan should spin at minimum speed ($DEFMINTEMP): "
2226- read XMT
2227- if [ "$XMT" = "" ]
2228- then
2229- XMT=$DEFMINTEMP
2230- fi
2231- if [ "$MINTEMP" = "" ]
2232- then
2233- MINTEMP="${pwms}=${XMT}"
2234- else
2235- MINTEMP="`echo $MINTEMP | sed -e "s/${pwmsed}[^ ]* *//g"` ${pwms}=${XMT}"
2236- fi
2237- echo
2238- echo 'Enter the high temperature (degree C)'
2239- echo -n "over which the fan should spin at maximum speed ($DEFMAXTEMP): "
2240- read XMT
2241- if [ "$XMT" = "" ]
2242- then
2243- XMT=$DEFMAXTEMP
2244- fi
2245- if [ "$MAXTEMP" = "" ]
2246- then
2247- MAXTEMP="${pwms}=${XMT}"
2248- else
2249- MAXTEMP="`echo $MAXTEMP | sed -e "s/${pwmsed}[^ ]* *//g"` ${pwms}=${XMT}"
2250- fi
2251-
2252- if [ $FAN_MIN -eq 0 ]
2253- then
2254- echo
2255- echo "Enter the minimum PWM value (0-$MAX)"
2256- echo -n "at which the fan STOPS spinning (press t to test) ($DEFMINSTOP): "
2257- read XMSTOP
2258-
2259- if [ "$XMSTOP" = "" ]
2260- then
2261- XMSTOP=$DEFMINSTOP
2262- fi
2263- if [ "$XMSTOP" = "t" -o "$XMSTOP" = "T" ]
2264- then
2265- TestMinStop $FAN
2266- XMSTOP=$fanval
2267- fi
2268- else
2269- XMSTOP=0
2270- fi
2271- if [ "$MINSTOP" = "" ]
2272- then
2273- MINSTOP="${pwms}=${XMSTOP}"
2274- else
2275- MINSTOP="`echo $MINSTOP | sed -e "s/${pwmsed}[^ ]* *//g"` ${pwms}=${XMSTOP}"
2276- fi
2277-
2278- if [ $FAN_MIN -eq 0 ]
2279- then
2280- echo
2281- echo "Enter the minimum PWM value ($XMSTOP-$MAX)"
2282- echo -n "at which the fan STARTS spinning (press t to test) ($DEFMINSTART): "
2283- read XMSTART
2284-
2285- if [ "$XMSTART" = "" ]
2286- then
2287- XMSTART=$DEFMINSTART
2288- fi
2289- if [ "$XMSTART" = "t" -o "$XMSTART" = "T" ]
2290- then
2291- TestMinStart $XMSTOP
2292- XMSTART=$fanval
2293- fi
2294- else
2295- XMSTART=$DEFMINSTART
2296- fi
2297- if [ "$MINSTART" = "" ]
2298- then
2299- MINSTART="${pwms}=${XMSTART}"
2300- else
2301- MINSTART="`echo $MINSTART | sed -e "s/${pwmsed}[^ ]* *//g"` ${pwms}=${XMSTART}"
2302- fi
2303-
2304- if [ $XMSTOP -gt 0 ]
2305- then
2306- echo
2307- echo "Enter the PWM value (0-$XMSTOP) to use when the temperature"
2308- echo -n "is below the low temperature limit (0): "
2309- read XMINP
2310- else
2311- XMINP=""
2312- fi
2313- if [ -n "$XMINP" ]
2314- then
2315- if [ "$MINPWM" = "" ]
2316- then
2317- MINPWM="${pwms}=${XMINP}"
2318- else
2319- MINPWM="`echo $MINPWM | sed -e "s/${pwmsed}[^ ]* *//g"` ${pwms}=${XMINP}"
2320- fi
2321- fi
2322- echo
2323- echo "Enter the PWM value ($XMSTOP-$MAX) to use when the temperature"
2324- echo -n "is over the high temperature limit ($MAX): "
2325- read XMAXP
2326- if [ -n "$XMAXP" ]
2327- then
2328- if [ "$MAXPWM" = "" ]
2329- then
2330- MAXPWM="${pwms}=${XMAXP}"
2331- else
2332- MAXPWM="`echo $MAXPWM | sed -e "s/${pwmsed}[^ ]* *//g"` ${pwms}=${XMAXP}"
2333- fi
2334- fi
2335- echo
2336- break;
2337- done
2338- break ;;
2339-
2340- *)
2341- echo "No such option. Enter a number."
2342- break ;;
2343- esac
2344-done
2345-done
2346
2347=== modified file '.pc/100_recommend_using_upstart.patch/prog/detect/sensors-detect'
2348--- .pc/100_recommend_using_upstart.patch/prog/detect/sensors-detect 2013-05-09 21:55:15 +0000
2349+++ .pc/100_recommend_using_upstart.patch/prog/detect/sensors-detect 2014-01-03 03:11:39 +0000
2350@@ -41,7 +41,7 @@
2351 use vars qw(@pci_adapters @chip_ids @ipmi_ifs @non_hwmon_chip_ids
2352 $i2c_addresses_to_scan $revision @i2c_byte_cache);
2353
2354-$revision = '$Revision: 6085 $ ($Date: 2012-10-30 18:18:45 +0100 (mar. 30 oct. 2012) $)';
2355+$revision = '$Revision: 6170 $ ($Date: 2013-05-20 21:25:22 +0200 (lun. 20 mai 2013) $)';
2356 $revision =~ s/\$\w+: (.*?) \$/$1/g;
2357 $revision =~ s/ \([^()]*\)//;
2358
2359@@ -637,8 +637,8 @@
2360 i2c_addrs => [0x2c..0x2e],
2361 i2c_detect => sub { adt7490_detect(@_); },
2362 }, {
2363- name => "Analog Devices ADT7410",
2364- driver => "to-be-written",
2365+ name => "Analog Devices ADT7410/ADT7420",
2366+ driver => "adt7410",
2367 i2c_addrs => [0x48..0x4b],
2368 i2c_detect => sub { adt7410_detect(@_); },
2369 }, {
2370@@ -803,11 +803,6 @@
2371 i2c_addrs => [0x2c..0x2f],
2372 i2c_detect => sub { adm9240_detect(@_, 0); },
2373 }, {
2374- name => "Dallas Semiconductor DS1621/DS1631",
2375- driver => "ds1621",
2376- i2c_addrs => [0x48..0x4f],
2377- i2c_detect => sub { ds1621_detect(@_); },
2378- }, {
2379 name => "Dallas Semiconductor DS1780",
2380 driver => "adm9240",
2381 i2c_addrs => [0x2c..0x2f],
2382@@ -1023,6 +1018,16 @@
2383 i2c_addrs => [0x4c, 0x4d],
2384 i2c_detect => sub { tmp42x_detect(@_, 2); },
2385 }, {
2386+ name => "Texas Instruments TMP431",
2387+ driver => "to-be-written", # tmp401
2388+ i2c_addrs => [0x4c, 0x4d],
2389+ i2c_detect => sub { lm90_detect(@_, 16); },
2390+ }, {
2391+ name => "Texas Instruments TMP432",
2392+ driver => "to-be-written", # tmp401
2393+ i2c_addrs => [0x4c, 0x4d],
2394+ i2c_detect => sub { lm90_detect(@_, 17); },
2395+ }, {
2396 name => "Texas Instruments AMC6821",
2397 driver => "amc6821",
2398 i2c_addrs => [0x18..0x1a, 0x2c..0x2e, 0x4c..0x4e],
2399@@ -1033,6 +1038,11 @@
2400 i2c_addrs => [0x2b, 0x19, 0x2a],
2401 i2c_detect => sub { lm95231_detect(@_, 0); },
2402 }, {
2403+ name => "National Semiconductor LM95234",
2404+ driver => "to-be-written", # lm95234
2405+ i2c_addrs => [0x18, 0x4d, 0x4e],
2406+ i2c_detect => sub { lm95231_detect(@_, 3); },
2407+ }, {
2408 name => "National Semiconductor LM95241",
2409 driver => "lm95241",
2410 i2c_addrs => [0x2b, 0x19, 0x2a],
2411@@ -1400,6 +1410,11 @@
2412 i2c_addrs => [0x18..0x1f],
2413 i2c_detect => sub { jedec_JC42_4_detect(@_, 7); },
2414 }, {
2415+ name => "Microchip MCP98244",
2416+ driver => "jc42",
2417+ i2c_addrs => [0x18..0x1f],
2418+ i2c_detect => sub { jedec_JC42_4_detect(@_, 15); },
2419+ }, {
2420 name => "Microchip MCP9843",
2421 driver => "jc42",
2422 i2c_addrs => [0x18..0x1f],
2423@@ -1950,6 +1965,10 @@
2424 logdev => 0x0b,
2425 features => FEAT_IN | FEAT_FAN | FEAT_TEMP,
2426 }, {
2427+ name => "Winbond W83627SF/GF Super IO",
2428+ driver => "not-a-sensor",
2429+ devid => 0x59,
2430+ }, {
2431 name => "Winbond W83627THF/THG Super IO Sensors",
2432 driver => "w83627hf",
2433 devid => 0x82,
2434@@ -2024,7 +2043,7 @@
2435 logdev => 0x0b,
2436 features => FEAT_IN | FEAT_FAN | FEAT_TEMP,
2437 }, {
2438- name => "Nuvoton W83677HG-I (NCT6771F/NCT6772F/NCT6775F) Super IO Sensors",
2439+ name => "Nuvoton W83677HG-I (NCT5572D/NCT6771F/NCT6772F/NCT6775F) Super IO Sensors",
2440 driver => "w83627ehf",
2441 devid => 0xB470,
2442 devid_mask => 0xFFF0,
2443@@ -2035,27 +2054,24 @@
2444 driver => "not-a-sensor",
2445 devid => 0x61,
2446 }, {
2447- name => "Nuvoton NCT5577D Super IO Sensors",
2448- driver => "to-be-written",
2449- devid => 0xC331,
2450- logdev => 0x0b,
2451- features => FEAT_IN | FEAT_FAN | FEAT_TEMP,
2452- }, {
2453- name => "Nuvoton NCT6776F Super IO Sensors",
2454- driver => "w83627ehf",
2455- devid => 0xC333,
2456- logdev => 0x0b,
2457- features => FEAT_IN | FEAT_FAN | FEAT_TEMP,
2458- }, {
2459- name => "Nuvoton NCT6779D Super IO Sensors",
2460- driver => "to-be-written", # nct6775, new driver
2461- devid => 0xC562,
2462- logdev => 0x0b,
2463- features => FEAT_IN | FEAT_FAN | FEAT_TEMP,
2464- }, {
2465- name => "Nuvoton NCT6102D/NCT6106D Super IO Sensors",
2466- driver => "to-be-written", # nct6775, new driver
2467- devid => 0x1061,
2468+ name => "Nuvoton NCT5577D/NCT6776F Super IO Sensors",
2469+ driver => "nct6775",
2470+ devid => 0xC330,
2471+ devid_mask => 0xFFF0,
2472+ logdev => 0x0b,
2473+ features => FEAT_IN | FEAT_FAN | FEAT_TEMP,
2474+ }, {
2475+ name => "Nuvoton NCT5532D/NCT6779D Super IO Sensors",
2476+ driver => "nct6775",
2477+ devid => 0xC560,
2478+ devid_mask => 0xFFF0,
2479+ logdev => 0x0b,
2480+ features => FEAT_IN | FEAT_FAN | FEAT_TEMP,
2481+ }, {
2482+ name => "Nuvoton NCT6102D/NCT6104D/NCT6106D Super IO Sensors",
2483+ driver => "to-be-written", # nct6775
2484+ devid => 0xC450,
2485+ devid_mask => 0xFFF0,
2486 logdev => 0x0b,
2487 features => FEAT_IN | FEAT_FAN | FEAT_TEMP,
2488 }, {
2489@@ -2225,14 +2241,20 @@
2490 logdev => 0x04,
2491 features => FEAT_IN | FEAT_FAN | FEAT_TEMP,
2492 }, {
2493+ name => "ITE IT8752F Super IO Sensors",
2494+ driver => "to-be-written", # it87
2495+ devid => 0x8752,
2496+ logdev => 0x04,
2497+ features => FEAT_IN | FEAT_FAN | FEAT_TEMP,
2498+ }, {
2499 name => "ITE IT8771E Super IO Sensors",
2500- driver => "to-be-written", # it87
2501+ driver => "it87",
2502 devid => 0x8771,
2503 logdev => 0x04,
2504 features => FEAT_IN | FEAT_FAN | FEAT_TEMP,
2505 }, {
2506 name => "ITE IT8772E Super IO Sensors",
2507- driver => "to-be-written", # it87
2508+ driver => "it87",
2509 devid => 0x8772,
2510 logdev => 0x04,
2511 features => FEAT_IN | FEAT_FAN | FEAT_TEMP,
2512@@ -2244,13 +2266,13 @@
2513 features => FEAT_IN | FEAT_FAN | FEAT_TEMP,
2514 }, {
2515 name => "ITE IT8782F Super IO Sensors",
2516- driver => "to-be-written", # it87
2517+ driver => "it87",
2518 devid => 0x8782,
2519 logdev => 0x04,
2520 features => FEAT_IN | FEAT_FAN | FEAT_TEMP,
2521 }, {
2522 name => "ITE IT8783F Super IO Sensors",
2523- driver => "to-be-written", # it87
2524+ driver => "it87",
2525 devid => 0x8783,
2526 logdev => 0x04,
2527 features => FEAT_IN | FEAT_FAN | FEAT_TEMP,
2528@@ -2354,6 +2376,10 @@
2529 driver => "fam15h_power",
2530 detect => sub { amd_pci_detect('1604') },
2531 }, {
2532+ name => "AMD Family 16h power sensors",
2533+ driver => "fam15h_power",
2534+ detect => sub { amd_pci_detect('1534') },
2535+ }, {
2536 name => "Intel digital thermal sensor",
2537 driver => "coretemp",
2538 detect => \&coretemp_detect,
2539@@ -2468,9 +2494,12 @@
2540
2541 sub initialize_ioports
2542 {
2543- sysopen(IOPORTS, "/dev/port", O_RDWR)
2544- or die "/dev/port: $!\n";
2545- binmode(IOPORTS);
2546+ if (sysopen(IOPORTS, "/dev/port", O_RDWR)) {
2547+ binmode(IOPORTS);
2548+ return 1;
2549+ }
2550+ print STDERR "/dev/port: $!\n";
2551+ return 0;
2552 }
2553
2554 sub close_ioports
2555@@ -2770,9 +2799,19 @@
2556 {
2557 local $_;
2558
2559+ # /sys/module contains built-in drivers too, but doesn't exist on
2560+ # older kernels (added in kernel 2.6.7)
2561+ if (opendir(local *MODULES, "$sysfs_root/module")) {
2562+ while (defined($_ = readdir(MODULES))) {
2563+ next if m/^\./;
2564+ $modules_list{$1} = 1 if m/^(\S*)/;
2565+ }
2566+ return;
2567+ }
2568+
2569+ # Fall back to /proc/modules as it is always available
2570 open(local *INPUTFILE, "/proc/modules") or return;
2571 while (<INPUTFILE>) {
2572- tr/-/_/; # Probably not needed
2573 $modules_list{$1} = 1 if m/^(\S*)/;
2574 }
2575 }
2576@@ -3498,13 +3537,14 @@
2577 print("Can't set I2C address for $dev\n"),
2578 next;
2579
2580- initialize_ioports();
2581- $alias_detect = $detected->[$isa]->{alias_detect};
2582- $is_alias = &$alias_detect($detected->[$isa]->{isa_addr},
2583- \*FILE,
2584- $detected->[$i2c]->{i2c_addr});
2585+ if (initialize_ioports()) {
2586+ $alias_detect = $detected->[$isa]->{alias_detect};
2587+ $is_alias = &$alias_detect($detected->[$isa]->{isa_addr},
2588+ \*FILE,
2589+ $detected->[$i2c]->{i2c_addr});
2590+ close_ioports();
2591+ }
2592 close(FILE);
2593- close_ioports();
2594
2595 next unless $is_alias;
2596 # This is an alias: copy the I2C data into the ISA
2597@@ -4317,47 +4357,6 @@
2598 return ($chip == 0) ? 4 : 2;
2599 }
2600
2601-# Registers used:
2602-# 0xAA: Temperature
2603-# 0xA1: High limit
2604-# 0xA2: Low limit
2605-# 0xA8: Counter
2606-# 0xA9: Slope
2607-# 0xAC: Configuration
2608-# Detection is weak. We check if bit 4 (NVB) is clear, because it is
2609-# unlikely to be set (would mean that EEPROM is currently being accessed).
2610-# We also check the value of the counter and slope registers, the datasheet
2611-# doesn't mention the possible values but the conversion formula together
2612-# with experimental evidence suggest possible sanity checks.
2613-# Not all devices enjoy SMBus read word transactions, so we do as much as
2614-# possible with read byte transactions first, and only use read word
2615-# transactions second.
2616-sub ds1621_detect
2617-{
2618- my ($file, $addr) = @_;
2619-
2620- my $conf = i2c_smbus_read_byte_data($file, 0xAC);
2621- return if ($conf & 0x10);
2622-
2623- my $temp = i2c_smbus_read_word_data($file, 0xAA);
2624- return if $temp < 0 || ($temp & 0x0f00);
2625- # On the DS1631, the following two checks are too strict in theory,
2626- # but in practice I very much doubt that anyone will set temperature
2627- # limits not a multiple of 0.5 degrees C.
2628- my $high = i2c_smbus_read_word_data($file, 0xA1);
2629- return if $high < 0 || ($high & 0x7f00);
2630- my $low = i2c_smbus_read_word_data($file, 0xA2);
2631- return if $low < 0 || ($low & 0x7f00);
2632-
2633- return if ($temp == 0 && $high == 0 && $low == 0 && $conf == 0);
2634-
2635- # Old versions of the DS1621 apparently don't have the counter and
2636- # slope registers (or they return crap)
2637- my $counter = i2c_smbus_read_byte_data($file, 0xA8);
2638- my $slope = i2c_smbus_read_byte_data($file, 0xA9);
2639- return ($slope == 0x10 && $counter <= $slope) ? 3 : 2;
2640-}
2641-
2642 # Chip to detect: 0 = LM80, 1 = LM96080
2643 # Registers used:
2644 # 0x00: Configuration register
2645@@ -4504,7 +4503,7 @@
2646 # 8 = W83L771W/G, 9 = TMP401, 10 = TMP411,
2647 # 11 = W83L771AWG/ASG, 12 = MAX6690,
2648 # 13 = ADT7461A/NCT1008, 14 = SA56004,
2649-# 15 = G781
2650+# 15 = G781, 16 = TMP431, 17 = TMP432
2651 # Registers used:
2652 # 0x03: Configuration
2653 # 0x04: Conversion rate
2654@@ -4622,6 +4621,18 @@
2655 return if $mid != 0x47; # GMT
2656 return 8 if $cid == 0x01; # G781
2657 }
2658+ if ($chip == 16) {
2659+ return if ($conf & 0x1B) != 0;
2660+ return if $rate > 0x0F;
2661+ return if $mid != 0x55; # Texas Instruments
2662+ return 6 if ($cid == 0x31); # TMP431A/B/C/D
2663+ }
2664+ if ($chip == 17) {
2665+ return if ($conf & 0x1B) != 0;
2666+ return if $rate > 0x0F;
2667+ return if $mid != 0x55; # Texas Instruments
2668+ return 6 if ($cid == 0x32); # TMP432A/B
2669+ }
2670 return;
2671 }
2672
2673@@ -4693,14 +4704,17 @@
2674 return 5;
2675 }
2676
2677-# Chip to detect: 0 = LM95231, 1 = LM95241, 2 = LM95245
2678+# Chip to detect: 0 = LM95231, 1 = LM95241, 2 = LM95245, 3 = LM95234
2679 # Registers used:
2680 # 0x02: Status (3 unused bits)
2681 # 0x03: Configuration (3 unused bits)
2682+# 0x04: Conversion rate (6 unused bits, LM95234)
2683 # 0x06: Remote diode filter control (6 unused bits, LM95231 and LM95241)
2684 # 0x30: Remote diode model type select (6 unused bits, LM95231 and LM95241)
2685 # 0x30: Local Temperature LSB (5 unused bits, LM95245)
2686+# 0x30: Diode model (4 unused bits, LM95234)
2687 # 0x33: Status register 2 (6 unused bits, LM95245)
2688+# 0x38: Diode model status (4 unused bits, LM95234)
2689 # 0xfe: Manufacturer ID
2690 # 0xff: Revision ID
2691 sub lm95231_detect
2692@@ -4724,6 +4738,13 @@
2693 return if i2c_smbus_read_byte_data($file, 0x03) & 0xa1;
2694 return if i2c_smbus_read_byte_data($file, 0x30) & 0x1f;
2695 return if i2c_smbus_read_byte_data($file, 0x33) & 0x3f;
2696+ } elsif ($chip == 3) {
2697+ return if $cid != 0x79; # LM95234
2698+ return if i2c_smbus_read_byte_data($file, 0x02) & 0x30;
2699+ return if i2c_smbus_read_byte_data($file, 0x03) & 0xbc;
2700+ return if i2c_smbus_read_byte_data($file, 0x04) & 0xfc;
2701+ return if i2c_smbus_read_byte_data($file, 0x30) & 0xe1;
2702+ return if i2c_smbus_read_byte_data($file, 0x38) & 0xe1;
2703 }
2704
2705 return 6;
2706@@ -6035,7 +6056,7 @@
2707 # 4 = TS3000/TSE2002, 5 = MAX6604, 6 = MCP98242,
2708 # 7 = MCP98243, 8 = MCP9843, 9 = CAT6095 / CAT34TS02,
2709 # 10 = STTS424E, 11 = STTS2002, 12 = STTS3000
2710-# 13 = MCP9804, 14 = AT30TS00
2711+# 13 = MCP9804, 14 = AT30TS00, 15 = MCP98244
2712 # Registers used:
2713 # 0x00: Capabilities
2714 # 0x01: Configuration
2715@@ -6104,6 +6125,9 @@
2716 } elsif ($chip == 14) {
2717 return unless $manid == 0x00; # Atmel
2718 return unless $devid == 0x82; # AT30TS00
2719+ } elsif ($chip == 15) {
2720+ return unless $manid == 0x00; # MCP
2721+ return unless $devid == 0x22; # MCP98244
2722 }
2723
2724 # Now, do it all again with words. Note that we get
2725@@ -6161,6 +6185,9 @@
2726 } elsif ($chip == 14) {
2727 return unless $manid == 0x1f00; # Atmel
2728 return unless ($devid & 0xfeff) == 0x0082; # AT30TS00
2729+ } elsif ($chip == 15) {
2730+ return unless $manid == 0x5400; # MCP
2731+ return unless ($devid & 0xfcff) == 0x0022; # MCP98244
2732 }
2733
2734 return 5;
2735@@ -6759,10 +6786,11 @@
2736 "standard I/O ports to probe them. This is usually safe.\n";
2737 print "Do you want to scan for Super I/O sensors? (YES/no): ";
2738 unless (<STDIN> =~ /^\s*n/i) {
2739- initialize_ioports();
2740- $superio_features |= scan_superio(0x2e, 0x2f);
2741- $superio_features |= scan_superio(0x4e, 0x4f);
2742- close_ioports();
2743+ if (initialize_ioports()) {
2744+ $superio_features |= scan_superio(0x2e, 0x2f);
2745+ $superio_features |= scan_superio(0x4e, 0x4f);
2746+ close_ioports();
2747+ }
2748 }
2749 print "\n";
2750
2751@@ -6775,9 +6803,10 @@
2752 "interfaces? (YES/no): ";
2753 unless (<STDIN> =~ /^\s*n/i) {
2754 if (!ipmi_from_smbios()) {
2755- initialize_ioports();
2756- scan_isa_bus(\@ipmi_ifs);
2757- close_ioports();
2758+ if (initialize_ioports()) {
2759+ scan_isa_bus(\@ipmi_ifs);
2760+ close_ioports();
2761+ }
2762 }
2763 }
2764 print "\n";
2765@@ -6791,9 +6820,10 @@
2766 $input = <STDIN>;
2767 unless ($input =~ /^\s*n/i
2768 || ($superio_features && $input !~ /^\s*y/i)) {
2769- initialize_ioports();
2770- scan_isa_bus(\@chip_ids);
2771- close_ioports();
2772+ if (initialize_ioports()) {
2773+ scan_isa_bus(\@chip_ids);
2774+ close_ioports();
2775+ }
2776 }
2777 print "\n";
2778 }
2779
2780=== modified file '.pc/11-fancontrol-check.patch/prog/pwm/fancontrol'
2781--- .pc/11-fancontrol-check.patch/prog/pwm/fancontrol 2012-04-23 19:00:39 +0000
2782+++ .pc/11-fancontrol-check.patch/prog/pwm/fancontrol 2014-01-03 03:11:39 +0000
2783@@ -43,9 +43,10 @@
2784 #DEBUG=1
2785 MAX=255
2786
2787-declare -i pwmval
2788+function LoadConfig
2789+{
2790+ local fcvcount fcv
2791
2792-function LoadConfig {
2793 echo "Loading configuration from $1 ..."
2794 if [ ! -r "$1" ]
2795 then
2796@@ -206,8 +207,9 @@
2797 }
2798
2799 # Check that all referenced sysfs files exist
2800-function CheckFiles {
2801- local outdated=0
2802+function CheckFiles
2803+{
2804+ local outdated=0 fcvcount pwmo tsen fan
2805
2806 let fcvcount=0
2807 while (( $fcvcount < ${#AFCPWM[@]} )) # go through all pwm outputs
2808@@ -289,11 +291,16 @@
2809 cd $DIR
2810
2811 # Check for configuration change
2812-if [ -z "$DEVPATH" -o -z "$DEVNAME" ]
2813+if [ "$DIR" != "/" ] && [ -z "$DEVPATH" -o -z "$DEVNAME" ]
2814 then
2815 echo "Configuration is too old, please run pwmconfig again" >&2
2816 exit 1
2817 fi
2818+if [ "$DIR" = "/" -a -n "$DEVPATH" ]
2819+then
2820+ echo "Unneeded DEVPATH with absolute device paths" >&2
2821+ exit 1
2822+fi
2823 if ! ValidateDevices "$DEVPATH" "$DEVNAME"
2824 then
2825 echo "Configuration appears to be outdated, please run pwmconfig again" >&2
2826@@ -311,7 +318,8 @@
2827 # $1 = pwm file name
2828 function pwmdisable()
2829 {
2830- ENABLE=${1}_enable
2831+ local ENABLE=${1}_enable
2832+
2833 # No enable file? Just set to max
2834 if [ ! -f $ENABLE ]
2835 then
2836@@ -344,7 +352,8 @@
2837 # $1 = pwm file name
2838 function pwmenable()
2839 {
2840- ENABLE=${1}_enable
2841+ local ENABLE=${1}_enable
2842+
2843 if [ -f $ENABLE ]
2844 then
2845 echo 1 > $ENABLE 2> /dev/null
2846@@ -358,7 +367,8 @@
2847
2848 function restorefans()
2849 {
2850- local status=$1
2851+ local status=$1 fcvcount pwmo
2852+
2853 echo 'Aborting, restoring fans...'
2854 let fcvcount=0
2855 while (( $fcvcount < ${#AFCPWM[@]} )) # go through all pwm outputs
2856@@ -376,7 +386,13 @@
2857 trap 'restorefans 1' SIGHUP SIGINT
2858
2859 # main function
2860-function UpdateFanSpeeds {
2861+function UpdateFanSpeeds
2862+{
2863+ local fcvcount
2864+ local pwmo tsens fan mint maxt minsa minso minpwm maxpwm
2865+ local tval pwmpval fanval min_fanval one_fan one_fanval
2866+ local -i pwmval
2867+
2868 let fcvcount=0
2869 while (( $fcvcount < ${#AFCPWM[@]} )) # go through all pwm outputs
2870 do
2871
2872=== modified file '.pc/12-sensors-detect-superio-x86.patch/prog/detect/sensors-detect'
2873--- .pc/12-sensors-detect-superio-x86.patch/prog/detect/sensors-detect 2013-05-06 23:37:35 +0000
2874+++ .pc/12-sensors-detect-superio-x86.patch/prog/detect/sensors-detect 2014-01-03 03:11:39 +0000
2875@@ -41,7 +41,7 @@
2876 use vars qw(@pci_adapters @chip_ids @ipmi_ifs @non_hwmon_chip_ids
2877 $i2c_addresses_to_scan $revision @i2c_byte_cache);
2878
2879-$revision = '$Revision: 6085 $ ($Date: 2012-10-30 18:18:45 +0100 (mar. 30 oct. 2012) $)';
2880+$revision = '$Revision: 6170 $ ($Date: 2013-05-20 21:25:22 +0200 (lun. 20 mai 2013) $)';
2881 $revision =~ s/\$\w+: (.*?) \$/$1/g;
2882 $revision =~ s/ \([^()]*\)//;
2883
2884@@ -637,8 +637,8 @@
2885 i2c_addrs => [0x2c..0x2e],
2886 i2c_detect => sub { adt7490_detect(@_); },
2887 }, {
2888- name => "Analog Devices ADT7410",
2889- driver => "to-be-written",
2890+ name => "Analog Devices ADT7410/ADT7420",
2891+ driver => "adt7410",
2892 i2c_addrs => [0x48..0x4b],
2893 i2c_detect => sub { adt7410_detect(@_); },
2894 }, {
2895@@ -803,11 +803,6 @@
2896 i2c_addrs => [0x2c..0x2f],
2897 i2c_detect => sub { adm9240_detect(@_, 0); },
2898 }, {
2899- name => "Dallas Semiconductor DS1621/DS1631",
2900- driver => "ds1621",
2901- i2c_addrs => [0x48..0x4f],
2902- i2c_detect => sub { ds1621_detect(@_); },
2903- }, {
2904 name => "Dallas Semiconductor DS1780",
2905 driver => "adm9240",
2906 i2c_addrs => [0x2c..0x2f],
2907@@ -1023,6 +1018,16 @@
2908 i2c_addrs => [0x4c, 0x4d],
2909 i2c_detect => sub { tmp42x_detect(@_, 2); },
2910 }, {
2911+ name => "Texas Instruments TMP431",
2912+ driver => "to-be-written", # tmp401
2913+ i2c_addrs => [0x4c, 0x4d],
2914+ i2c_detect => sub { lm90_detect(@_, 16); },
2915+ }, {
2916+ name => "Texas Instruments TMP432",
2917+ driver => "to-be-written", # tmp401
2918+ i2c_addrs => [0x4c, 0x4d],
2919+ i2c_detect => sub { lm90_detect(@_, 17); },
2920+ }, {
2921 name => "Texas Instruments AMC6821",
2922 driver => "amc6821",
2923 i2c_addrs => [0x18..0x1a, 0x2c..0x2e, 0x4c..0x4e],
2924@@ -1033,6 +1038,11 @@
2925 i2c_addrs => [0x2b, 0x19, 0x2a],
2926 i2c_detect => sub { lm95231_detect(@_, 0); },
2927 }, {
2928+ name => "National Semiconductor LM95234",
2929+ driver => "to-be-written", # lm95234
2930+ i2c_addrs => [0x18, 0x4d, 0x4e],
2931+ i2c_detect => sub { lm95231_detect(@_, 3); },
2932+ }, {
2933 name => "National Semiconductor LM95241",
2934 driver => "lm95241",
2935 i2c_addrs => [0x2b, 0x19, 0x2a],
2936@@ -1400,6 +1410,11 @@
2937 i2c_addrs => [0x18..0x1f],
2938 i2c_detect => sub { jedec_JC42_4_detect(@_, 7); },
2939 }, {
2940+ name => "Microchip MCP98244",
2941+ driver => "jc42",
2942+ i2c_addrs => [0x18..0x1f],
2943+ i2c_detect => sub { jedec_JC42_4_detect(@_, 15); },
2944+ }, {
2945 name => "Microchip MCP9843",
2946 driver => "jc42",
2947 i2c_addrs => [0x18..0x1f],
2948@@ -1950,6 +1965,10 @@
2949 logdev => 0x0b,
2950 features => FEAT_IN | FEAT_FAN | FEAT_TEMP,
2951 }, {
2952+ name => "Winbond W83627SF/GF Super IO",
2953+ driver => "not-a-sensor",
2954+ devid => 0x59,
2955+ }, {
2956 name => "Winbond W83627THF/THG Super IO Sensors",
2957 driver => "w83627hf",
2958 devid => 0x82,
2959@@ -2024,7 +2043,7 @@
2960 logdev => 0x0b,
2961 features => FEAT_IN | FEAT_FAN | FEAT_TEMP,
2962 }, {
2963- name => "Nuvoton W83677HG-I (NCT6771F/NCT6772F/NCT6775F) Super IO Sensors",
2964+ name => "Nuvoton W83677HG-I (NCT5572D/NCT6771F/NCT6772F/NCT6775F) Super IO Sensors",
2965 driver => "w83627ehf",
2966 devid => 0xB470,
2967 devid_mask => 0xFFF0,
2968@@ -2035,27 +2054,24 @@
2969 driver => "not-a-sensor",
2970 devid => 0x61,
2971 }, {
2972- name => "Nuvoton NCT5577D Super IO Sensors",
2973- driver => "to-be-written",
2974- devid => 0xC331,
2975- logdev => 0x0b,
2976- features => FEAT_IN | FEAT_FAN | FEAT_TEMP,
2977- }, {
2978- name => "Nuvoton NCT6776F Super IO Sensors",
2979- driver => "w83627ehf",
2980- devid => 0xC333,
2981- logdev => 0x0b,
2982- features => FEAT_IN | FEAT_FAN | FEAT_TEMP,
2983- }, {
2984- name => "Nuvoton NCT6779D Super IO Sensors",
2985- driver => "to-be-written", # nct6775, new driver
2986- devid => 0xC562,
2987- logdev => 0x0b,
2988- features => FEAT_IN | FEAT_FAN | FEAT_TEMP,
2989- }, {
2990- name => "Nuvoton NCT6102D/NCT6106D Super IO Sensors",
2991- driver => "to-be-written", # nct6775, new driver
2992- devid => 0x1061,
2993+ name => "Nuvoton NCT5577D/NCT6776F Super IO Sensors",
2994+ driver => "nct6775",
2995+ devid => 0xC330,
2996+ devid_mask => 0xFFF0,
2997+ logdev => 0x0b,
2998+ features => FEAT_IN | FEAT_FAN | FEAT_TEMP,
2999+ }, {
3000+ name => "Nuvoton NCT5532D/NCT6779D Super IO Sensors",
3001+ driver => "nct6775",
3002+ devid => 0xC560,
3003+ devid_mask => 0xFFF0,
3004+ logdev => 0x0b,
3005+ features => FEAT_IN | FEAT_FAN | FEAT_TEMP,
3006+ }, {
3007+ name => "Nuvoton NCT6102D/NCT6104D/NCT6106D Super IO Sensors",
3008+ driver => "to-be-written", # nct6775
3009+ devid => 0xC450,
3010+ devid_mask => 0xFFF0,
3011 logdev => 0x0b,
3012 features => FEAT_IN | FEAT_FAN | FEAT_TEMP,
3013 }, {
3014@@ -2225,14 +2241,20 @@
3015 logdev => 0x04,
3016 features => FEAT_IN | FEAT_FAN | FEAT_TEMP,
3017 }, {
3018+ name => "ITE IT8752F Super IO Sensors",
3019+ driver => "to-be-written", # it87
3020+ devid => 0x8752,
3021+ logdev => 0x04,
3022+ features => FEAT_IN | FEAT_FAN | FEAT_TEMP,
3023+ }, {
3024 name => "ITE IT8771E Super IO Sensors",
3025- driver => "to-be-written", # it87
3026+ driver => "it87",
3027 devid => 0x8771,
3028 logdev => 0x04,
3029 features => FEAT_IN | FEAT_FAN | FEAT_TEMP,
3030 }, {
3031 name => "ITE IT8772E Super IO Sensors",
3032- driver => "to-be-written", # it87
3033+ driver => "it87",
3034 devid => 0x8772,
3035 logdev => 0x04,
3036 features => FEAT_IN | FEAT_FAN | FEAT_TEMP,
3037@@ -2244,13 +2266,13 @@
3038 features => FEAT_IN | FEAT_FAN | FEAT_TEMP,
3039 }, {
3040 name => "ITE IT8782F Super IO Sensors",
3041- driver => "to-be-written", # it87
3042+ driver => "it87",
3043 devid => 0x8782,
3044 logdev => 0x04,
3045 features => FEAT_IN | FEAT_FAN | FEAT_TEMP,
3046 }, {
3047 name => "ITE IT8783F Super IO Sensors",
3048- driver => "to-be-written", # it87
3049+ driver => "it87",
3050 devid => 0x8783,
3051 logdev => 0x04,
3052 features => FEAT_IN | FEAT_FAN | FEAT_TEMP,
3053@@ -2354,6 +2376,10 @@
3054 driver => "fam15h_power",
3055 detect => sub { amd_pci_detect('1604') },
3056 }, {
3057+ name => "AMD Family 16h power sensors",
3058+ driver => "fam15h_power",
3059+ detect => sub { amd_pci_detect('1534') },
3060+ }, {
3061 name => "Intel digital thermal sensor",
3062 driver => "coretemp",
3063 detect => \&coretemp_detect,
3064@@ -2468,9 +2494,12 @@
3065
3066 sub initialize_ioports
3067 {
3068- sysopen(IOPORTS, "/dev/port", O_RDWR)
3069- or die "/dev/port: $!\n";
3070- binmode(IOPORTS);
3071+ if (sysopen(IOPORTS, "/dev/port", O_RDWR)) {
3072+ binmode(IOPORTS);
3073+ return 1;
3074+ }
3075+ print STDERR "/dev/port: $!\n";
3076+ return 0;
3077 }
3078
3079 sub close_ioports
3080@@ -2770,9 +2799,19 @@
3081 {
3082 local $_;
3083
3084+ # /sys/module contains built-in drivers too, but doesn't exist on
3085+ # older kernels (added in kernel 2.6.7)
3086+ if (opendir(local *MODULES, "$sysfs_root/module")) {
3087+ while (defined($_ = readdir(MODULES))) {
3088+ next if m/^\./;
3089+ $modules_list{$1} = 1 if m/^(\S*)/;
3090+ }
3091+ return;
3092+ }
3093+
3094+ # Fall back to /proc/modules as it is always available
3095 open(local *INPUTFILE, "/proc/modules") or return;
3096 while (<INPUTFILE>) {
3097- tr/-/_/; # Probably not needed
3098 $modules_list{$1} = 1 if m/^(\S*)/;
3099 }
3100 }
3101@@ -3498,13 +3537,14 @@
3102 print("Can't set I2C address for $dev\n"),
3103 next;
3104
3105- initialize_ioports();
3106- $alias_detect = $detected->[$isa]->{alias_detect};
3107- $is_alias = &$alias_detect($detected->[$isa]->{isa_addr},
3108- \*FILE,
3109- $detected->[$i2c]->{i2c_addr});
3110+ if (initialize_ioports()) {
3111+ $alias_detect = $detected->[$isa]->{alias_detect};
3112+ $is_alias = &$alias_detect($detected->[$isa]->{isa_addr},
3113+ \*FILE,
3114+ $detected->[$i2c]->{i2c_addr});
3115+ close_ioports();
3116+ }
3117 close(FILE);
3118- close_ioports();
3119
3120 next unless $is_alias;
3121 # This is an alias: copy the I2C data into the ISA
3122@@ -4317,47 +4357,6 @@
3123 return ($chip == 0) ? 4 : 2;
3124 }
3125
3126-# Registers used:
3127-# 0xAA: Temperature
3128-# 0xA1: High limit
3129-# 0xA2: Low limit
3130-# 0xA8: Counter
3131-# 0xA9: Slope
3132-# 0xAC: Configuration
3133-# Detection is weak. We check if bit 4 (NVB) is clear, because it is
3134-# unlikely to be set (would mean that EEPROM is currently being accessed).
3135-# We also check the value of the counter and slope registers, the datasheet
3136-# doesn't mention the possible values but the conversion formula together
3137-# with experimental evidence suggest possible sanity checks.
3138-# Not all devices enjoy SMBus read word transactions, so we do as much as
3139-# possible with read byte transactions first, and only use read word
3140-# transactions second.
3141-sub ds1621_detect
3142-{
3143- my ($file, $addr) = @_;
3144-
3145- my $conf = i2c_smbus_read_byte_data($file, 0xAC);
3146- return if ($conf & 0x10);
3147-
3148- my $temp = i2c_smbus_read_word_data($file, 0xAA);
3149- return if $temp < 0 || ($temp & 0x0f00);
3150- # On the DS1631, the following two checks are too strict in theory,
3151- # but in practice I very much doubt that anyone will set temperature
3152- # limits not a multiple of 0.5 degrees C.
3153- my $high = i2c_smbus_read_word_data($file, 0xA1);
3154- return if $high < 0 || ($high & 0x7f00);
3155- my $low = i2c_smbus_read_word_data($file, 0xA2);
3156- return if $low < 0 || ($low & 0x7f00);
3157-
3158- return if ($temp == 0 && $high == 0 && $low == 0 && $conf == 0);
3159-
3160- # Old versions of the DS1621 apparently don't have the counter and
3161- # slope registers (or they return crap)
3162- my $counter = i2c_smbus_read_byte_data($file, 0xA8);
3163- my $slope = i2c_smbus_read_byte_data($file, 0xA9);
3164- return ($slope == 0x10 && $counter <= $slope) ? 3 : 2;
3165-}
3166-
3167 # Chip to detect: 0 = LM80, 1 = LM96080
3168 # Registers used:
3169 # 0x00: Configuration register
3170@@ -4504,7 +4503,7 @@
3171 # 8 = W83L771W/G, 9 = TMP401, 10 = TMP411,
3172 # 11 = W83L771AWG/ASG, 12 = MAX6690,
3173 # 13 = ADT7461A/NCT1008, 14 = SA56004,
3174-# 15 = G781
3175+# 15 = G781, 16 = TMP431, 17 = TMP432
3176 # Registers used:
3177 # 0x03: Configuration
3178 # 0x04: Conversion rate
3179@@ -4622,6 +4621,18 @@
3180 return if $mid != 0x47; # GMT
3181 return 8 if $cid == 0x01; # G781
3182 }
3183+ if ($chip == 16) {
3184+ return if ($conf & 0x1B) != 0;
3185+ return if $rate > 0x0F;
3186+ return if $mid != 0x55; # Texas Instruments
3187+ return 6 if ($cid == 0x31); # TMP431A/B/C/D
3188+ }
3189+ if ($chip == 17) {
3190+ return if ($conf & 0x1B) != 0;
3191+ return if $rate > 0x0F;
3192+ return if $mid != 0x55; # Texas Instruments
3193+ return 6 if ($cid == 0x32); # TMP432A/B
3194+ }
3195 return;
3196 }
3197
3198@@ -4693,14 +4704,17 @@
3199 return 5;
3200 }
3201
3202-# Chip to detect: 0 = LM95231, 1 = LM95241, 2 = LM95245
3203+# Chip to detect: 0 = LM95231, 1 = LM95241, 2 = LM95245, 3 = LM95234
3204 # Registers used:
3205 # 0x02: Status (3 unused bits)
3206 # 0x03: Configuration (3 unused bits)
3207+# 0x04: Conversion rate (6 unused bits, LM95234)
3208 # 0x06: Remote diode filter control (6 unused bits, LM95231 and LM95241)
3209 # 0x30: Remote diode model type select (6 unused bits, LM95231 and LM95241)
3210 # 0x30: Local Temperature LSB (5 unused bits, LM95245)
3211+# 0x30: Diode model (4 unused bits, LM95234)
3212 # 0x33: Status register 2 (6 unused bits, LM95245)
3213+# 0x38: Diode model status (4 unused bits, LM95234)
3214 # 0xfe: Manufacturer ID
3215 # 0xff: Revision ID
3216 sub lm95231_detect
3217@@ -4724,6 +4738,13 @@
3218 return if i2c_smbus_read_byte_data($file, 0x03) & 0xa1;
3219 return if i2c_smbus_read_byte_data($file, 0x30) & 0x1f;
3220 return if i2c_smbus_read_byte_data($file, 0x33) & 0x3f;
3221+ } elsif ($chip == 3) {
3222+ return if $cid != 0x79; # LM95234
3223+ return if i2c_smbus_read_byte_data($file, 0x02) & 0x30;
3224+ return if i2c_smbus_read_byte_data($file, 0x03) & 0xbc;
3225+ return if i2c_smbus_read_byte_data($file, 0x04) & 0xfc;
3226+ return if i2c_smbus_read_byte_data($file, 0x30) & 0xe1;
3227+ return if i2c_smbus_read_byte_data($file, 0x38) & 0xe1;
3228 }
3229
3230 return 6;
3231@@ -6035,7 +6056,7 @@
3232 # 4 = TS3000/TSE2002, 5 = MAX6604, 6 = MCP98242,
3233 # 7 = MCP98243, 8 = MCP9843, 9 = CAT6095 / CAT34TS02,
3234 # 10 = STTS424E, 11 = STTS2002, 12 = STTS3000
3235-# 13 = MCP9804, 14 = AT30TS00
3236+# 13 = MCP9804, 14 = AT30TS00, 15 = MCP98244
3237 # Registers used:
3238 # 0x00: Capabilities
3239 # 0x01: Configuration
3240@@ -6104,6 +6125,9 @@
3241 } elsif ($chip == 14) {
3242 return unless $manid == 0x00; # Atmel
3243 return unless $devid == 0x82; # AT30TS00
3244+ } elsif ($chip == 15) {
3245+ return unless $manid == 0x00; # MCP
3246+ return unless $devid == 0x22; # MCP98244
3247 }
3248
3249 # Now, do it all again with words. Note that we get
3250@@ -6161,6 +6185,9 @@
3251 } elsif ($chip == 14) {
3252 return unless $manid == 0x1f00; # Atmel
3253 return unless ($devid & 0xfeff) == 0x0082; # AT30TS00
3254+ } elsif ($chip == 15) {
3255+ return unless $manid == 0x5400; # MCP
3256+ return unless ($devid & 0xfcff) == 0x0022; # MCP98244
3257 }
3258
3259 return 5;
3260@@ -6759,10 +6786,11 @@
3261 "standard I/O ports to probe them. This is usually safe.\n";
3262 print "Do you want to scan for Super I/O sensors? (YES/no): ";
3263 unless (<STDIN> =~ /^\s*n/i) {
3264- initialize_ioports();
3265- $superio_features |= scan_superio(0x2e, 0x2f);
3266- $superio_features |= scan_superio(0x4e, 0x4f);
3267- close_ioports();
3268+ if (initialize_ioports()) {
3269+ $superio_features |= scan_superio(0x2e, 0x2f);
3270+ $superio_features |= scan_superio(0x4e, 0x4f);
3271+ close_ioports();
3272+ }
3273 }
3274 print "\n";
3275
3276@@ -6775,9 +6803,10 @@
3277 "interfaces? (YES/no): ";
3278 unless (<STDIN> =~ /^\s*n/i) {
3279 if (!ipmi_from_smbios()) {
3280- initialize_ioports();
3281- scan_isa_bus(\@ipmi_ifs);
3282- close_ioports();
3283+ if (initialize_ioports()) {
3284+ scan_isa_bus(\@ipmi_ifs);
3285+ close_ioports();
3286+ }
3287 }
3288 }
3289 print "\n";
3290@@ -6791,9 +6820,10 @@
3291 $input = <STDIN>;
3292 unless ($input =~ /^\s*n/i
3293 || ($superio_features && $input !~ /^\s*y/i)) {
3294- initialize_ioports();
3295- scan_isa_bus(\@chip_ids);
3296- close_ioports();
3297+ if (initialize_ioports()) {
3298+ scan_isa_bus(\@chip_ids);
3299+ close_ioports();
3300+ }
3301 }
3302 print "\n";
3303 }
3304
3305=== modified file '.pc/14-2-digits-kernel.patch/prog/detect/sensors-detect'
3306--- .pc/14-2-digits-kernel.patch/prog/detect/sensors-detect 2013-05-06 23:37:35 +0000
3307+++ .pc/14-2-digits-kernel.patch/prog/detect/sensors-detect 2014-01-03 03:11:39 +0000
3308@@ -41,7 +41,7 @@
3309 use vars qw(@pci_adapters @chip_ids @ipmi_ifs @non_hwmon_chip_ids
3310 $i2c_addresses_to_scan $revision @i2c_byte_cache);
3311
3312-$revision = '$Revision: 6085 $ ($Date: 2012-10-30 18:18:45 +0100 (mar. 30 oct. 2012) $)';
3313+$revision = '$Revision: 6170 $ ($Date: 2013-05-20 21:25:22 +0200 (lun. 20 mai 2013) $)';
3314 $revision =~ s/\$\w+: (.*?) \$/$1/g;
3315 $revision =~ s/ \([^()]*\)//;
3316
3317@@ -637,8 +637,8 @@
3318 i2c_addrs => [0x2c..0x2e],
3319 i2c_detect => sub { adt7490_detect(@_); },
3320 }, {
3321- name => "Analog Devices ADT7410",
3322- driver => "to-be-written",
3323+ name => "Analog Devices ADT7410/ADT7420",
3324+ driver => "adt7410",
3325 i2c_addrs => [0x48..0x4b],
3326 i2c_detect => sub { adt7410_detect(@_); },
3327 }, {
3328@@ -803,11 +803,6 @@
3329 i2c_addrs => [0x2c..0x2f],
3330 i2c_detect => sub { adm9240_detect(@_, 0); },
3331 }, {
3332- name => "Dallas Semiconductor DS1621/DS1631",
3333- driver => "ds1621",
3334- i2c_addrs => [0x48..0x4f],
3335- i2c_detect => sub { ds1621_detect(@_); },
3336- }, {
3337 name => "Dallas Semiconductor DS1780",
3338 driver => "adm9240",
3339 i2c_addrs => [0x2c..0x2f],
3340@@ -1023,6 +1018,16 @@
3341 i2c_addrs => [0x4c, 0x4d],
3342 i2c_detect => sub { tmp42x_detect(@_, 2); },
3343 }, {
3344+ name => "Texas Instruments TMP431",
3345+ driver => "to-be-written", # tmp401
3346+ i2c_addrs => [0x4c, 0x4d],
3347+ i2c_detect => sub { lm90_detect(@_, 16); },
3348+ }, {
3349+ name => "Texas Instruments TMP432",
3350+ driver => "to-be-written", # tmp401
3351+ i2c_addrs => [0x4c, 0x4d],
3352+ i2c_detect => sub { lm90_detect(@_, 17); },
3353+ }, {
3354 name => "Texas Instruments AMC6821",
3355 driver => "amc6821",
3356 i2c_addrs => [0x18..0x1a, 0x2c..0x2e, 0x4c..0x4e],
3357@@ -1033,6 +1038,11 @@
3358 i2c_addrs => [0x2b, 0x19, 0x2a],
3359 i2c_detect => sub { lm95231_detect(@_, 0); },
3360 }, {
3361+ name => "National Semiconductor LM95234",
3362+ driver => "to-be-written", # lm95234
3363+ i2c_addrs => [0x18, 0x4d, 0x4e],
3364+ i2c_detect => sub { lm95231_detect(@_, 3); },
3365+ }, {
3366 name => "National Semiconductor LM95241",
3367 driver => "lm95241",
3368 i2c_addrs => [0x2b, 0x19, 0x2a],
3369@@ -1400,6 +1410,11 @@
3370 i2c_addrs => [0x18..0x1f],
3371 i2c_detect => sub { jedec_JC42_4_detect(@_, 7); },
3372 }, {
3373+ name => "Microchip MCP98244",
3374+ driver => "jc42",
3375+ i2c_addrs => [0x18..0x1f],
3376+ i2c_detect => sub { jedec_JC42_4_detect(@_, 15); },
3377+ }, {
3378 name => "Microchip MCP9843",
3379 driver => "jc42",
3380 i2c_addrs => [0x18..0x1f],
3381@@ -1950,6 +1965,10 @@
3382 logdev => 0x0b,
3383 features => FEAT_IN | FEAT_FAN | FEAT_TEMP,
3384 }, {
3385+ name => "Winbond W83627SF/GF Super IO",
3386+ driver => "not-a-sensor",
3387+ devid => 0x59,
3388+ }, {
3389 name => "Winbond W83627THF/THG Super IO Sensors",
3390 driver => "w83627hf",
3391 devid => 0x82,
3392@@ -2024,7 +2043,7 @@
3393 logdev => 0x0b,
3394 features => FEAT_IN | FEAT_FAN | FEAT_TEMP,
3395 }, {
3396- name => "Nuvoton W83677HG-I (NCT6771F/NCT6772F/NCT6775F) Super IO Sensors",
3397+ name => "Nuvoton W83677HG-I (NCT5572D/NCT6771F/NCT6772F/NCT6775F) Super IO Sensors",
3398 driver => "w83627ehf",
3399 devid => 0xB470,
3400 devid_mask => 0xFFF0,
3401@@ -2035,27 +2054,24 @@
3402 driver => "not-a-sensor",
3403 devid => 0x61,
3404 }, {
3405- name => "Nuvoton NCT5577D Super IO Sensors",
3406- driver => "to-be-written",
3407- devid => 0xC331,
3408- logdev => 0x0b,
3409- features => FEAT_IN | FEAT_FAN | FEAT_TEMP,
3410- }, {
3411- name => "Nuvoton NCT6776F Super IO Sensors",
3412- driver => "w83627ehf",
3413- devid => 0xC333,
3414- logdev => 0x0b,
3415- features => FEAT_IN | FEAT_FAN | FEAT_TEMP,
3416- }, {
3417- name => "Nuvoton NCT6779D Super IO Sensors",
3418- driver => "to-be-written", # nct6775, new driver
3419- devid => 0xC562,
3420- logdev => 0x0b,
3421- features => FEAT_IN | FEAT_FAN | FEAT_TEMP,
3422- }, {
3423- name => "Nuvoton NCT6102D/NCT6106D Super IO Sensors",
3424- driver => "to-be-written", # nct6775, new driver
3425- devid => 0x1061,
3426+ name => "Nuvoton NCT5577D/NCT6776F Super IO Sensors",
3427+ driver => "nct6775",
3428+ devid => 0xC330,
3429+ devid_mask => 0xFFF0,
3430+ logdev => 0x0b,
3431+ features => FEAT_IN | FEAT_FAN | FEAT_TEMP,
3432+ }, {
3433+ name => "Nuvoton NCT5532D/NCT6779D Super IO Sensors",
3434+ driver => "nct6775",
3435+ devid => 0xC560,
3436+ devid_mask => 0xFFF0,
3437+ logdev => 0x0b,
3438+ features => FEAT_IN | FEAT_FAN | FEAT_TEMP,
3439+ }, {
3440+ name => "Nuvoton NCT6102D/NCT6104D/NCT6106D Super IO Sensors",
3441+ driver => "to-be-written", # nct6775
3442+ devid => 0xC450,
3443+ devid_mask => 0xFFF0,
3444 logdev => 0x0b,
3445 features => FEAT_IN | FEAT_FAN | FEAT_TEMP,
3446 }, {
3447@@ -2225,14 +2241,20 @@
3448 logdev => 0x04,
3449 features => FEAT_IN | FEAT_FAN | FEAT_TEMP,
3450 }, {
3451+ name => "ITE IT8752F Super IO Sensors",
3452+ driver => "to-be-written", # it87
3453+ devid => 0x8752,
3454+ logdev => 0x04,
3455+ features => FEAT_IN | FEAT_FAN | FEAT_TEMP,
3456+ }, {
3457 name => "ITE IT8771E Super IO Sensors",
3458- driver => "to-be-written", # it87
3459+ driver => "it87",
3460 devid => 0x8771,
3461 logdev => 0x04,
3462 features => FEAT_IN | FEAT_FAN | FEAT_TEMP,
3463 }, {
3464 name => "ITE IT8772E Super IO Sensors",
3465- driver => "to-be-written", # it87
3466+ driver => "it87",
3467 devid => 0x8772,
3468 logdev => 0x04,
3469 features => FEAT_IN | FEAT_FAN | FEAT_TEMP,
3470@@ -2244,13 +2266,13 @@
3471 features => FEAT_IN | FEAT_FAN | FEAT_TEMP,
3472 }, {
3473 name => "ITE IT8782F Super IO Sensors",
3474- driver => "to-be-written", # it87
3475+ driver => "it87",
3476 devid => 0x8782,
3477 logdev => 0x04,
3478 features => FEAT_IN | FEAT_FAN | FEAT_TEMP,
3479 }, {
3480 name => "ITE IT8783F Super IO Sensors",
3481- driver => "to-be-written", # it87
3482+ driver => "it87",
3483 devid => 0x8783,
3484 logdev => 0x04,
3485 features => FEAT_IN | FEAT_FAN | FEAT_TEMP,
3486@@ -2354,6 +2376,10 @@
3487 driver => "fam15h_power",
3488 detect => sub { amd_pci_detect('1604') },
3489 }, {
3490+ name => "AMD Family 16h power sensors",
3491+ driver => "fam15h_power",
3492+ detect => sub { amd_pci_detect('1534') },
3493+ }, {
3494 name => "Intel digital thermal sensor",
3495 driver => "coretemp",
3496 detect => \&coretemp_detect,
3497@@ -2468,9 +2494,12 @@
3498
3499 sub initialize_ioports
3500 {
3501- sysopen(IOPORTS, "/dev/port", O_RDWR)
3502- or die "/dev/port: $!\n";
3503- binmode(IOPORTS);
3504+ if (sysopen(IOPORTS, "/dev/port", O_RDWR)) {
3505+ binmode(IOPORTS);
3506+ return 1;
3507+ }
3508+ print STDERR "/dev/port: $!\n";
3509+ return 0;
3510 }
3511
3512 sub close_ioports
3513@@ -2770,9 +2799,19 @@
3514 {
3515 local $_;
3516
3517+ # /sys/module contains built-in drivers too, but doesn't exist on
3518+ # older kernels (added in kernel 2.6.7)
3519+ if (opendir(local *MODULES, "$sysfs_root/module")) {
3520+ while (defined($_ = readdir(MODULES))) {
3521+ next if m/^\./;
3522+ $modules_list{$1} = 1 if m/^(\S*)/;
3523+ }
3524+ return;
3525+ }
3526+
3527+ # Fall back to /proc/modules as it is always available
3528 open(local *INPUTFILE, "/proc/modules") or return;
3529 while (<INPUTFILE>) {
3530- tr/-/_/; # Probably not needed
3531 $modules_list{$1} = 1 if m/^(\S*)/;
3532 }
3533 }
3534@@ -3498,13 +3537,14 @@
3535 print("Can't set I2C address for $dev\n"),
3536 next;
3537
3538- initialize_ioports();
3539- $alias_detect = $detected->[$isa]->{alias_detect};
3540- $is_alias = &$alias_detect($detected->[$isa]->{isa_addr},
3541- \*FILE,
3542- $detected->[$i2c]->{i2c_addr});
3543+ if (initialize_ioports()) {
3544+ $alias_detect = $detected->[$isa]->{alias_detect};
3545+ $is_alias = &$alias_detect($detected->[$isa]->{isa_addr},
3546+ \*FILE,
3547+ $detected->[$i2c]->{i2c_addr});
3548+ close_ioports();
3549+ }
3550 close(FILE);
3551- close_ioports();
3552
3553 next unless $is_alias;
3554 # This is an alias: copy the I2C data into the ISA
3555@@ -4317,47 +4357,6 @@
3556 return ($chip == 0) ? 4 : 2;
3557 }
3558
3559-# Registers used:
3560-# 0xAA: Temperature
3561-# 0xA1: High limit
3562-# 0xA2: Low limit
3563-# 0xA8: Counter
3564-# 0xA9: Slope
3565-# 0xAC: Configuration
3566-# Detection is weak. We check if bit 4 (NVB) is clear, because it is
3567-# unlikely to be set (would mean that EEPROM is currently being accessed).
3568-# We also check the value of the counter and slope registers, the datasheet
3569-# doesn't mention the possible values but the conversion formula together
3570-# with experimental evidence suggest possible sanity checks.
3571-# Not all devices enjoy SMBus read word transactions, so we do as much as
3572-# possible with read byte transactions first, and only use read word
3573-# transactions second.
3574-sub ds1621_detect
3575-{
3576- my ($file, $addr) = @_;
3577-
3578- my $conf = i2c_smbus_read_byte_data($file, 0xAC);
3579- return if ($conf & 0x10);
3580-
3581- my $temp = i2c_smbus_read_word_data($file, 0xAA);
3582- return if $temp < 0 || ($temp & 0x0f00);
3583- # On the DS1631, the following two checks are too strict in theory,
3584- # but in practice I very much doubt that anyone will set temperature
3585- # limits not a multiple of 0.5 degrees C.
3586- my $high = i2c_smbus_read_word_data($file, 0xA1);
3587- return if $high < 0 || ($high & 0x7f00);
3588- my $low = i2c_smbus_read_word_data($file, 0xA2);
3589- return if $low < 0 || ($low & 0x7f00);
3590-
3591- return if ($temp == 0 && $high == 0 && $low == 0 && $conf == 0);
3592-
3593- # Old versions of the DS1621 apparently don't have the counter and
3594- # slope registers (or they return crap)
3595- my $counter = i2c_smbus_read_byte_data($file, 0xA8);
3596- my $slope = i2c_smbus_read_byte_data($file, 0xA9);
3597- return ($slope == 0x10 && $counter <= $slope) ? 3 : 2;
3598-}
3599-
3600 # Chip to detect: 0 = LM80, 1 = LM96080
3601 # Registers used:
3602 # 0x00: Configuration register
3603@@ -4504,7 +4503,7 @@
3604 # 8 = W83L771W/G, 9 = TMP401, 10 = TMP411,
3605 # 11 = W83L771AWG/ASG, 12 = MAX6690,
3606 # 13 = ADT7461A/NCT1008, 14 = SA56004,
3607-# 15 = G781
3608+# 15 = G781, 16 = TMP431, 17 = TMP432
3609 # Registers used:
3610 # 0x03: Configuration
3611 # 0x04: Conversion rate
3612@@ -4622,6 +4621,18 @@
3613 return if $mid != 0x47; # GMT
3614 return 8 if $cid == 0x01; # G781
3615 }
3616+ if ($chip == 16) {
3617+ return if ($conf & 0x1B) != 0;
3618+ return if $rate > 0x0F;
3619+ return if $mid != 0x55; # Texas Instruments
3620+ return 6 if ($cid == 0x31); # TMP431A/B/C/D
3621+ }
3622+ if ($chip == 17) {
3623+ return if ($conf & 0x1B) != 0;
3624+ return if $rate > 0x0F;
3625+ return if $mid != 0x55; # Texas Instruments
3626+ return 6 if ($cid == 0x32); # TMP432A/B
3627+ }
3628 return;
3629 }
3630
3631@@ -4693,14 +4704,17 @@
3632 return 5;
3633 }
3634
3635-# Chip to detect: 0 = LM95231, 1 = LM95241, 2 = LM95245
3636+# Chip to detect: 0 = LM95231, 1 = LM95241, 2 = LM95245, 3 = LM95234
3637 # Registers used:
3638 # 0x02: Status (3 unused bits)
3639 # 0x03: Configuration (3 unused bits)
3640+# 0x04: Conversion rate (6 unused bits, LM95234)
3641 # 0x06: Remote diode filter control (6 unused bits, LM95231 and LM95241)
3642 # 0x30: Remote diode model type select (6 unused bits, LM95231 and LM95241)
3643 # 0x30: Local Temperature LSB (5 unused bits, LM95245)
3644+# 0x30: Diode model (4 unused bits, LM95234)
3645 # 0x33: Status register 2 (6 unused bits, LM95245)
3646+# 0x38: Diode model status (4 unused bits, LM95234)
3647 # 0xfe: Manufacturer ID
3648 # 0xff: Revision ID
3649 sub lm95231_detect
3650@@ -4724,6 +4738,13 @@
3651 return if i2c_smbus_read_byte_data($file, 0x03) & 0xa1;
3652 return if i2c_smbus_read_byte_data($file, 0x30) & 0x1f;
3653 return if i2c_smbus_read_byte_data($file, 0x33) & 0x3f;
3654+ } elsif ($chip == 3) {
3655+ return if $cid != 0x79; # LM95234
3656+ return if i2c_smbus_read_byte_data($file, 0x02) & 0x30;
3657+ return if i2c_smbus_read_byte_data($file, 0x03) & 0xbc;
3658+ return if i2c_smbus_read_byte_data($file, 0x04) & 0xfc;
3659+ return if i2c_smbus_read_byte_data($file, 0x30) & 0xe1;
3660+ return if i2c_smbus_read_byte_data($file, 0x38) & 0xe1;
3661 }
3662
3663 return 6;
3664@@ -6035,7 +6056,7 @@
3665 # 4 = TS3000/TSE2002, 5 = MAX6604, 6 = MCP98242,
3666 # 7 = MCP98243, 8 = MCP9843, 9 = CAT6095 / CAT34TS02,
3667 # 10 = STTS424E, 11 = STTS2002, 12 = STTS3000
3668-# 13 = MCP9804, 14 = AT30TS00
3669+# 13 = MCP9804, 14 = AT30TS00, 15 = MCP98244
3670 # Registers used:
3671 # 0x00: Capabilities
3672 # 0x01: Configuration
3673@@ -6104,6 +6125,9 @@
3674 } elsif ($chip == 14) {
3675 return unless $manid == 0x00; # Atmel
3676 return unless $devid == 0x82; # AT30TS00
3677+ } elsif ($chip == 15) {
3678+ return unless $manid == 0x00; # MCP
3679+ return unless $devid == 0x22; # MCP98244
3680 }
3681
3682 # Now, do it all again with words. Note that we get
3683@@ -6161,6 +6185,9 @@
3684 } elsif ($chip == 14) {
3685 return unless $manid == 0x1f00; # Atmel
3686 return unless ($devid & 0xfeff) == 0x0082; # AT30TS00
3687+ } elsif ($chip == 15) {
3688+ return unless $manid == 0x5400; # MCP
3689+ return unless ($devid & 0xfcff) == 0x0022; # MCP98244
3690 }
3691
3692 return 5;
3693@@ -6759,10 +6786,11 @@
3694 "standard I/O ports to probe them. This is usually safe.\n";
3695 print "Do you want to scan for Super I/O sensors? (YES/no): ";
3696 unless (<STDIN> =~ /^\s*n/i) {
3697- initialize_ioports();
3698- $superio_features |= scan_superio(0x2e, 0x2f);
3699- $superio_features |= scan_superio(0x4e, 0x4f);
3700- close_ioports();
3701+ if (initialize_ioports()) {
3702+ $superio_features |= scan_superio(0x2e, 0x2f);
3703+ $superio_features |= scan_superio(0x4e, 0x4f);
3704+ close_ioports();
3705+ }
3706 }
3707 print "\n";
3708
3709@@ -6775,9 +6803,10 @@
3710 "interfaces? (YES/no): ";
3711 unless (<STDIN> =~ /^\s*n/i) {
3712 if (!ipmi_from_smbios()) {
3713- initialize_ioports();
3714- scan_isa_bus(\@ipmi_ifs);
3715- close_ioports();
3716+ if (initialize_ioports()) {
3717+ scan_isa_bus(\@ipmi_ifs);
3718+ close_ioports();
3719+ }
3720 }
3721 }
3722 print "\n";
3723@@ -6791,9 +6820,10 @@
3724 $input = <STDIN>;
3725 unless ($input =~ /^\s*n/i
3726 || ($superio_features && $input !~ /^\s*y/i)) {
3727- initialize_ioports();
3728- scan_isa_bus(\@chip_ids);
3729- close_ioports();
3730+ if (initialize_ioports()) {
3731+ scan_isa_bus(\@chip_ids);
3732+ close_ioports();
3733+ }
3734 }
3735 print "\n";
3736 }
3737
3738=== modified file '.pc/applied-patches'
3739--- .pc/applied-patches 2013-05-09 21:55:15 +0000
3740+++ .pc/applied-patches 2014-01-03 03:11:39 +0000
3741@@ -7,7 +7,6 @@
3742 07-sensors3.conf-local-changes.patch
3743 08-sensors-detect-lm85.patch
3744 09-sensors-detect-sch5524.patch
3745-10-pwmconfig.patch
3746 11-fancontrol-check.patch
3747 12-sensors-detect-superio-x86.patch
3748 14-2-digits-kernel.patch
3749
3750=== modified file 'CHANGES'
3751--- CHANGES 2013-05-09 21:55:15 +0000
3752+++ CHANGES 2014-01-03 03:11:39 +0000
3753@@ -1,6 +1,25 @@
3754 lm-sensors CHANGES file
3755 -----------------------
3756
3757+3.3.4 (2013-05-27)
3758+ sensors.conf.5: Mention "sensors -u" to get the raw feature names
3759+ sensors: Clarify what option -u is good for
3760+ fancontrol: Fix handling of absolute paths in config
3761+ pwmconfig: Print the initial PWM values
3762+ Raise the detection threshold to 3/4
3763+ Properly deal with multiple fan control
3764+ sensors-detect: Add detection of AMD family 16h power sensors
3765+ Map IT8771E, IT8772E, IT8782F and IT8783F to it87
3766+ Use /sys/module instead of /proc/modules where available
3767+ Drop legacy sysconfig configuration file syntax
3768+ Stay alive when /dev/port is missing
3769+ Add detection of IT8752F
3770+ Add detection of MCP98244
3771+ Add detection of LM95234
3772+ Add detection of TMP431/TMP432
3773+ Update Nuvoton chip information and NCT6106D chip detection
3774+ Drop unreliable DS1621/DS1631 detection
3775+
3776 3.3.3 "Happy Birthday Sophie" (2012-11-06)
3777 documentation: Update fan-divisors, fan divisors are optional
3778 libsensors: Fix warning about library path not in /etc/ld.so.conf
3779
3780=== modified file 'debian/changelog'
3781--- debian/changelog 2013-05-09 21:55:15 +0000
3782+++ debian/changelog 2014-01-03 03:11:39 +0000
3783@@ -1,3 +1,26 @@
3784+lm-sensors (1:3.3.4-2ubuntu1) trusty; urgency=low
3785+
3786+ * Merge from Debian unstable (LP: #1256671). Remaining changes:
3787+ - Add 100_recommend_using_upstart.patch: Recommend use of upstart rather
3788+ than init-script.
3789+
3790+ -- Matt Fischer <mfisch@ubuntu.com> Mon, 02 Dec 2013 21:07:32 -0700
3791+
3792+lm-sensors (1:3.3.4-2) unstable; urgency=low
3793+
3794+ * debian/fancontrol.init: pass the config file location as argument of
3795+ the fancontrol daemon (closes: #720213).
3796+
3797+ -- Aurelien Jarno <aurel32@debian.org> Tue, 27 Aug 2013 18:36:05 +0200
3798+
3799+lm-sensors (1:3.3.4-1) unstable; urgency=low
3800+
3801+ * New upstream version.
3802+ * Use dh-systemd to get proper systemd related maintainer scripts,
3803+ based on a patch from Michael Stapelberg (closes: #714190).
3804+
3805+ -- Aurelien Jarno <aurel32@debian.org> Sat, 29 Jun 2013 16:37:48 +0200
3806+
3807 lm-sensors (1:3.3.3-1ubuntu1) saucy; urgency=low
3808
3809 * Merge from Debian unstable (LP: #1178520). Remaining changes:
3810
3811=== modified file 'debian/control'
3812--- debian/control 2013-05-09 21:55:15 +0000
3813+++ debian/control 2014-01-03 03:11:39 +0000
3814@@ -1,7 +1,7 @@
3815 Source: lm-sensors
3816 Section: utils
3817 Priority: extra
3818-Build-Depends: debhelper (>= 8.1.3), bison, flex, librrd2-dev
3819+Build-Depends: debhelper (>= 8.1.3), bison, flex, librrd2-dev, dh-systemd (>= 1.3)
3820 Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
3821 XSBC-Original-Maintainer: Aurelien Jarno <aurel32@debian.org>
3822 Standards-Version: 3.9.4
3823
3824=== modified file 'debian/fancontrol.init'
3825--- debian/fancontrol.init 2011-06-20 21:25:57 +0000
3826+++ debian/fancontrol.init 2014-01-03 03:11:39 +0000
3827@@ -25,9 +25,9 @@
3828 case "$1" in
3829 start)
3830 if [ -f $CONF ] ; then
3831- if $DAEMON --check 1>/dev/null 2>/dev/null ; then
3832+ if $DAEMON --check $CONF 1>/dev/null 2>/dev/null ; then
3833 log_daemon_msg "Starting $DESC" "$NAME"
3834- start-stop-daemon --start --quiet --background --pidfile $PIDFILE --startas $DAEMON
3835+ start-stop-daemon --start --quiet --background --pidfile $PIDFILE --startas $DAEMON $CONF
3836 log_end_msg $?
3837 else
3838 log_failure_msg "Not starting fancontrol, broken configuration file; please re-run pwmconfig."
3839@@ -40,7 +40,7 @@
3840 ;;
3841 stop)
3842 log_daemon_msg "Stopping $DESC" "$NAME"
3843- start-stop-daemon --stop --quiet --pidfile $PIDFILE --oknodo --startas $DAEMON
3844+ start-stop-daemon --stop --quiet --pidfile $PIDFILE --oknodo --startas $DAEMON $CONF
3845 rm -f $PIDFILE
3846 log_end_msg $?
3847 ;;
3848@@ -50,12 +50,12 @@
3849 $0 start
3850 ;;
3851 force-reload)
3852- if start-stop-daemon --stop --test --quiet --pidfile $PIDFILE --startas $DAEMON ; then
3853+ if start-stop-daemon --stop --test --quiet --pidfile $PIDFILE --startas $DAEMON $CONF ; then
3854 $0 restart
3855 fi
3856 ;;
3857 status)
3858- status_of_proc $DAEMON $NAME && exit 0 || exit $?
3859+ status_of_proc $DAEMON $NAME $CONF && exit 0 || exit $?
3860 ;;
3861 *)
3862 log_success_msg "Usage: /etc/init.d/fancontrol {start|stop|restart|force-reload|status}"
3863
3864=== added file 'debian/fancontrol.service'
3865--- debian/fancontrol.service 1970-01-01 00:00:00 +0000
3866+++ debian/fancontrol.service 2014-01-03 03:11:39 +0000
3867@@ -0,0 +1,14 @@
3868+[Unit]
3869+Description=fan speed regulator
3870+# Run pwmconfig to create this file.
3871+ConditionPathExists=/etc/fancontrol
3872+After=lm-sensors.service
3873+Documentation=man:fancontrol(8) man:pwmconfig(8)
3874+
3875+[Service]
3876+ExecStartPre=/usr/sbin/fancontrol --check
3877+ExecStart=/usr/sbin/fancontrol
3878+PIDFile=/var/run/fancontrol.pid
3879+
3880+[Install]
3881+WantedBy=multi-user.target
3882
3883=== modified file 'debian/lm-sensors.dirs'
3884--- debian/lm-sensors.dirs 2012-06-03 16:21:26 +0000
3885+++ debian/lm-sensors.dirs 2014-01-03 03:11:39 +0000
3886@@ -1,2 +1,1 @@
3887 usr/sbin
3888-lib/systemd/system/
3889
3890=== modified file 'debian/lm-sensors.docs'
3891--- debian/lm-sensors.docs 2011-06-20 21:25:57 +0000
3892+++ debian/lm-sensors.docs 2014-01-03 03:11:39 +0000
3893@@ -1,6 +1,5 @@
3894 doc/donations
3895 doc/vid
3896-doc/chips
3897 doc/fan-divisors
3898 doc/developers/applications
3899 doc/temperature-sensors
3900
3901=== modified file 'debian/lm-sensors.service'
3902--- debian/lm-sensors.service 2012-06-03 16:21:26 +0000
3903+++ debian/lm-sensors.service 2014-01-03 03:11:39 +0000
3904@@ -1,6 +1,5 @@
3905 [Unit]
3906 Description=Initialize hardware monitoring sensors
3907-After=syslog.target
3908
3909 [Service]
3910 Type=oneshot
3911
3912=== modified file 'debian/patches/06-sensors-detect-debian.patch'
3913--- debian/patches/06-sensors-detect-debian.patch 2013-05-06 23:37:35 +0000
3914+++ debian/patches/06-sensors-detect-debian.patch 2014-01-03 03:11:39 +0000
3915@@ -1,6 +1,6 @@
3916 ---
3917- prog/detect/sensors-detect | 120 +++++++++++----------------------------------
3918- 1 file changed, 30 insertions(+), 90 deletions(-)
3919+ prog/detect/sensors-detect | 107 ++++++++++++---------------------------------
3920+ 1 file changed, 30 insertions(+), 77 deletions(-)
3921
3922 --- a/prog/detect/sensors-detect
3923 +++ b/prog/detect/sensors-detect
3924@@ -10,7 +10,7 @@
3925 #
3926 # sensors-detect - Detect hardware monitoring chips
3927 # Copyright (C) 1998 - 2002 Frodo Looijaard <frodol@dds.nl>
3928-@@ -6652,99 +6652,39 @@
3929+@@ -6679,86 +6679,39 @@
3930 }
3931 }
3932
3933@@ -53,19 +53,6 @@
3934 - print SYSCONFIG "BUS_MODULES=\"", join(" ", @{$bus_modules}), "\"\n"
3935 - if @{$bus_modules};
3936 - print SYSCONFIG "HWMON_MODULES=\"", join(" ", @{$hwmon_modules}), "\"\n";
3937--
3938-- print SYSCONFIG <<'EOT';
3939--
3940--# For compatibility reasons, modules are also listed individually as variables
3941--# MODULE_0, MODULE_1, MODULE_2, etc.
3942--# You should use BUS_MODULES and HWMON_MODULES instead if possible.
3943--
3944--EOT
3945-- my $i = 0;
3946-- foreach (@{$bus_modules}, @{$hwmon_modules}) {
3947-- print SYSCONFIG "MODULE_$i=$_\n";
3948-- $i++;
3949-- }
3950 - close(SYSCONFIG);
3951 -
3952 - if (-x "/bin/systemctl" && -d "/lib/systemd/system" &&
3953
3954=== modified file 'debian/patches/09-sensors-detect-sch5524.patch'
3955--- debian/patches/09-sensors-detect-sch5524.patch 2012-04-23 19:00:39 +0000
3956+++ debian/patches/09-sensors-detect-sch5524.patch 2014-01-03 03:11:39 +0000
3957@@ -4,7 +4,7 @@
3958
3959 --- a/prog/detect/sensors-detect
3960 +++ b/prog/detect/sensors-detect
3961-@@ -1861,6 +1861,11 @@
3962+@@ -1876,6 +1876,11 @@
3963 driver => "not-a-sensor",
3964 devid => 0x83,
3965 }, {
3966
3967=== removed file 'debian/patches/10-pwmconfig.patch'
3968--- debian/patches/10-pwmconfig.patch 2013-05-06 23:37:35 +0000
3969+++ debian/patches/10-pwmconfig.patch 1970-01-01 00:00:00 +0000
3970@@ -1,148 +0,0 @@
3971-fixes taken from revisions 6162 to 6166 upstream
3972----
3973- prog/pwm/pwmconfig | 42 +++++++++++++++++++++++++++++-------------
3974- 1 file changed, 29 insertions(+), 13 deletions(-)
3975-
3976---- a/prog/pwm/pwmconfig
3977-+++ b/prog/pwm/pwmconfig
3978-@@ -144,7 +144,7 @@
3979- # $1 = padding
3980- function print_devices()
3981- {
3982-- local name
3983-+ local name device
3984-
3985- for device in $DEVICES
3986- do
3987-@@ -157,7 +157,8 @@
3988- # $1 = pwm file name
3989- function is_pwm_auto()
3990- {
3991-- ENABLE=${1}_enable
3992-+ local ENABLE=${1}_enable
3993-+
3994- if [ -f $ENABLE ]
3995- then
3996- if [ "`cat $ENABLE`" -gt 1 ]
3997-@@ -172,7 +173,8 @@
3998- # $1 = pwm file name
3999- function pwmdisable()
4000- {
4001-- ENABLE=${1}_enable
4002-+ local ENABLE=${1}_enable
4003-+
4004- # No enable file? Just set to max
4005- if [ ! -f $ENABLE ]
4006- then
4007-@@ -211,7 +213,8 @@
4008- # $1 = pwm file name
4009- function pwmenable()
4010- {
4011-- ENABLE=${1}_enable
4012-+ local ENABLE=${1}_enable
4013-+
4014- if [ -w $ENABLE ]
4015- then
4016- echo 1 2>/dev/null > $ENABLE
4017-@@ -236,7 +239,8 @@
4018- echo 'Found the following PWM controls:'
4019- for i in $PWM
4020- do
4021-- echo " $i"
4022-+ P=`cat $i`
4023-+ echo " $i current value: $P"
4024- if [ -w $i ]
4025- then
4026- # First check if PWM output is in automatic mode
4027-@@ -325,9 +329,9 @@
4028-
4029- function pwmdetail()
4030- {
4031-- P=$1
4032-- F=$2
4033-- PLOT=
4034-+ local P=$1 F=$2
4035-+ local X PLOT= TMP1 TMP2
4036-+ local threshold=100000 pwm S
4037-
4038- type $PLOTTER > /dev/null 2>&1
4039- if [ $? -eq 0 ]
4040-@@ -358,7 +362,6 @@
4041- > $TMP2
4042- fi
4043-
4044-- local threshold=100000
4045- let pwm=$MAX
4046- pwmenable $P
4047- while [ $pwm -ge 0 ]
4048-@@ -443,12 +446,13 @@
4049-
4050- let pwmactivecount=0
4051- let count=1
4052-+ S_MIN=
4053- for j in $GOODFAN
4054- do
4055- OS=`echo $SPEEDS | cut -d' ' -f$count`
4056- S=`echo $CURRENT_SPEEDS | cut -d' ' -f$count`
4057- echo " $j ... speed was $OS now $S"
4058-- let threshold=2*$OS/3
4059-+ let threshold=3*$OS/4
4060- if [ $S -lt $threshold ]
4061- then
4062- echo " It appears that fan $j"
4063-@@ -461,7 +465,6 @@
4064- let pwmactivecount=1
4065- pwmactive="$i ${pwmactive}"
4066- fanactive="$j ${fanactive}"
4067-- fanactive_min="$S ${fanactive_min}"
4068-
4069- # Give all correlated fans time to return to full speed
4070- sleep $DELAY
4071-@@ -471,9 +474,15 @@
4072- exit 1
4073- fi
4074- else
4075-- fanactive="$j+${fanactive}" #not supported yet by fancontrol
4076-- fanactive_min="$S+${fanactive_min}"
4077-+ fanactive="$j+${fanactive}"
4078- fi
4079-+
4080-+ # Keep track of the slowest fan controlled by one PWM
4081-+ if [ -z "$S_MIN" ] || [ $S -lt $S_MIN ]
4082-+ then
4083-+ S_MIN=$S
4084-+ fi
4085-+
4086- S=`cat $j`
4087- if [ $S -lt $threshold ]
4088- then
4089-@@ -506,8 +515,11 @@
4090- if [ "$X" = "y" -o "$X" = "Y" ]
4091- then
4092- pwmactive="$i ${pwmactive}"
4093-+ fanactive_min="0 $fanactive_min"
4094- fi
4095- echo
4096-+ else
4097-+ fanactive_min="$S_MIN $fanactive_min"
4098- fi
4099- done
4100-
4101-@@ -656,6 +668,8 @@
4102- # $1 = pwm value below which the fan is stopped
4103- function TestMinStart()
4104- {
4105-+ local fanok FANTEST
4106-+
4107- echo
4108- echo 'Now we increase the PWM value in 10-unit-steps.'
4109- echo 'Let the fan stop completely, then press return until the'
4110-@@ -781,6 +795,8 @@
4111-
4112- function SaveConfig()
4113- {
4114-+ local tmpfile
4115-+
4116- RememberDevices "$FCTEMPS" "$FCFANS"
4117-
4118- echo
4119
4120=== modified file 'debian/patches/11-fancontrol-check.patch'
4121--- debian/patches/11-fancontrol-check.patch 2012-04-23 19:00:39 +0000
4122+++ debian/patches/11-fancontrol-check.patch 2014-01-03 03:11:39 +0000
4123@@ -4,7 +4,7 @@
4124
4125 --- a/prog/pwm/fancontrol
4126 +++ b/prog/pwm/fancontrol
4127-@@ -259,6 +259,17 @@
4128+@@ -261,6 +261,17 @@
4129 return $outdated
4130 }
4131
4132
4133=== modified file 'debian/patches/12-sensors-detect-superio-x86.patch'
4134--- debian/patches/12-sensors-detect-superio-x86.patch 2013-05-06 23:37:35 +0000
4135+++ debian/patches/12-sensors-detect-superio-x86.patch 2014-01-03 03:11:39 +0000
4136@@ -4,7 +4,7 @@
4137
4138 --- a/prog/detect/sensors-detect
4139 +++ b/prog/detect/sensors-detect
4140-@@ -6752,9 +6752,9 @@
4141+@@ -6779,9 +6779,9 @@
4142 print "\n";
4143
4144 $superio_features = 0;
4145
4146=== modified file 'debian/patches/14-2-digits-kernel.patch'
4147--- debian/patches/14-2-digits-kernel.patch 2013-05-06 23:37:35 +0000
4148+++ debian/patches/14-2-digits-kernel.patch 2014-01-03 03:11:39 +0000
4149@@ -4,7 +4,7 @@
4150
4151 --- a/prog/detect/sensors-detect
4152 +++ b/prog/detect/sensors-detect
4153-@@ -2596,8 +2596,8 @@
4154+@@ -2625,8 +2625,8 @@
4155
4156 sub initialize_kernel_version
4157 {
4158
4159=== modified file 'debian/patches/series'
4160--- debian/patches/series 2013-05-09 21:55:15 +0000
4161+++ debian/patches/series 2014-01-03 03:11:39 +0000
4162@@ -7,7 +7,6 @@
4163 07-sensors3.conf-local-changes.patch
4164 08-sensors-detect-lm85.patch
4165 09-sensors-detect-sch5524.patch
4166-10-pwmconfig.patch
4167 11-fancontrol-check.patch
4168 12-sensors-detect-superio-x86.patch
4169 14-2-digits-kernel.patch
4170
4171=== modified file 'debian/rules'
4172--- debian/rules 2013-05-06 23:37:35 +0000
4173+++ debian/rules 2014-01-03 03:11:39 +0000
4174@@ -5,6 +5,14 @@
4175 # Uncomment this to turn on verbose mode.
4176 #export DH_VERBOSE=1
4177
4178+# support parallel build using DEB_BUILD_OPTIONS=parallel=N
4179+ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
4180+ MAKEFLAGS += -j$(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
4181+endif
4182+
4183+# This has to be exported to make some magic below work.
4184+export DH_OPTIONS
4185+
4186 # These are used for cross-compiling and for saving the configure script
4187 # from having to guess our platform (since we know it already)
4188 DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
4189@@ -71,7 +79,7 @@
4190 # Install extra files as needed
4191 install -m 0644 debian/sensord.logcheck debian/sensord/etc/logcheck/ignore.d.server/sensord
4192 install -m 0644 debian/sensord.logcheck debian/sensord/etc/logcheck/ignore.d.workstation/sensord
4193- install -m 0644 debian/lm-sensors.service debian/lm-sensors/lib/systemd/system/
4194+# install -m 0644 debian/lm-sensors.service debian/lm-sensors/lib/systemd/system/
4195
4196 # Make sure /etc/sensors.d/ is not removed
4197 touch debian/tmp/etc/sensors.d/.placeholder
4198@@ -100,7 +108,9 @@
4199 dh_testroot
4200 dh_installchangelogs -i CHANGES
4201 dh_installdocs -i -XCVS
4202+ dh_systemd_enable -pfancontrol
4203 dh_installinit -pfancontrol --restart-after-upgrade -- start 20 2 3 4 5 .
4204+ dh_systemd_start -pfancontrol
4205 dh_installman -i
4206 dh_link -i
4207 dh_compress -i
4208@@ -117,8 +127,10 @@
4209 dh_installchangelogs -s CHANGES
4210 dh_installdocs -s -XCVS
4211 dh_installexamples -s -XCVS -XModule.mk
4212+ dh_systemd_enable -plm-sensors
4213 dh_installinit -plm-sensors --no-start -- start 47 S .
4214 dh_installinit -psensord -- start 20 2 3 4 5 .
4215+ dh_systemd_start -plm-sensors
4216 dh_installman -s
4217 dh_link -s
4218 dh_strip -s
4219
4220=== removed directory 'doc/chips'
4221=== removed file 'doc/chips/MODPARMS'
4222--- doc/chips/MODPARMS 2011-06-20 21:25:57 +0000
4223+++ doc/chips/MODPARMS 1970-01-01 00:00:00 +0000
4224@@ -1,139 +0,0 @@
4225-Parameters for modprobe and insmod
4226-==================================
4227-
4228-PRELIMINARY WARNING:
4229-This documentation file is outdated and needs to be entirely reviewed
4230-and updated. Until then, don't blindly trust what you read here.
4231-
4232-==================================
4233-SUMMARY
4234-
4235- [modprobe,insmod] module {parameter...}
4236- Parameters:
4237- force=bus,address{,bus,address}
4238- force_addr=address{,address}
4239- force_[chipname]=bus,address{,bus,address}
4240- force_subclients=bus,caddr,saddr,saddr
4241- ignore=bus,address{,bus,address}
4242- ignore_range=bus,start,end{,bus,start,end}
4243- probe=bus,address{,bus,address}
4244- probe_range=bus,start,end{,bus,start,end}
4245- init=[0,1] (default 1)
4246-
4247- All arguments are in decimal unless prefixed by "0x".
4248- No spaces are allowed.
4249-
4250-==================================
4251-OVERVIEW
4252-
4253-All chip drivers have a few modprobe module parameters in common.
4254-(Insmod can also be used, but we recommend modprobe so that
4255-other required modules are automatically loaded.) These
4256-parameters can be used when a module is inserted, to give some additional
4257-information about how it should function. In this case, they tell where
4258-the module should look for what chips. Usually, you don't need them, and
4259-if you do, you are often told by sensors-detect which ones you need.
4260-
4261-If a module doesn't load with no parameters, you may need to
4262-add parameters. Check 'dmesg' for clues to what went wrong.
4263-
4264-
4265-BUS NUMBERING
4266--------------
4267-I2C/SMBus adapters are numbered in the order they are inserted. If you want
4268-to know what number an adapter has, use the following command:
4269-
4270- (for kernel 2.6.32 and newer)
4271- grep . /sys/bus/i2c/devices/i2c-*/name
4272-
4273- (for kernel 2.6.31 and older)
4274- grep . /sys/class/i2c-adapter/i2c-*/name
4275-
4276-Alternatively, if you have installed i2c-tools, you can do:
4277-
4278- modprobe i2c-dev
4279- i2cdetect -l
4280-
4281-If you want 'any I2C bus', use '-1'.
4282-
4283-
4284-ADDRESS NUMBERING
4285------------------
4286-Each adapter has a number of addresses on I2C/SMBus adapters and/or the
4287-ISA bus that are always scanned if no modprobe parameters are given. The
4288-parameters below override those addresses that are scanned by default.
4289-
4290-All modprobe parameters described below take lists of positive integers
4291-(unsigned, in the range of 0 to 65535) as their arguments. Integers
4292-are separated by comma's, and may be given as ordinary decimal numbers,
4293-as octal numbers (by starting them with a `0') or as hexadecimal numbers
4294-(by starting them with a `0x'). More information can be found by
4295-entering `man modprobe' or `man insmod'.
4296-So to summarize:
4297- 0x00 - 0x7f Valid I2C Addresses
4298- 0x0000 - 0xffff Valid ISA Bus Addresses
4299-
4300-
4301-==================================
4302-PARAMETER DETAILS
4303-
4304-`force', `force_*', `ignore' and `probe' parameters take pairs of numbers.
4305-Each first (odd) number is a bus number, each second (even) number is
4306-an (I2C or ISA) address.
4307-
4308-`ignore_range' and `probe_range' parameters take triples of numbers.
4309-Each first number is a bus number, each second number is the start address
4310-of a range, and each third number is the end address of a range. Ranges
4311-are always inclusive.
4312-
4313-`probe' and `probe_range' parameters tell the module to scan additional
4314-addresses for a specific bus. These are treated just as the ordinary
4315-addresses scanned. This is useful for some chips that can be anywhere;
4316-to keep loading time (and false detections) down, only the most common
4317-addresses are scanned by default.
4318-
4319-`ignore' and `ignore_range' parameters tell the module not to scan
4320-specific addresses. They overrule the default addresses and any
4321-addresses specified by `probe' and `probe_range' statements.
4322-
4323-The `force' parameter tells the module a supported chip is found at
4324-a specific address. It overrules all previously mentioned parameters.
4325-Sometimes, a chip can be in a specific internal state that makes
4326-detection impossible. If you specify it with the `force' parameter,
4327-it is first put into a recognizable state. Also, some detection routines
4328-are skipped. If the module supports several chips, it will still try
4329-to determine what chip is found on that address. If it can't determine
4330-this, the address will still not be used.
4331-
4332-There is a `force_*' parameter for each type of chip supported by a
4333-module. This is the strongest statement possible - it says that a
4334-specific type of chip is found on a specific address, and the module
4335-will skip all detection and recognition routines. This can lead to
4336-very strange results...
4337-
4338-`force_addr' is a parameter used for PCI sensor adapters.
4339-It is used to program the base address of the sensor registers.
4340-This is required if the BIOS does not initialize the base address.
4341-
4342-`force_subclients' is used to force the i2c addresses for subclients of
4343-a certain chip. Typical usage is `force_subclients=0,0x2d,0x4a,0x4b'
4344-to force the subclients of chip 0x2d on bus 0 to i2c addresses
4345-0x4a and 0x4b.
4346-This parameter is currently supported only by the w83781d driver
4347-and is useful for certain Tyan boards.
4348-
4349-`init' is used to tell a driver to bypass initializing a chip.
4350-This may be necessary if the BIOS has initialized the chip a certain way
4351-and the driver should not overwrite that initialization.
4352-It is also useful if normal initialization crashes the system.
4353-The default is 1, so the only useful value is `init=0'.
4354-This parameter is currently supported only by the w83781d driver.
4355-
4356-==================================
4357-EXAMPLE
4358-
4359- # ISA address 0x390 contains a LM79
4360- # Scan all I2C addresses (from 0 to 0x7f) for all I2C adapters
4361- # But skip address 0x2d on adapter 0, and address 0x20 on adapter 1
4362-
4363- modprobe lm78 force_lm79=9191,0x390 ignore=0,0x2d,1,0x20 probe_range=-1,0,0x7f
4364
4365=== removed file 'doc/chips/SUMMARY'
4366--- doc/chips/SUMMARY 2011-07-17 13:27:11 +0000
4367+++ doc/chips/SUMMARY 1970-01-01 00:00:00 +0000
4368@@ -1,297 +0,0 @@
4369-SUMMARY OF SUPPORTED CHIPS
4370-==========================
4371-
4372-This is a summary of the sensor and non-sensor chips supported by this
4373-package. It lists the features of each supported chip. For further
4374-information on a particular driver, see the documentation in this
4375-directory.
4376-
4377-To determine what chips you have in your system, run 'sensors-detect'.
4378-
4379-If your sensor chip is not detected by sensors-detect, please contact us
4380-(see http://www.lm-sensors.org/wiki/AuthorsAndContributors). Only contact us
4381-if you know for sure that your system includes a sensor chip (for
4382-example if you have technical documentation mentioning it, or if the
4383-BIOS setup screen presents monitoring values, or if you can get
4384-hardware monitoring to work using a different OS). Do *not* contact us
4385-if you have no proof that your system includes sensors. Such systems
4386-tend to be rare these days, but do still exist. This is especially true
4387-of laptops. If there are no sensors, there's nothing we can do.
4388-
4389-If you contact us, please include the following in your mail:
4390- - The output of (as root) 'sensors-detect'. Make sure you unloaded
4391- every chip driver beforehand (check that the sensors-detect script
4392- does not complain that it couldn't probe some I2C addresses on any
4393- given bus).
4394- - Dumps of the chips that might be hardware monitoring chips. To get
4395- these, follow the following steps:
4396- 1* Run 'i2cdetect -l'. This will list all available I2C (or SMBus)
4397- busses on your system.
4398- 2* For each bus listed, run (as root) 'i2cdetect N' where N is the
4399- bus number.
4400- 3* For each bus, if there is anything in the ranges 0x20-0x2f or
4401- 0x48-0x4f, dump the contents of that chip with (as root)
4402- 'i2cdump N 0xXX', where N is the bus number and XX is the
4403- responsive address. Chips in other address ranges are way less
4404- likely to be hardware monitoring chips. In particular, do not
4405- send dumps of addresses 0x08, 0x0c, 0x10, 0x30-0x37, 0x42, 0x44,
4406- 0x50-0x5f, 0x61 and 0x69. These are *not* hadware monitoring
4407- chips.
4408- - The part numbers of the chips on your motherboard you think are the
4409- sensor chips.
4410-
4411------------------------------------------------------------------------------
4412-
4413-SUPPORTED SENSOR CHIPS
4414-----------------------
4415-
4416- Included Sensors Controls Busses
4417- ---------------------- ------- -----------
4418-Driver Chips #temp #vin #fanin pwm/dac I2C ISA
4419----------------------------------------------------------------------
4420-adm1021
4421- adm1021 2 - - - yes no
4422- adm1021a 2 - - - yes no
4423- adm1023 2 - - - yes no
4424- gl523sm 2 - - - yes no
4425- lm84 2 - - - yes no
4426- max1617 2 - - - yes no
4427- max1617a 2 - - - yes no
4428- tc1068 2 - - - yes no
4429- tcm1617 2 - - - yes no
4430- thmc10 2 - - - yes no
4431- mc1066 2 - - - yes no
4432- (xeon - no detection - requires force_adm1021 parameter)
4433- xeon 1 - - - yes no
4434- (the following chips are detected as a max1617)
4435- ne1617 2 - - - yes no
4436- ne1617a 2 - - - yes no
4437-
4438-adm1024
4439- adm1024 3 6 - 1 dac yes no
4440-
4441-adm1025
4442- adm1025 2 6 - - yes no
4443- ne1619 2 6 - - yes no
4444-
4445-adm1026
4446- adm1026 3 17 8 2 pwm+dac yes no
4447-
4448-adm1031
4449- adm1030 2 - 1 1 pwm yes no
4450- adm1031 3 - 2 2 pwm yes no
4451-
4452-adm9240
4453- adm9240 1 6 2 1 dac yes no
4454- ds1780 1 6 2 1 dac yes no
4455- lm81 1 6 2 1 dac yes no
4456-
4457-asb100
4458- asb100 4 7 3 1 yes no
4459-
4460-bmcsensors
4461- bmcsensors ? ? ? - no no
4462-
4463-ds1621
4464- ds1621 1 - - - yes no
4465- (the following chip is detected as a ds1621)
4466- ds1625 1 - - - yes no
4467-
4468-f71805f
4469- f71805f 9 3 3 - no yes
4470-
4471-fscher
4472- fscher 3 3 3 - yes no
4473-
4474-fscpos
4475- fscpos 3 3 3 - yes no
4476-
4477-fscscy
4478- fscscy 4 3 6 - yes no
4479-
4480-gl518sm
4481- gl518sm (r00) 1 1-4 2 - yes no
4482- gl518sm (r80) 1 4 2 - yes no
4483-
4484-gl520sm
4485- gl520sm 1-2 4-5 2 - yes no
4486-
4487-it87
4488- it8712 3 8 3 3 pwm yes yes
4489- (the following are reported as an "it87")
4490- it8705 3 8 3 3 pwm yes yes
4491- sis950 3 8 3 3 pwm yes yes
4492-
4493-lm63
4494- lm63 2 - 1 1 pwm yes no
4495-
4496-lm75
4497- lm75 1 - - - yes no
4498- (the following chips are detected as an lm75)
4499- ds75 1 - - - yes no
4500- ds1775 1 - - - yes no
4501- max6625 1 - - - yes no
4502- max6626 1 - - - yes no
4503- tcn75 1 - - - yes no
4504-
4505-lm78
4506- lm78 1 7 3 - yes yes
4507- lm78-j 1 7 3 - yes yes
4508- lm79 1 7 3 - yes yes
4509-
4510-lm80
4511- lm80 1 7 2 - yes no
4512-
4513-lm83
4514- lm83 4 - - - yes no
4515- lm82 2 - - - yes no
4516-
4517-lm85
4518- lm85 3 5 4 3 pwm yes no
4519- adm1027 3 5 4 3 pwm yes no
4520- adt7463 3 5 4 3 pwm yes no
4521- emc6d100 3 8 4 3 pwm yes no
4522- (emc6d101 is reported as emc6d100)
4523- emc6d101 3 8 4 3 pwm yes no
4524- emc6d102 3 8 4 3 pwm yes no
4525-
4526-lm87
4527- lm87 2-3 6-8 0-2 1 pwm yes no
4528-
4529-lm90
4530- lm90 2 - - - yes no
4531- lm99 2 - - - yes no
4532- lm86 2 - - - yes no
4533- adm1032 2 - - - yes no
4534- max6657 2 - - - yes no
4535- (lm89 is detected as an lm99)
4536- lm89 2 - - - yes no
4537- (max6658 and max6659 are detected as a max6657)
4538- max6658 2 - - - yes no
4539- max6659 2 - - - yes no
4540- (adt7461 only works in ADM1032 compatibility mode)
4541- adt7461 2 - - - yes no
4542-
4543-lm92
4544- (all are reported as an "lm92")
4545- lm92 1 - - - yes no
4546- max6633 1 - - - yes no
4547- max6634 1 - - - yes no
4548- max6635 1 - - - yes no
4549- (lm76 needs force parameter)
4550- lm76 1 - - - yes no
4551-
4552-max1619
4553- max1619 2 - - - yes no
4554-
4555-max6650
4556- (all are reported as a "max6650")
4557- max6650 - - 1 1 pwm yes no
4558- max6651 - - 4 1 pwm yes no
4559-
4560-maxilife
4561- maxilife-as 5 4 3 - yes no
4562- maxilife-co 5 4 3 - yes no
4563- maxilife-cg 5 4 3 - yes no
4564-
4565-mtp008
4566- mtp008 3 7 3 3 pwm yes no
4567-
4568-pc87360
4569- pc87360 - - 2 2 pwm no yes (LPC)
4570- pc87363 - - 2 2 pwm no yes (LPC)
4571- pc87364 - - 3 3 pwm no yes (LPC)
4572- pc87365 2 11 3 3 pwm no yes (LPC)
4573- pc87366 3-4 11 3 3 pwm no yes (LPC)
4574-
4575-pcf8591
4576- pcf8591 - 2-4 - 1 dac yes no
4577-
4578-sis5595
4579- sis5595 0-1 4-5 2 - no yes
4580-
4581-smartbatt
4582- smartbatt 1 1 - - yes no
4583-
4584-smsc47m1
4585- (all are reported as a "smsc47m1")
4586- smsc47b27x - - 2 2 no yes (LPC)
4587- smsc47m10x - - 2 2 no yes (LPC)
4588- smsc47m112 - - 2 2 no yes (LPC)
4589- smsc47m13x - - 2 2 no yes (LPC)
4590- smsc47m14x - - 2 2 no yes (LPC)
4591- smsc47m15x - - 2 2 no yes (LPC)
4592- smsc47m192 - - 2 2 no yes (LPC)
4593- smsc47m997 - - 2 2 no yes (LPC)
4594- (reported as a "smsc47m2")
4595- smsc47m292 - - 3 3 no yes (LPC)
4596-
4597-thmc50
4598- adm1022 3 2 - 1 dac yes no
4599- thmc50 3 2 - 1 dac yes no
4600-
4601-via686a
4602- via686a 3 5 2 - no yes
4603- vt8231 3 5 2 - no yes
4604-
4605-vt1211
4606- vt1211 2-7 1-6 2 2 no yes (LPC)
4607-
4608-vt8231
4609- vt8231 2-7 2-7 2 2 no yes
4610-
4611-w83627hf
4612- w83627hf 3 9 3 2 pwm no yes (LPC)
4613- w83627thf 3 7 3 3 dac no yes (LPC)
4614- w83637hf 3 7 2 3 pwm no yes (LPC)
4615- w83687thf 3 7 3 3 pw/da no yes (LPC)
4616- w83697hf 2 8 2 2 pwm no yes (LPC)
4617-
4618-w83781d
4619- as99127f 3 7 3 - yes no
4620- w83781d 3 7 3 - yes yes
4621- w83782d 3 9 3 2-4 pwm yes yes
4622- w83783s 1-2 5-6 3 2 pwm yes no
4623- w83791d 3 10 5 5 pwm yes no
4624- w83627hf 3 9 3 2 pwm yes yes (LPC)
4625-
4626-w83l785ts
4627- w83l785ts 1 - - - yes no
4628-
4629-w83792d
4630- w83792d 3 9 7 3 pwm yes no
4631-
4632-xeontemp
4633- xeontemp 1 - - - yes no
4634-
4635-
4636------------------------------------------------------------------------------
4637-
4638-COMPANY ID LIST
4639----------------
4640-
4641-Many SMBus chips have a company ID at location 0x3E or 0xFE.
4642-
4643-Here is a partial list.
4644-This may help identify a chip after doing a 'i2cdump [bus] [address]'.
4645-
4646-0x01 National
4647-0x12C3 Asus (at 0x4F)
4648-0x1934 Fintek (at 0x5D-0x5E)
4649-0x23 Analog Devices (old products) or Fintek
4650-0x41 Analog Devices (new products)
4651-0x49 TI
4652-0x4D Maxim
4653-0x54 On Semi
4654-0x5C SMSC
4655-0x5D SMSC
4656-0x55 SMSC
4657-0x5CA3 Winbond (at 0x4F)
4658-0x61 Andigilog
4659-0x90 ITE (at 0x58)
4660-0xA1 Philips
4661-0xA3 Winbond (at 0x4F)
4662-0xC3 Asus (at 0x4F)
4663-0xDA Dallas
4664-
4665-[A-Z]{3} at 0x00-0x02: Fujitsu-Siemens
4666
4667=== modified file 'doc/developers/lm_sensors.lsm'
4668--- doc/developers/lm_sensors.lsm 2013-05-06 23:37:35 +0000
4669+++ doc/developers/lm_sensors.lsm 2014-01-03 03:11:39 +0000
4670@@ -1,7 +1,7 @@
4671 Begin4
4672 Title: lm_sensors
4673-Version: 3.3.3
4674-Entered-date: 2012-11-06
4675+Version: 3.3.4
4676+Entered-date: 2013-05-27
4677 Description: Hardware health monitoring package for Linux. It consists of
4678 a library to allow applications to read sensors data more
4679 easily, and of an example program to pretty print this data.
4680@@ -11,8 +11,8 @@
4681 Author: khali@linux-fr.org (Jean Delvare)
4682 Maintained-by: khali@linux-fr.org (Jean Delvare)
4683 Primary-site: http://dl.lm-sensors.org /lm-sensors/releases/
4684- lm_sensors-3.3.3.tar.bz2
4685- lm_sensors-3.3.3.tar.bz2.sig
4686+ lm_sensors-3.3.4.tar.bz2
4687+ lm_sensors-3.3.4.tar.bz2.sig
4688 Alternate-site: ftp.netroedge.com /pub/lm-sensors/
4689 Copying-policy: GPL/LGPL
4690 End
4691
4692=== added file 'doc/developers/smbus_company_id'
4693--- doc/developers/smbus_company_id 1970-01-01 00:00:00 +0000
4694+++ doc/developers/smbus_company_id 2014-01-03 03:11:39 +0000
4695@@ -0,0 +1,28 @@
4696+COMPANY ID LIST
4697+---------------
4698+
4699+Many SMBus chips have a company ID at location 0x3E or 0xFE.
4700+
4701+Here is a partial list.
4702+This may help identify a chip after doing a 'i2cdump [bus] [address]'.
4703+
4704+0x01 National Semiconductor
4705+0x12C3 Asus (at 0x4F)
4706+0x1934 Fintek (at 0x5D-0x5E)
4707+0x23 Analog Devices (old products) or Fintek
4708+0x41 Analog Devices (new products)
4709+0x49 TI
4710+0x4D Maxim
4711+0x54 On Semi
4712+0x5C SMSC
4713+0x5D SMSC
4714+0x55 SMSC
4715+0x5CA3 Winbond (at 0x4F)
4716+0x61 Andigilog
4717+0x90 ITE (at 0x58)
4718+0xA1 Philips
4719+0xA3 Winbond (at 0x4F)
4720+0xC3 Asus (at 0x4F)
4721+0xDA Dallas
4722+
4723+[A-Z]{3} at 0x00-0x02: Fujitsu-Siemens
4724
4725=== modified file 'doc/donations'
4726--- doc/donations 2012-11-05 13:18:21 +0000
4727+++ doc/donations 2014-01-03 03:11:39 +0000
4728@@ -36,9 +36,8 @@
4729 Drivers developed: as99127f improvements MDS
4730
4731 Atipa SuperMicro 370DLE w/ Serverworks, LM87 2000-09
4732- Drivers developed: serverworks support added Jean Delvare
4733+ Drivers developed: serverworks support added trash
4734 to i2c-piix4; lm87 testing and improvements
4735- (on-board NIC broken)
4736
4737 Fujitsu Complete system for general project support 2001-11
4738 Siemens (broken) Phil
4739@@ -82,7 +81,7 @@
4740 (broken)
4741
4742 Wincor Nixdorf Seagate Barracuda 7200.7 160GB harddisk drive 2004-10
4743- (dead) Jean Delvare
4744+ trash
4745
4746 Aweta Intel Server system 2005-09
4747 Drivers developed: PC87431 (IPMI SMB) MDS
4748@@ -105,8 +104,8 @@
4749 (ICH5) SMBus with SPD EEPROMs connected, and
4750 a Winbond W83627THF hardware monitoring chip.
4751
4752-Observit Intel D865GSA (dead), Celeron D-352, 2007-06
4753- 128 MB RAM Jean Delvare
4754+Observit Intel D865GSA, Celeron D-352, 2007-06
4755+ 128 MB RAM trash
4756 Resulted in: backport of the w83627ehf driver
4757 to Linux 2.4, improvements to the Linux 2.6
4758 w83627ehf driver.
4759
4760=== modified file 'doc/libsensors-API.txt'
4761--- doc/libsensors-API.txt 2013-05-06 23:37:35 +0000
4762+++ doc/libsensors-API.txt 2014-01-03 03:11:39 +0000
4763@@ -6,7 +6,7 @@
4764 authors can quickly figure out how to test for the availability of a
4765 given new feature.
4766
4767-0x432 lm-sensors 3.3.2 to 3.3.3
4768+0x432 lm-sensors 3.3.2 to 3.3.4
4769 * Added support for new sysfs attributes
4770 enum sensors_subfeature_type SENSORS_SUBFEATURE_IN_AVERAGE
4771 enum sensors_subfeature_type SENSORS_SUBFEATURE_IN_LOWEST
4772
4773=== modified file 'lib/sensors.conf.5'
4774--- lib/sensors.conf.5 2011-07-17 13:27:11 +0000
4775+++ lib/sensors.conf.5 2014-01-03 03:11:39 +0000
4776@@ -1,6 +1,6 @@
4777 .\" Copyright (C) 1998, 1999 Adrian Baugh <adrian.baugh@keble.ox.ac.uk> and
4778 .\" Frodo Looijaard <frodol@dds.nl>
4779-.\" Copyright (C) 2008, 2009 Jean Delvare <khali@linux-fr.org>
4780+.\" Copyright (C) 2008--2012 Jean Delvare <khali@linux-fr.org>
4781 .\"
4782 .\" Permission is granted to make and distribute verbatim copies of this
4783 .\" manual provided the copyright notice and this permission notice are
4784@@ -21,7 +21,7 @@
4785 .\"
4786 .\" References consulted:
4787 .\" sensors.conf.eg by Frodo Looijaard
4788-.TH sensors.conf 5 "February 2009" "lm-sensors 3" "Linux User's Manual"
4789+.TH sensors.conf 5 "November 2012" "lm-sensors 3" "Linux User's Manual"
4790 .SH NAME
4791 sensors.conf \- libsensors configuration file
4792
4793@@ -134,6 +134,10 @@
4794 The first argument is the feature name. The second argument is the feature
4795 description.
4796
4797+Note that you must use the raw feature name, which is not necessarily the
4798+one displayed by "sensors" by default. Use "sensors \-u" to see the raw
4799+feature names. Same applies to all other statement types below.
4800+
4801 .SS IGNORE STATEMENT
4802
4803 An
4804
4805=== modified file 'prog/detect/sensors-detect'
4806--- prog/detect/sensors-detect 2013-05-09 21:55:15 +0000
4807+++ prog/detect/sensors-detect 2014-01-03 03:11:39 +0000
4808@@ -41,7 +41,7 @@
4809 use vars qw(@pci_adapters @chip_ids @ipmi_ifs @non_hwmon_chip_ids
4810 $i2c_addresses_to_scan $revision @i2c_byte_cache);
4811
4812-$revision = '$Revision: 6085 $ ($Date: 2012-10-30 18:18:45 +0100 (mar. 30 oct. 2012) $)';
4813+$revision = '$Revision: 6170 $ ($Date: 2013-05-20 21:25:22 +0200 (lun. 20 mai 2013) $)';
4814 $revision =~ s/\$\w+: (.*?) \$/$1/g;
4815 $revision =~ s/ \([^()]*\)//;
4816
4817@@ -637,8 +637,8 @@
4818 i2c_addrs => [0x2c..0x2e],
4819 i2c_detect => sub { adt7490_detect(@_); },
4820 }, {
4821- name => "Analog Devices ADT7410",
4822- driver => "to-be-written",
4823+ name => "Analog Devices ADT7410/ADT7420",
4824+ driver => "adt7410",
4825 i2c_addrs => [0x48..0x4b],
4826 i2c_detect => sub { adt7410_detect(@_); },
4827 }, {
4828@@ -803,11 +803,6 @@
4829 i2c_addrs => [0x2c..0x2f],
4830 i2c_detect => sub { adm9240_detect(@_, 0); },
4831 }, {
4832- name => "Dallas Semiconductor DS1621/DS1631",
4833- driver => "ds1621",
4834- i2c_addrs => [0x48..0x4f],
4835- i2c_detect => sub { ds1621_detect(@_); },
4836- }, {
4837 name => "Dallas Semiconductor DS1780",
4838 driver => "adm9240",
4839 i2c_addrs => [0x2c..0x2f],
4840@@ -1023,6 +1018,16 @@
4841 i2c_addrs => [0x4c, 0x4d],
4842 i2c_detect => sub { tmp42x_detect(@_, 2); },
4843 }, {
4844+ name => "Texas Instruments TMP431",
4845+ driver => "to-be-written", # tmp401
4846+ i2c_addrs => [0x4c, 0x4d],
4847+ i2c_detect => sub { lm90_detect(@_, 16); },
4848+ }, {
4849+ name => "Texas Instruments TMP432",
4850+ driver => "to-be-written", # tmp401
4851+ i2c_addrs => [0x4c, 0x4d],
4852+ i2c_detect => sub { lm90_detect(@_, 17); },
4853+ }, {
4854 name => "Texas Instruments AMC6821",
4855 driver => "amc6821",
4856 i2c_addrs => [0x18..0x1a, 0x2c..0x2e, 0x4c..0x4e],
4857@@ -1033,6 +1038,11 @@
4858 i2c_addrs => [0x2b, 0x19, 0x2a],
4859 i2c_detect => sub { lm95231_detect(@_, 0); },
4860 }, {
4861+ name => "National Semiconductor LM95234",
4862+ driver => "to-be-written", # lm95234
4863+ i2c_addrs => [0x18, 0x4d, 0x4e],
4864+ i2c_detect => sub { lm95231_detect(@_, 3); },
4865+ }, {
4866 name => "National Semiconductor LM95241",
4867 driver => "lm95241",
4868 i2c_addrs => [0x2b, 0x19, 0x2a],
4869@@ -1400,6 +1410,11 @@
4870 i2c_addrs => [0x18..0x1f],
4871 i2c_detect => sub { jedec_JC42_4_detect(@_, 7); },
4872 }, {
4873+ name => "Microchip MCP98244",
4874+ driver => "jc42",
4875+ i2c_addrs => [0x18..0x1f],
4876+ i2c_detect => sub { jedec_JC42_4_detect(@_, 15); },
4877+ }, {
4878 name => "Microchip MCP9843",
4879 driver => "jc42",
4880 i2c_addrs => [0x18..0x1f],
4881@@ -1950,6 +1965,10 @@
4882 logdev => 0x0b,
4883 features => FEAT_IN | FEAT_FAN | FEAT_TEMP,
4884 }, {
4885+ name => "Winbond W83627SF/GF Super IO",
4886+ driver => "not-a-sensor",
4887+ devid => 0x59,
4888+ }, {
4889 name => "Winbond W83627THF/THG Super IO Sensors",
4890 driver => "w83627hf",
4891 devid => 0x82,
4892@@ -2024,7 +2043,7 @@
4893 logdev => 0x0b,
4894 features => FEAT_IN | FEAT_FAN | FEAT_TEMP,
4895 }, {
4896- name => "Nuvoton W83677HG-I (NCT6771F/NCT6772F/NCT6775F) Super IO Sensors",
4897+ name => "Nuvoton W83677HG-I (NCT5572D/NCT6771F/NCT6772F/NCT6775F) Super IO Sensors",
4898 driver => "w83627ehf",
4899 devid => 0xB470,
4900 devid_mask => 0xFFF0,
4901@@ -2035,27 +2054,24 @@
4902 driver => "not-a-sensor",
4903 devid => 0x61,
4904 }, {
4905- name => "Nuvoton NCT5577D Super IO Sensors",
4906- driver => "to-be-written",
4907- devid => 0xC331,
4908- logdev => 0x0b,
4909- features => FEAT_IN | FEAT_FAN | FEAT_TEMP,
4910- }, {
4911- name => "Nuvoton NCT6776F Super IO Sensors",
4912- driver => "w83627ehf",
4913- devid => 0xC333,
4914- logdev => 0x0b,
4915- features => FEAT_IN | FEAT_FAN | FEAT_TEMP,
4916- }, {
4917- name => "Nuvoton NCT6779D Super IO Sensors",
4918- driver => "to-be-written", # nct6775, new driver
4919- devid => 0xC562,
4920- logdev => 0x0b,
4921- features => FEAT_IN | FEAT_FAN | FEAT_TEMP,
4922- }, {
4923- name => "Nuvoton NCT6102D/NCT6106D Super IO Sensors",
4924- driver => "to-be-written", # nct6775, new driver
4925- devid => 0x1061,
4926+ name => "Nuvoton NCT5577D/NCT6776F Super IO Sensors",
4927+ driver => "nct6775",
4928+ devid => 0xC330,
4929+ devid_mask => 0xFFF0,
4930+ logdev => 0x0b,
4931+ features => FEAT_IN | FEAT_FAN | FEAT_TEMP,
4932+ }, {
4933+ name => "Nuvoton NCT5532D/NCT6779D Super IO Sensors",
4934+ driver => "nct6775",
4935+ devid => 0xC560,
4936+ devid_mask => 0xFFF0,
4937+ logdev => 0x0b,
4938+ features => FEAT_IN | FEAT_FAN | FEAT_TEMP,
4939+ }, {
4940+ name => "Nuvoton NCT6102D/NCT6104D/NCT6106D Super IO Sensors",
4941+ driver => "to-be-written", # nct6775
4942+ devid => 0xC450,
4943+ devid_mask => 0xFFF0,
4944 logdev => 0x0b,
4945 features => FEAT_IN | FEAT_FAN | FEAT_TEMP,
4946 }, {
4947@@ -2225,14 +2241,20 @@
4948 logdev => 0x04,
4949 features => FEAT_IN | FEAT_FAN | FEAT_TEMP,
4950 }, {
4951+ name => "ITE IT8752F Super IO Sensors",
4952+ driver => "to-be-written", # it87
4953+ devid => 0x8752,
4954+ logdev => 0x04,
4955+ features => FEAT_IN | FEAT_FAN | FEAT_TEMP,
4956+ }, {
4957 name => "ITE IT8771E Super IO Sensors",
4958- driver => "to-be-written", # it87
4959+ driver => "it87",
4960 devid => 0x8771,
4961 logdev => 0x04,
4962 features => FEAT_IN | FEAT_FAN | FEAT_TEMP,
4963 }, {
4964 name => "ITE IT8772E Super IO Sensors",
4965- driver => "to-be-written", # it87
4966+ driver => "it87",
4967 devid => 0x8772,
4968 logdev => 0x04,
4969 features => FEAT_IN | FEAT_FAN | FEAT_TEMP,
4970@@ -2244,13 +2266,13 @@
4971 features => FEAT_IN | FEAT_FAN | FEAT_TEMP,
4972 }, {
4973 name => "ITE IT8782F Super IO Sensors",
4974- driver => "to-be-written", # it87
4975+ driver => "it87",
4976 devid => 0x8782,
4977 logdev => 0x04,
4978 features => FEAT_IN | FEAT_FAN | FEAT_TEMP,
4979 }, {
4980 name => "ITE IT8783F Super IO Sensors",
4981- driver => "to-be-written", # it87
4982+ driver => "it87",
4983 devid => 0x8783,
4984 logdev => 0x04,
4985 features => FEAT_IN | FEAT_FAN | FEAT_TEMP,
4986@@ -2354,6 +2376,10 @@
4987 driver => "fam15h_power",
4988 detect => sub { amd_pci_detect('1604') },
4989 }, {
4990+ name => "AMD Family 16h power sensors",
4991+ driver => "fam15h_power",
4992+ detect => sub { amd_pci_detect('1534') },
4993+ }, {
4994 name => "Intel digital thermal sensor",
4995 driver => "coretemp",
4996 detect => \&coretemp_detect,
4997@@ -2468,9 +2494,12 @@
4998
4999 sub initialize_ioports
5000 {
The diff has been truncated for viewing.

Subscribers

People subscribed via source and target branches

to all changes: