Showing with 81 additions and 61 deletions.
  1. +11 −0 CHANGES
  2. +2 −2 doc/developers/lm_sensors.lsm
  3. +62 −27 prog/detect/sensors-detect
  4. +1 −8 prog/dump/isadump.c
  5. +1 −8 prog/dump/isaset.c
  6. +1 −7 prog/dump/superio.c
  7. +1 −7 prog/dump/util.c
  8. +1 −1 prog/sensors/sensors.1
  9. +1 −1 version.h
11 CHANGES
@@ -1,6 +1,17 @@
lm-sensors CHANGES file
-----------------------

SVN HEAD
sensors.1: Add reference to sensors-detect
sensors-detect: Fix systemd paths
Add detection of Fintek F81768
Only probe I/O ports on x86
Add detection of Nuvoton NCT6793D
Add detection of Microchip MCP9808
Mark F71868A as supported by the f71882fg driver
Mark F81768D as supported by the f71882fg driver
Mark F81866D as supported by the f71882fg driver

3.4.0 (2015-06-25)
documentation: Update the note about libsensors license
sensors.conf.5: Enhance the hysteresis documentation
@@ -10,9 +10,9 @@ Description: Hardware health monitoring package for Linux. It consists of
Keywords: sensors health hardware-monitoring fan-speed
Author: jdelvare@suse.de (Jean Delvare)
Maintained-by: jdelvare@suse.de (Jean Delvare)
Primary-site: http://dl.lm-sensors.org /lm-sensors/releases/
Primary-site: http://dl.lm-sensors.org/lm-sensors/releases/
lm_sensors-3.4.0.tar.bz2
lm_sensors-3.4.0.tar.bz2.sig
Alternate-site: ftp.netroedge.com /pub/lm-sensors/
Alternate-site: ftp://ftp.netroedge.com/pub/lm-sensors/
Copying-policy: GPL/LGPL
End
@@ -1480,6 +1480,11 @@ use vars qw(@i2c_adapter_names);
i2c_addrs => [0x18..0x1f],
i2c_detect => sub { jedec_JC42_4_detect(@_, 13); },
}, {
name => "Microchip MCP9808",
driver => "jc42",
i2c_addrs => [0x18..0x1f],
i2c_detect => sub { jedec_JC42_4_detect(@_, 18); },
},{
name => "Microchip MCP98242",
driver => "jc42",
i2c_addrs => [0x18..0x1f],
@@ -2170,6 +2175,13 @@ use constant FEAT_SMBUS => (1 << 7);
devid_mask => 0xFFF0,
logdev => 0x0b,
features => FEAT_IN | FEAT_FAN | FEAT_TEMP,
}, {
name => "Nuvoton NCT6793D Super IO Sensors",
driver => "nct6775",
devid => 0xD120,
devid_mask => 0xFFF0,
logdev => 0x0b,
features => FEAT_IN | FEAT_FAN | FEAT_TEMP,
}, {
name => "Nuvoton NCT6102D/NCT6104D/NCT6106D Super IO Sensors",
driver => "nct6775",
@@ -2203,7 +2215,7 @@ use constant FEAT_SMBUS => (1 << 7);
features => FEAT_IN | FEAT_FAN | FEAT_TEMP,
}, {
name => "Fintek F71868A Super IO Sensors",
driver => "to-be-written",
driver => "f71882fg",
devid => 0x1106,
logdev => 0x04,
features => FEAT_IN | FEAT_FAN | FEAT_TEMP,
@@ -2263,6 +2275,12 @@ use constant FEAT_SMBUS => (1 << 7);
name => "Fintek F81218D Super IO",
driver => "not-a-sensor",
devid => 0x0206,
}, {
name => "Fintek F81768D Super IO Sensors",
driver => "f71882fg",
devid => 0x1210,
logdev => 0x04,
features => FEAT_IN | FEAT_FAN | FEAT_TEMP,
}, {
name => "Fintek F81865F Super IO Sensors",
driver => "f71882fg",
@@ -2271,7 +2289,7 @@ use constant FEAT_SMBUS => (1 << 7);
features => FEAT_IN | FEAT_FAN | FEAT_TEMP,
}, {
name => "Fintek F81866D Super IO Sensors",
driver => "to-be-written",
driver => "f71882fg",
devid => 0x1010,
logdev => 0x04,
features => FEAT_IN | FEAT_FAN | FEAT_TEMP,
@@ -2728,7 +2746,7 @@ sub isa_read_i5d6
# AUTODETECTION #
#################

use vars qw($dev_i2c $sysfs_root);
use vars qw($dev_i2c $sysfs_root $systemd_systemctl $systemd_system_dir);

sub initialize_conf
{
@@ -2789,6 +2807,19 @@ sub initialize_conf
exit -1;
}
}

