mirror of
https://github.com/lm-sensors/lm-sensors.git
synced 2026-11-14 18:53:54 +00:00
Merge from trunk (4303:4355) out to 3.0.0 branch.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4357 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
1 parent
2bb6b1859a
commit
c5ffa7b635
50 files changed
+1024
-888
No files matched your search
+1
-1
@@ -33,7 +33,7 @@ LIBMAN5FILES := $(MODULE_DIR)/sensors.conf.5
|
||||
# the public header files - in this case they are error.h, sensors.h,
|
||||
# chips.h.
|
||||
LIBMAINVER := 3
|
||||
LIBMINORVER := 1.2
|
||||
LIBMINORVER := 1.3
|
||||
LIBVER := $(LIBMAINVER).$(LIBMINORVER)
|
||||
|
||||
# The static lib name, the shared lib name, and the internal ('so') name of
|
||||
|
||||
+127
-8
@@ -4664,6 +4664,34 @@ static sensors_chip_feature smsc47m1_features[] =
|
||||
{ { 0 }, 0 }
|
||||
};
|
||||
|
||||
static sensors_chip_feature smsc47m2_features[] =
|
||||
{
|
||||
{ { SENSORS_SMSC47M1_FAN1, "fan1", NOMAP, NOMAP, R },
|
||||
SMSC47M1_SYSCTL_FAN1, VALUE(2), 0 },
|
||||
{ { SENSORS_SMSC47M1_FAN2, "fan2", NOMAP, NOMAP, R },
|
||||
SMSC47M1_SYSCTL_FAN2, VALUE(2), 0 },
|
||||
{ { SENSORS_SMSC47M1_FAN3, "fan3", NOMAP, NOMAP, R },
|
||||
SMSC47M1_SYSCTL_FAN3, VALUE(2), 0 },
|
||||
{ { SENSORS_SMSC47M1_FAN1_MIN, "fan1_min", SENSORS_SMSC47M1_FAN1,
|
||||
SENSORS_SMSC47M1_FAN1, RW },
|
||||
SMSC47M1_SYSCTL_FAN1, VALUE(1), 0 },
|
||||
{ { SENSORS_SMSC47M1_FAN2_MIN, "fan2_min", SENSORS_SMSC47M1_FAN2,
|
||||
SENSORS_SMSC47M1_FAN2, RW },
|
||||
SMSC47M1_SYSCTL_FAN2, VALUE(1), 0 },
|
||||
{ { SENSORS_SMSC47M1_FAN3_MIN, "fan3_min", SENSORS_SMSC47M1_FAN3,
|
||||
SENSORS_SMSC47M1_FAN3, RW },
|
||||
SMSC47M1_SYSCTL_FAN3, VALUE(1), 0 },
|
||||
{ { SENSORS_SMSC47M1_FAN1_DIV, "fan1_div", SENSORS_SMSC47M1_FAN1, NOMAP, RW },
|
||||
SMSC47M1_SYSCTL_FAN_DIV, VALUE(1), 0 },
|
||||
{ { SENSORS_SMSC47M1_FAN2_DIV, "fan2_div", SENSORS_SMSC47M1_FAN2, NOMAP, RW },
|
||||
SMSC47M1_SYSCTL_FAN_DIV, VALUE(2), 0 },
|
||||
{ { SENSORS_SMSC47M1_FAN3_DIV, "fan3_div", SENSORS_SMSC47M1_FAN3, NOMAP, RW },
|
||||
SMSC47M1_SYSCTL_FAN_DIV, VALUE(3), 0 },
|
||||
{ { SENSORS_SMSC47M1_ALARMS, "alarms", NOMAP, NOMAP, R },
|
||||
SMSC47M1_SYSCTL_ALARMS, VALUE(1), 0 },
|
||||
{ { 0 }, 0 }
|
||||
};
|
||||
|
||||
static sensors_chip_feature smsc47m192_features[] =
|
||||
{
|
||||
{ { SENSORS_SMSC47M192_IN(0), "in0", NOMAP, NOMAP, R },
|
||||
@@ -5638,13 +5666,17 @@ static sensors_chip_feature max1619_features[] =
|
||||
MAX1619_SYSCTL_LOCAL_TEMP, VALUE(1), 0 },
|
||||
{ { SENSORS_MAX1619_REMOTE_TEMP, "temp2", NOMAP, NOMAP, R },
|
||||
MAX1619_SYSCTL_REMOTE_TEMP, VALUE(3), 0 },
|
||||
{ { SENSORS_MAX1619_REMOTE_HIGH, "temp2_min", NOMAP, NOMAP, RW },
|
||||
MAX1619_SYSCTL_REMOTE_TEMP, VALUE(2), 0 },
|
||||
{ { SENSORS_MAX1619_REMOTE_LOW, "temp2_max", NOMAP, NOMAP, RW },
|
||||
MAX1619_SYSCTL_REMOTE_TEMP, VALUE(1), 0 },
|
||||
{ { SENSORS_MAX1619_REMOTE_MAX, "temp2_crit", NOMAP, NOMAP, RW },
|
||||
{ { SENSORS_MAX1619_REMOTE_LOW, "temp2_min", SENSORS_MAX1619_REMOTE_TEMP,
|
||||
SENSORS_MAX1619_REMOTE_TEMP, RW },
|
||||
MAX1619_SYSCTL_REMOTE_TEMP, VALUE(2), 0 },
|
||||
{ { SENSORS_MAX1619_REMOTE_HIGH, "temp2_max", SENSORS_MAX1619_REMOTE_TEMP,
|
||||
SENSORS_MAX1619_REMOTE_TEMP, RW },
|
||||
MAX1619_SYSCTL_REMOTE_TEMP, VALUE(1), 0 },
|
||||
{ { SENSORS_MAX1619_REMOTE_MAX, "temp2_crit", SENSORS_MAX1619_REMOTE_TEMP,
|
||||
SENSORS_MAX1619_REMOTE_TEMP, RW },
|
||||
MAX1619_SYSCTL_REMOTE_CRIT, VALUE(1), 0 },
|
||||
{ { SENSORS_MAX1619_REMOTE_HYST, "temp2_hyst", NOMAP, NOMAP, RW },
|
||||
{ { SENSORS_MAX1619_REMOTE_HYST, "temp2_hyst", SENSORS_MAX1619_REMOTE_TEMP,
|
||||
SENSORS_MAX1619_REMOTE_TEMP, RW },
|
||||
MAX1619_SYSCTL_REMOTE_CRIT, VALUE(2), 0,
|
||||
"temp2_crit_hyst", 3 },
|
||||
{ { SENSORS_MAX1619_ALARMS, "alarms", NOMAP, NOMAP, R },
|
||||
@@ -5662,8 +5694,10 @@ static sensors_chip_feature max6650_features[] =
|
||||
MAX6650_SYSCTL_FAN3, VALUE(1), 0 },
|
||||
{ { SENSORS_MAX6650_FAN4_TACH, "fan4", NOMAP, NOMAP, R },
|
||||
MAX6650_SYSCTL_FAN4, VALUE(1), 0 },
|
||||
{ { SENSORS_MAX6650_SPEED, "speed", NOMAP, NOMAP, RW },
|
||||
MAX6650_SYSCTL_SPEED, VALUE(1), 0 },
|
||||
{ { SENSORS_MAX6650_SPEED, "speed", SENSORS_MAX6650_FAN1_TACH,
|
||||
SENSORS_MAX6650_FAN1_TACH, RW },
|
||||
MAX6650_SYSCTL_SPEED, VALUE(1), 0,
|
||||
"fan1_target", 0 },
|
||||
{ { 0 }, 0 }
|
||||
};
|
||||
|
||||
@@ -5931,6 +5965,89 @@ static sensors_chip_feature coretemp_features[] =
|
||||
{ { 0 }, 0 }
|
||||
};
|
||||
|
||||
#define SENSORS_DME1737_IN_FEATURES(nr) \
|
||||
{ { SENSORS_DME1737_IN(nr), "in" #nr, \
|
||||
NOMAP, NOMAP, R }, \
|
||||
NOSYSCTL, VALUE(3), 3 }, \
|
||||
{ { SENSORS_DME1737_IN_MIN(nr), "in" #nr "_min", \
|
||||
SENSORS_DME1737_IN(nr), SENSORS_DME1737_IN(nr), RW }, \
|
||||
NOSYSCTL, VALUE(1), 3 }, \
|
||||
{ { SENSORS_DME1737_IN_MAX(nr), "in" #nr "_max", \
|
||||
SENSORS_DME1737_IN(nr), SENSORS_DME1737_IN(nr), RW }, \
|
||||
NOSYSCTL, VALUE(2), 3 }, \
|
||||
{ { SENSORS_DME1737_IN_ALARM(nr), "in" #nr "_alarm", \
|
||||
SENSORS_DME1737_IN(nr), NOMAP, R }, \
|
||||
NOSYSCTL, VALUE(1), 0 }
|
||||
|
||||
#define SENSORS_DME1737_TEMP_FEATURES(nr) \
|
||||
{ { SENSORS_DME1737_TEMP(nr), "temp" #nr, \
|
||||
NOMAP, NOMAP, R }, \
|
||||
NOSYSCTL, VALUE(3), 3 }, \
|
||||
{ { SENSORS_DME1737_TEMP_MIN(nr), "temp" #nr "_min", \
|
||||
SENSORS_DME1737_TEMP(nr), SENSORS_DME1737_TEMP(nr), RW }, \
|
||||
NOSYSCTL, VALUE(2), 3 }, \
|
||||
{ { SENSORS_DME1737_TEMP_MAX(nr), "temp" #nr "_max", \
|
||||
SENSORS_DME1737_TEMP(nr), SENSORS_DME1737_TEMP(nr), RW }, \
|
||||
NOSYSCTL, VALUE(1), 3 }, \
|
||||
{ { SENSORS_DME1737_TEMP_ALARM(nr), "temp" #nr "_alarm", \
|
||||
SENSORS_DME1737_TEMP(nr), NOMAP, R }, \
|
||||
NOSYSCTL, VALUE(1), 0 }, \
|
||||
{ { SENSORS_DME1737_TEMP_FAULT(nr), "temp" #nr "_fault", \
|
||||
SENSORS_DME1737_TEMP(nr), NOMAP, R }, \
|
||||
NOSYSCTL, VALUE(2), 0 }
|
||||
|
||||
#define SENSORS_DME1737_FAN_FEATURES(nr) \
|
||||
{ { SENSORS_DME1737_FAN(nr), "fan" #nr, \
|
||||
NOMAP, NOMAP, R }, \
|
||||
NOSYSCTL, VALUE(2), 0 }, \
|
||||
{ { SENSORS_DME1737_FAN_MIN(nr), "fan" #nr "_min", \
|
||||
SENSORS_DME1737_FAN(nr), SENSORS_DME1737_FAN(nr), RW }, \
|
||||
NOSYSCTL, VALUE(1), 0 }, \
|
||||
{ { SENSORS_DME1737_FAN_ALARM(nr), "fan" #nr "_alarm", \
|
||||
SENSORS_DME1737_FAN(nr), NOMAP, R }, \
|
||||
NOSYSCTL, VALUE(1), 0 }
|
||||
|
||||
#define SENSORS_DME1737_PWM_FEATURES(nr) \
|
||||
{ { SENSORS_DME1737_PWM(nr), "pwm" #nr, \
|
||||
NOMAP, NOMAP, RW }, \
|
||||
NOSYSCTL, VALUE(1), 0 }, \
|
||||
{ { SENSORS_DME1737_PWM_ENABLE(nr), "pwm" #nr "_enable", \
|
||||
SENSORS_DME1737_PWM(nr), SENSORS_DME1737_PWM(nr), RW }, \
|
||||
NOSYSCTL, VALUE(2), 0 }, \
|
||||
{ { SENSORS_DME1737_PWM_FREQ(nr), "pwm" #nr "_freq", \
|
||||
SENSORS_DME1737_PWM(nr), SENSORS_DME1737_PWM(nr), RW }, \
|
||||
NOSYSCTL, VALUE(3), 0 }
|
||||
|
||||
static sensors_chip_feature dme1737_features[] =
|
||||
{
|
||||
SENSORS_DME1737_IN_FEATURES(0),
|
||||
SENSORS_DME1737_IN_FEATURES(1),
|
||||
SENSORS_DME1737_IN_FEATURES(2),
|
||||
SENSORS_DME1737_IN_FEATURES(3),
|
||||
SENSORS_DME1737_IN_FEATURES(4),
|
||||
SENSORS_DME1737_IN_FEATURES(5),
|
||||
SENSORS_DME1737_IN_FEATURES(6),
|
||||
SENSORS_DME1737_TEMP_FEATURES(1),
|
||||
SENSORS_DME1737_TEMP_FEATURES(2),
|
||||
SENSORS_DME1737_TEMP_FEATURES(3),
|
||||
SENSORS_DME1737_FAN_FEATURES(1),
|
||||
SENSORS_DME1737_FAN_FEATURES(2),
|
||||
SENSORS_DME1737_FAN_FEATURES(3),
|
||||
SENSORS_DME1737_FAN_FEATURES(4),
|
||||
SENSORS_DME1737_FAN_FEATURES(5),
|
||||
SENSORS_DME1737_FAN_FEATURES(6),
|
||||
SENSORS_DME1737_PWM_FEATURES(1),
|
||||
SENSORS_DME1737_PWM_FEATURES(2),
|
||||
SENSORS_DME1737_PWM_FEATURES(3),
|
||||
SENSORS_DME1737_PWM_FEATURES(5),
|
||||
SENSORS_DME1737_PWM_FEATURES(6),
|
||||
{ { SENSORS_DME1737_VID, "cpu0_vid", NOMAP, NOMAP, R },
|
||||
NOSYSCTL, VALUE(1), 3 },
|
||||
{ { SENSORS_DME1737_VRM, "vrm", NOMAP, NOMAP, RW },
|
||||
NOSYSCTL, VALUE(1), 1 },
|
||||
{ { 0 }, 0 }
|
||||
};
|
||||
|
||||
sensors_chip_features sensors_chip_features_list[] =
|
||||
{
|
||||
{ SENSORS_LM78_PREFIX, lm78_features },
|
||||
@@ -6005,6 +6122,7 @@ sensors_chip_features sensors_chip_features_list[] =
|
||||
{ SENSORS_VT1211_PREFIX, vt1211_features },
|
||||
{ SENSORS_SMSC47M192_PREFIX, smsc47m192_features },
|
||||
{ SENSORS_SMSC47M1_PREFIX, smsc47m1_features },
|
||||
{ SENSORS_SMSC47M2_PREFIX, smsc47m2_features },
|
||||
{ SENSORS_PC87360_PREFIX, pc87360_features },
|
||||
{ SENSORS_PC87363_PREFIX, pc87360_features },
|
||||
{ SENSORS_PC87364_PREFIX, pc87360_features },
|
||||
@@ -6042,5 +6160,6 @@ sensors_chip_features sensors_chip_features_list[] =
|
||||
{ SENSORS_ABITUGURU_PREFIX, abituguru_features },
|
||||
{ SENSORS_K8TEMP_PREFIX, k8temp_features },
|
||||
{ SENSORS_CORETEMP_PREFIX, coretemp_features },
|
||||
{ SENSORS_DME1737_PREFIX, dme1737_features },
|
||||
{ 0 }
|
||||
};
|
||||
+34
@@ -1834,13 +1834,17 @@
|
||||
#define SENSORS_VT1211_UCH 84 /* RW */
|
||||
|
||||
#define SENSORS_SMSC47M1_PREFIX "smsc47m1"
|
||||
#define SENSORS_SMSC47M2_PREFIX "smsc47m2"
|
||||
|
||||
#define SENSORS_SMSC47M1_FAN1 31 /* R */
|
||||
#define SENSORS_SMSC47M1_FAN2 32 /* R */
|
||||
#define SENSORS_SMSC47M1_FAN3 33 /* R */
|
||||
#define SENSORS_SMSC47M1_FAN1_MIN 41 /* RW */
|
||||
#define SENSORS_SMSC47M1_FAN2_MIN 42 /* RW */
|
||||
#define SENSORS_SMSC47M1_FAN3_MIN 43 /* RW */
|
||||
#define SENSORS_SMSC47M1_FAN1_DIV 75 /* RW */
|
||||
#define SENSORS_SMSC47M1_FAN2_DIV 76 /* RW */
|
||||
#define SENSORS_SMSC47M1_FAN3_DIV 77 /* RW */
|
||||
#define SENSORS_SMSC47M1_ALARMS 81 /* R */
|
||||
|
||||
#define SENSORS_SMSC47M192_PREFIX "smsc47m192"
|
||||
@@ -2258,4 +2262,34 @@
|
||||
#define SENSORS_CORETEMP_TEMP1_CRIT 0x02 /* R */
|
||||
#define SENSORS_CORETEMP_TEMP1_CRIT_ALARM 0x03 /* R */
|
||||
|
||||
/* DME1737 */
|
||||
|
||||
#define SENSORS_DME1737_PREFIX "dme1737"
|
||||
|
||||
/* in n from 0 to 6 */
|
||||
#define SENSORS_DME1737_IN(n) (0x01 + (n)) /* R */
|
||||
#define SENSORS_DME1737_IN_MIN(n) (0x11 + (n)) /* RW */
|
||||
#define SENSORS_DME1737_IN_MAX(n) (0x21 + (n)) /* RW */
|
||||
#define SENSORS_DME1737_IN_ALARM(n) (0x31 + (n)) /* R */
|
||||
|
||||
/* temp n from 1 to 3*/
|
||||
#define SENSORS_DME1737_TEMP(n) (0x41 + (n)) /* R */
|
||||
#define SENSORS_DME1737_TEMP_MIN(n) (0x51 + (n)) /* RW */
|
||||
#define SENSORS_DME1737_TEMP_MAX(n) (0x61 + (n)) /* RW */
|
||||
#define SENSORS_DME1737_TEMP_ALARM(n) (0x71 + (n)) /* R */
|
||||
#define SENSORS_DME1737_TEMP_FAULT(n) (0x81 + (n)) /* R */
|
||||
|
||||
/* fan n from 1 to 6 */
|
||||
#define SENSORS_DME1737_FAN(n) (0x91 + (n)) /* R */
|
||||
#define SENSORS_DME1737_FAN_MIN(n) (0xa1 + (n)) /* RW */
|
||||
#define SENSORS_DME1737_FAN_ALARM(n) (0xb1 + (n)) /* R */
|
||||
|
||||
/* pwm n from 1 to 3 and 5 to 6 */
|
||||
#define SENSORS_DME1737_PWM(n) (0xc1 + (n)) /* RW */
|
||||
#define SENSORS_DME1737_PWM_ENABLE(n) (0xd1 + (n)) /* RW */
|
||||
#define SENSORS_DME1737_PWM_FREQ(n) (0xe1 + (n)) /* RW */
|
||||
|
||||
#define SENSORS_DME1737_VID (0xf0) /* R */
|
||||
#define SENSORS_DME1737_VRM (0xf1) /* RW */
|
||||
|
||||
#endif /* def LIB_SENSORS_CHIPS_H */
|
||||
+5
-11
@@ -247,7 +247,7 @@ struct match {
|
||||
|
||||
static const struct match matches[] = {
|
||||
{ "beeps", "beep_mask", 0 },
|
||||
{ "pwm", "fan1_pwm", 0 },
|
||||
{ "pwm", "pwm1", 0, "fan1_pwm" },
|
||||
{ "vid", "cpu0_vid", INMAG, "in0_ref" },
|
||||
{ "remote_temp", "temp2_input", TEMPMAG },
|
||||
{ "remote_temp_hyst", "temp2_max_hyst", TEMPMAG },
|
||||
@@ -259,14 +259,6 @@ static const struct match matches[] = {
|
||||
{ "temp_over", "temp1_max", TEMPMAG },
|
||||
{ "temp_high", "temp1_max", TEMPMAG },
|
||||
{ "temp_crit", "temp1_crit", TEMPMAG },
|
||||
{ "pwm1", "pwm1", 0, "fan1_pwm" },
|
||||
{ "pwm2", "pwm2", 0, "fan2_pwm" },
|
||||
{ "pwm3", "pwm3", 0, "fan3_pwm" },
|
||||
{ "pwm4", "pwm4", 0, "fan4_pwm" },
|
||||
{ "pwm1_enable", "pwm1_enable", 0, "fan1_pwm_enable" },
|
||||
{ "pwm2_enable", "pwm2_enable", 0, "fan2_pwm_enable" },
|
||||
{ "pwm3_enable", "pwm3_enable", 0, "fan3_pwm_enable" },
|
||||
{ "pwm4_enable", "pwm4_enable", 0, "fan4_pwm_enable" },
|
||||
{ NULL, NULL }
|
||||
};
|
||||
|
||||
@@ -357,13 +349,15 @@ static int getsysname(const sensors_chip_feature *feature, char *sysname,
|
||||
return 0;
|
||||
}
|
||||
if(sscanf(name, "pwm%d%c", &num, &check) == 1) {
|
||||
sprintf(sysname, "fan%d_pwm", num);
|
||||
strcpy(sysname, name);
|
||||
*sysmag = 0;
|
||||
sprintf(altsysname, "fan%d_pwm", num);
|
||||
return 0;
|
||||
}
|
||||
if(sscanf(name, "pwm%d_enabl%c%c", &num, &last, &check) == 2 && last == 'e') {
|
||||
sprintf(sysname, "fan%d_pwm_enable", num);
|
||||
strcpy(sysname, name);
|
||||
*sysmag = 0;
|
||||
sprintf(altsysname, "fan%d_pwm_enable", num);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
+14
-10
@@ -75,18 +75,23 @@ static int sensors_read_one_sysfs_chip(struct sysfs_device *dev)
|
||||
|
||||
if (sscanf(dev->name, "%d-%x", &entry.name.bus, &entry.name.addr) == 2) {
|
||||
/* find out if legacy ISA or not */
|
||||
snprintf(bus_path, sizeof(bus_path),
|
||||
if (entry.name.bus == 9191)
|
||||
entry.name.bus = SENSORS_CHIP_NAME_BUS_ISA;
|
||||
else {
|
||||
snprintf(bus_path, sizeof(bus_path),
|
||||
"%s/class/i2c-adapter/i2c-%d/device/name",
|
||||
sensors_sysfs_mount, entry.name.bus);
|
||||
|
||||
if ((bus_attr = sysfs_open_attribute(bus_path))) {
|
||||
if (sysfs_read_attribute(bus_attr))
|
||||
return -SENSORS_ERR_PARSE;
|
||||
if ((bus_attr = sysfs_open_attribute(bus_path))) {
|
||||
if (sysfs_read_attribute(bus_attr))
|
||||
return -SENSORS_ERR_PARSE;
|
||||
|
||||
if (bus_attr->value && !strncmp(bus_attr->value, "ISA ", 4))
|
||||
entry.name.bus = SENSORS_CHIP_NAME_BUS_ISA;
|
||||
if (bus_attr->value
|
||||
&& !strncmp(bus_attr->value, "ISA ", 4))
|
||||
entry.name.bus = SENSORS_CHIP_NAME_BUS_ISA;
|
||||
|
||||
sysfs_close_attribute(bus_attr);
|
||||
sysfs_close_attribute(bus_attr);
|
||||
}
|
||||
}
|
||||
} else if (sscanf(dev->name, "%*[a-z0-9_].%d", &entry.name.addr) == 1) {
|
||||
/* must be new ISA (platform driver) */
|
||||
@@ -195,13 +200,12 @@ int sensors_read_sysfs_bus(void)
|
||||
struct sysfs_device *dev;
|
||||
struct sysfs_attribute *attr;
|
||||
|
||||
if (!(dev = sysfs_get_classdev_device(clsdev)))
|
||||
continue;
|
||||
/* Get the adapter name from the classdev "name" attribute
|
||||
* (Linux 2.6.20 and later). If it fails, fall back to
|
||||
* the device "name" attribute (for older kernels). */
|
||||
if (!(attr = sysfs_get_classdev_attr(clsdev, "name"))
|
||||
&& !(attr = sysfs_get_device_attr(dev, "name")))
|
||||
&& !((dev = sysfs_get_classdev_device(clsdev)) &&
|
||||
(attr = sysfs_get_device_attr(dev, "name"))))
|
||||
continue;
|
||||
|
||||
/* NB: attr->value[attr->len-1] == '\n'; chop that off */
|
||||
|
||||
Reference in new issue
Block a user