# Detect systemd presence and paths
if (-x "/usr/bin/systemctl") {
$systemd_systemctl = "/usr/bin/systemctl";
} elsif (-x "/bin/systemctl") {
$systemd_systemctl = "/bin/systemctl";
}

if (-d "/usr/lib/systemd/system") {
$systemd_system_dir = "/usr/lib/systemd/system";
} elsif (-d "/lib/systemd/system") {
$systemd_system_dir = "/lib/systemd/system";
}
}

# [0] -> VERSION
@@ -6422,7 +6453,7 @@ sub max6655_detect
# 7 = MCP98243, 8 = MCP9843, 9 = CAT6095 / CAT34TS02,
# 10 = STTS424E, 11 = STTS2002, 12 = STTS3000
# 13 = MCP9804, 14 = AT30TS00, 15 = MCP98244,
# 16 = TSE2004, 17 = TS3001
# 16 = TSE2004, 17 = TS3001, 18 = MCP9808
# Registers used:
# 0x00: Capabilities
# 0x01: Configuration
@@ -6494,6 +6525,9 @@ sub jedec_JC42_4_detect
} elsif ($chip == 15) {
return unless $manid == 0x00; # MCP
return unless $devid == 0x22; # MCP98244
} elsif ($chip == 18) {
return unless $manid == 0x00; # MCP
return unless $devid == 04; # MCP9808
}

# Now, do it all again with words. Note that we get
@@ -6560,6 +6594,9 @@ sub jedec_JC42_4_detect
} elsif ($chip == 17) {
return unless $manid == 0xb300; # IDT
return unless ($devid & 0x00ff) == 0x0030; # TS3001
} elsif ($chip == 18) {
return unless $manid == 0x5400; # MCP
return unless ($devid & 0xfcff) == 0x0004; # MCP9808
}

return 5;
@@ -7090,19 +7127,16 @@ EOT
print SYSCONFIG "HWMON_MODULES=\"", join(" ", @{$hwmon_modules}), "\"\n";
close(SYSCONFIG);

if (-x "/bin/systemctl" && -d "/lib/systemd/system" &&
! -f "/lib/systemd/system/lm_sensors.service") {
print "Copy prog/init/lm_sensors.service to /lib/systemd/system\n".
"and run 'systemctl enable lm_sensors.service'\n".
"for initialization at boot time.\n";
return;
}

if (-x "/bin/systemctl" &&
-f "/lib/systemd/system/lm_sensors.service") {
system("/bin/systemctl", "enable", "lm_sensors.service");
system("/bin/systemctl", "start", "lm_sensors.service");
# All done, don't check for /etc/init.d/lm_sensors
if ($systemd_systemctl && $systemd_system_dir) {
if (-f "$systemd_system_dir/lm_sensors.service") {
system($systemd_systemctl, "enable", "lm_sensors.service");
system($systemd_systemctl, "start", "lm_sensors.service");
# All done, don't check for /etc/init.d/lm_sensors
} else {
print "Copy prog/init/lm_sensors.service to $systemd_system_dir\n".
"and run 'systemctl enable lm_sensors.service'\n".
"for initialization at boot time.\n";
}
return;
}

@@ -7170,13 +7204,6 @@ sub main
exit -1;
}

if (-x "/bin/systemctl" && -f "/lib/systemd/system/lm_sensors.service") {
system("/bin/systemctl", "stop", "lm_sensors.service");
} elsif (-x "/sbin/service" && -f "/etc/init.d/lm_sensors" &&
-f "/var/lock/subsys/lm_sensors") {
system("/sbin/service", "lm_sensors", "stop");
}

initialize_kernel_version();
initialize_conf();
initialize_pci();
@@ -7187,6 +7214,14 @@ sub main
initialize_modules_supported();
initialize_cpu_list();

if ($systemd_systemctl && $systemd_system_dir &&
-f "$systemd_system_dir/lm_sensors.service") {
system("$systemd_systemctl", "stop", "lm_sensors.service");
} elsif (-x "/sbin/service" && -f "/etc/init.d/lm_sensors" &&
-f "/var/lock/subsys/lm_sensors") {
system("/sbin/service", "lm_sensors", "stop");
}

print "# sensors-detect revision $revision\n";
initialize_dmi_data();
print_dmi_summary();
@@ -7223,9 +7258,9 @@ sub main
print "\n";

$superio_features = 0;
# Skip "random" I/O port probing on PPC
if ($kernel_arch ne 'ppc'
&& $kernel_arch ne 'ppc64') {
# Skip "random" I/O port probing on non-x86 machines
if ($kernel_arch =~ m/^i[3456]86$/
|| $kernel_arch eq 'x86_64') {
print "Some Super I/O chips contain embedded sensors. We have to write to\n".
"standard I/O ports to probe them. This is usually safe.\n";
print "Do you want to scan for Super I/O sensors? (YES/no): ";
@@ -29,21 +29,14 @@
isadump -f 0xecf0 0x10 1 PC87366, temperature channel 2
*/

#include <sys/io.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include "util.h"
#include "superio.h"


/* To keep glibc2 happy */
#if defined(__GLIBC__) && __GLIBC__ == 2 && __GLIBC_MINOR__ >= 0
#include <sys/io.h>
#else
#include <asm/io.h>
#endif

#ifdef __powerpc__
unsigned long isa_io_base = 0; /* XXX for now */
#endif /* __powerpc__ */
@@ -26,20 +26,13 @@
isaset -f 0x5010 0x12 Write 0x12 to location 0x5010
*/

#include <sys/io.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include "util.h"


/* To keep glibc2 happy */
#if defined(__GLIBC__) && __GLIBC__ == 2 && __GLIBC_MINOR__ >= 0
#include <sys/io.h>
#else
#include <asm/io.h>
#endif

#ifdef __powerpc__
unsigned long isa_io_base = 0; /* XXX for now */
#endif /* __powerpc__ */
@@ -19,14 +19,8 @@
MA 02110-1301 USA.
*/

#include <stdlib.h>

#if defined(__GLIBC__) && __GLIBC__ == 2 && __GLIBC_MINOR__ >= 0
#include <sys/io.h>
#else
#include <asm/io.h>
#endif

#include <stdlib.h>
#include "superio.h"

int superio_parse_key(unsigned char *key, const char *s)
@@ -8,16 +8,10 @@
(at your option) any later version.
*/

#include <sys/io.h>
#include <stdio.h>
#include "util.h"

/* To keep glibc2 happy */
#if defined(__GLIBC__) && __GLIBC__ == 2 && __GLIBC_MINOR__ >= 0
#include <sys/io.h>
#else
#include <asm/io.h>
#endif

/* Return 1 if we should continue, 0 if we should abort */
int user_ack(int def)
{
@@ -87,7 +87,7 @@ for further details.
.RE

.SH SEE ALSO
sensors.conf(5)
sensors.conf(5), sensors-detect(8).

.SH AUTHOR
Frodo Looijaard and the lm_sensors group
@@ -1 +1 @@
#define LM_VERSION "3.4.0"
#define LM_VERSION "3.4.0+SVN"