mirror of
https://github.com/lm-sensors/lm-sensors.git
synced 2026-11-23 20:11:42 +00:00
Preleminary (read-only) National Semiconductor PC87360, PC87363
and PC87364 fan monitor and controller support. git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@2403 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
1 parent
a46739aa1d
commit
18d6d587cc
8 files changed
+173
-3
No files matched your search
@@ -145,6 +145,11 @@ maxilife
|
||||
mtp008
|
||||
mtp008 3 7 3 3 pwm yes no
|
||||
|
||||
pc87360
|
||||
pc87360 - - 2 2 pwm no yes (LPC)
|
||||
pc87363 - - 2 2 pwm no yes (LPC)
|
||||
pc87364 - - 3 3 pwm no yes (LPC)
|
||||
|
||||
sis5595
|
||||
sis5595 0-1 4-5 2 - no yes
|
||||
|
||||
|
||||
@@ -136,6 +136,9 @@ endif
|
||||
ifneq ($(shell if grep -q '^CONFIG_SENSORS_SMSC47M1=y' $(LINUX)/.config; then echo 1; fi),1)
|
||||
KERNELCHIPSTARGETS += $(MODULE_DIR)/smsc47m1.o
|
||||
endif
|
||||
ifneq ($(shell if grep -q '^CONFIG_SENSORS_PC87360=y' $(LINUX)/.config; then echo 1; fi),1)
|
||||
KERNELCHIPSTARGETS += $(MODULE_DIR)/pc87360-fan.o
|
||||
endif
|
||||
ifneq ($(shell if grep -q '^CONFIG_SENSORS_THMC50=y' $(LINUX)/.config; then echo 1; fi),1)
|
||||
KERNELCHIPSTARGETS += $(MODULE_DIR)/thmc50.o
|
||||
endif
|
||||
|
||||
+58
@@ -4251,6 +4251,61 @@ static sensors_chip_feature smsc47m1_features[] =
|
||||
{ 0 }
|
||||
};
|
||||
|
||||
static sensors_chip_feature pc87360_features[] =
|
||||
{
|
||||
{ SENSORS_PC87360_FAN1, "fan1", NOMAP, NOMAP, R,
|
||||
PC87360_SYSCTL_FAN1, VALUE(2), 0 },
|
||||
{ SENSORS_PC87360_FAN2, "fan2", NOMAP, NOMAP, R,
|
||||
PC87360_SYSCTL_FAN2, VALUE(2), 0 },
|
||||
{ SENSORS_PC87360_FAN1_MIN, "fan1_min", SENSORS_PC87360_FAN1,
|
||||
SENSORS_PC87360_FAN1, R, PC87360_SYSCTL_FAN1,
|
||||
VALUE(1), 0 },
|
||||
{ SENSORS_PC87360_FAN2_MIN, "fan2_min", SENSORS_PC87360_FAN2,
|
||||
SENSORS_PC87360_FAN2, R, PC87360_SYSCTL_FAN2,
|
||||
VALUE(1), 0 },
|
||||
{ SENSORS_PC87360_FAN1_DIV, "fan1_div", SENSORS_PC87360_FAN1,
|
||||
NOMAP, R, PC87360_SYSCTL_FAN_DIV, VALUE(1), 0 },
|
||||
{ SENSORS_PC87360_FAN2_DIV, "fan2_div", SENSORS_PC87360_FAN2,
|
||||
NOMAP, R, PC87360_SYSCTL_FAN_DIV, VALUE(2), 0 },
|
||||
{ SENSORS_PC87360_FAN1_STATUS, "fan1_status", SENSORS_PC87360_FAN1,
|
||||
NOMAP, R, PC87360_SYSCTL_FAN1_STATUS, VALUE(1), 0 },
|
||||
{ SENSORS_PC87360_FAN2_STATUS, "fan2_status", SENSORS_PC87360_FAN2,
|
||||
NOMAP, R, PC87360_SYSCTL_FAN2_STATUS, VALUE(1), 0 },
|
||||
{ 0 }
|
||||
};
|
||||
|
||||
static sensors_chip_feature pc87364_features[] =
|
||||
{
|
||||
{ SENSORS_PC87360_FAN1, "fan1", NOMAP, NOMAP, R,
|
||||
PC87360_SYSCTL_FAN1, VALUE(2), 0 },
|
||||
{ SENSORS_PC87360_FAN2, "fan2", NOMAP, NOMAP, R,
|
||||
PC87360_SYSCTL_FAN2, VALUE(2), 0 },
|
||||
{ SENSORS_PC87360_FAN3, "fan3", NOMAP, NOMAP, R,
|
||||
PC87360_SYSCTL_FAN3, VALUE(2), 0 },
|
||||
{ SENSORS_PC87360_FAN1_MIN, "fan1_min", SENSORS_PC87360_FAN1,
|
||||
SENSORS_PC87360_FAN1, R, PC87360_SYSCTL_FAN1,
|
||||
VALUE(1), 0 },
|
||||
{ SENSORS_PC87360_FAN2_MIN, "fan2_min", SENSORS_PC87360_FAN2,
|
||||
SENSORS_PC87360_FAN2, R, PC87360_SYSCTL_FAN2,
|
||||
VALUE(1), 0 },
|
||||
{ SENSORS_PC87360_FAN3_MIN, "fan3_min", SENSORS_PC87360_FAN3,
|
||||
SENSORS_PC87360_FAN3, R, PC87360_SYSCTL_FAN3,
|
||||
VALUE(1), 0 },
|
||||
{ SENSORS_PC87360_FAN1_DIV, "fan1_div", SENSORS_PC87360_FAN1,
|
||||
NOMAP, R, PC87360_SYSCTL_FAN_DIV, VALUE(1), 0 },
|
||||
{ SENSORS_PC87360_FAN2_DIV, "fan2_div", SENSORS_PC87360_FAN2,
|
||||
NOMAP, R, PC87360_SYSCTL_FAN_DIV, VALUE(2), 0 },
|
||||
{ SENSORS_PC87360_FAN3_DIV, "fan3_div", SENSORS_PC87360_FAN3,
|
||||
NOMAP, R, PC87360_SYSCTL_FAN_DIV, VALUE(2), 0 },
|
||||
{ SENSORS_PC87360_FAN1_STATUS, "fan1_status", SENSORS_PC87360_FAN1,
|
||||
NOMAP, R, PC87360_SYSCTL_FAN1_STATUS, VALUE(1), 0 },
|
||||
{ SENSORS_PC87360_FAN2_STATUS, "fan2_status", SENSORS_PC87360_FAN2,
|
||||
NOMAP, R, PC87360_SYSCTL_FAN2_STATUS, VALUE(1), 0 },
|
||||
{ SENSORS_PC87360_FAN3_STATUS, "fan3_status", SENSORS_PC87360_FAN3,
|
||||
NOMAP, R, PC87360_SYSCTL_FAN3_STATUS, VALUE(1), 0 },
|
||||
{ 0 }
|
||||
};
|
||||
|
||||
static sensors_chip_feature lm92_features[] =
|
||||
{
|
||||
{ SENSORS_LM92_TEMP, "temp", NOMAP, NOMAP,
|
||||
@@ -4797,6 +4852,9 @@ sensors_chip_features sensors_chip_features_list[] =
|
||||
{ SENSORS_PCF8591_PREFIX, pcf8591_features },
|
||||
{ SENSORS_VT1211_PREFIX, vt1211_features },
|
||||
{ SENSORS_SMSC47M1_PREFIX, smsc47m1_features },
|
||||
{ SENSORS_PC87360_PREFIX, pc87360_features },
|
||||
{ SENSORS_PC87363_PREFIX, pc87360_features },
|
||||
{ SENSORS_PC87364_PREFIX, pc87364_features },
|
||||
{ SENSORS_LM92_PREFIX, lm92_features },
|
||||
{ SENSORS_VT8231_PREFIX, vt8231_features },
|
||||
{ SENSORS_BMC_PREFIX, bmc_features },
|
||||
|
||||
+17
@@ -1618,6 +1618,23 @@
|
||||
#define SENSORS_SMSC47M1_FAN2_DIV 76 /* RW */
|
||||
#define SENSORS_SMSC47M1_ALARMS 81 /* R */
|
||||
|
||||
#define SENSORS_PC87360_PREFIX "pc87360"
|
||||
#define SENSORS_PC87363_PREFIX "pc87363"
|
||||
#define SENSORS_PC87364_PREFIX "pc87364"
|
||||
|
||||
#define SENSORS_PC87360_FAN1 31 /* R */
|
||||
#define SENSORS_PC87360_FAN2 32 /* R */
|
||||
#define SENSORS_PC87360_FAN3 33 /* R */
|
||||
#define SENSORS_PC87360_FAN1_MIN 41 /* R */
|
||||
#define SENSORS_PC87360_FAN2_MIN 42 /* R */
|
||||
#define SENSORS_PC87360_FAN3_MIN 43 /* R */
|
||||
#define SENSORS_PC87360_FAN1_DIV 71 /* R */
|
||||
#define SENSORS_PC87360_FAN2_DIV 72 /* R */
|
||||
#define SENSORS_PC87360_FAN3_DIV 73 /* R */
|
||||
#define SENSORS_PC87360_FAN1_STATUS 81 /* R */
|
||||
#define SENSORS_PC87360_FAN2_STATUS 82 /* R */
|
||||
#define SENSORS_PC87360_FAN3_STATUS 83 /* R */
|
||||
|
||||
#define SENSORS_LM92_PREFIX "lm92"
|
||||
|
||||
#define SENSORS_LM92_TEMP_HIGH 1 /* RW */
|
||||
|
||||
@@ -1380,7 +1380,7 @@ use subs qw(mtp008_detect lm78_detect lm78_isa_detect lm78_alias_detect
|
||||
},
|
||||
{
|
||||
name => "Nat. Semi. PC87360 Super IO Fan Sensors",
|
||||
driver => "to-be-written",
|
||||
driver => "pc87360-fan",
|
||||
addrreg => 0x2e,
|
||||
datareg => 0x2f,
|
||||
enter => [],
|
||||
@@ -1394,7 +1394,7 @@ use subs qw(mtp008_detect lm78_detect lm78_isa_detect lm78_alias_detect
|
||||
},
|
||||
{
|
||||
name => "Nat. Semi. PC87363 Super IO Fan Sensors",
|
||||
driver => "to-be-written",
|
||||
driver => "pc87360-fan",
|
||||
addrreg => 0x2e,
|
||||
datareg => 0x2f,
|
||||
enter => [],
|
||||
@@ -1408,7 +1408,7 @@ use subs qw(mtp008_detect lm78_detect lm78_isa_detect lm78_alias_detect
|
||||
},
|
||||
{
|
||||
name => "Nat. Semi. PC87364 Super IO Fan Sensors",
|
||||
driver => "to-be-written",
|
||||
driver => "pc87360-fan",
|
||||
addrreg => 0x2e,
|
||||
datareg => 0x2f,
|
||||
enter => [],
|
||||
|
||||
@@ -3988,6 +3988,88 @@ void print_smsc47m1(const sensors_chip_name *name)
|
||||
|
||||
}
|
||||
|
||||
void print_pc87360(const sensors_chip_name *name)
|
||||
{
|
||||
char *label = NULL;
|
||||
double cur, min, fdiv;
|
||||
int status, valid;
|
||||
|
||||
if (!sensors_get_feature(*name, SENSORS_PC87360_FAN1_STATUS, &cur))
|
||||
status = cur + 0.5;
|
||||
else {
|
||||
printf("ERROR: Can't get FAN1 status data!\n");
|
||||
status = 0;
|
||||
}
|
||||
|
||||
if (!sensors_get_label_and_valid(*name, SENSORS_PC87360_FAN1, &label, &valid)
|
||||
&& !sensors_get_feature(*name, SENSORS_PC87360_FAN1, &cur)
|
||||
&& !sensors_get_feature(*name, SENSORS_PC87360_FAN1_DIV, &fdiv)
|
||||
&& !sensors_get_feature(*name, SENSORS_PC87360_FAN1_MIN, &min)) {
|
||||
if (valid) {
|
||||
print_label(label, 10);
|
||||
printf("%4.0f RPM (min = %4.0f RPM, div = %1.0f) %s\n",
|
||||
cur, min, fdiv,
|
||||
status&PC87360_ALARM_FAN_OVERFLOW?"OVERFLOW":
|
||||
status&PC87360_ALARM_FAN_LOW?"ALARM":"");
|
||||
}
|
||||
} else
|
||||
printf("ERROR: Can't get FAN1 data!\n");
|
||||
free_the_label(&label);
|
||||
|
||||
if (!sensors_get_feature(*name, SENSORS_PC87360_FAN2_STATUS, &cur))
|
||||
status = cur + 0.5;
|
||||
else {
|
||||
printf("ERROR: Can't get FAN2 status data!\n");
|
||||
status = 0;
|
||||
}
|
||||
|
||||
if (!sensors_get_label_and_valid(*name, SENSORS_PC87360_FAN2, &label, &valid)
|
||||
&& !sensors_get_feature(*name, SENSORS_PC87360_FAN2, &cur)
|
||||
&& !sensors_get_feature(*name, SENSORS_PC87360_FAN2_DIV, &fdiv)
|
||||
&& !sensors_get_feature(*name, SENSORS_PC87360_FAN2_MIN, &min)) {
|
||||
if (valid) {
|
||||
print_label(label, 10);
|
||||
printf("%4.0f RPM (min = %4.0f RPM, div = %1.0f) %s\n",
|
||||
cur, min, fdiv,
|
||||
status&PC87360_ALARM_FAN_OVERFLOW?"OVERFLOW":
|
||||
status&PC87360_ALARM_FAN_LOW?"ALARM":"");
|
||||
}
|
||||
} else
|
||||
printf("ERROR: Can't get FAN2 data!\n");
|
||||
free_the_label(&label);
|
||||
}
|
||||
|
||||
void print_pc87364(const sensors_chip_name *name)
|
||||
{
|
||||
char *label = NULL;
|
||||
double cur, min, fdiv;
|
||||
int status, valid;
|
||||
|
||||
print_pc87360(name);
|
||||
|
||||
if (!sensors_get_feature(*name, SENSORS_PC87360_FAN3_STATUS, &cur))
|
||||
status = cur + 0.5;
|
||||
else {
|
||||
printf("ERROR: Can't get FAN3 status data!\n");
|
||||
status = 0;
|
||||
}
|
||||
|
||||
if (!sensors_get_label_and_valid(*name, SENSORS_PC87360_FAN3, &label, &valid)
|
||||
&& !sensors_get_feature(*name, SENSORS_PC87360_FAN3, &cur)
|
||||
&& !sensors_get_feature(*name, SENSORS_PC87360_FAN3_DIV, &fdiv)
|
||||
&& !sensors_get_feature(*name, SENSORS_PC87360_FAN3_MIN, &min)) {
|
||||
if (valid) {
|
||||
print_label(label, 10);
|
||||
printf("%4.0f RPM (min = %4.0f RPM, div = %1.0f) %s\n",
|
||||
cur, min, fdiv,
|
||||
status&PC87360_ALARM_FAN_OVERFLOW?"OVERFLOW":
|
||||
status&PC87360_ALARM_FAN_LOW?"ALARM":"");
|
||||
}
|
||||
} else
|
||||
printf("ERROR: Can't get FAN3 data!\n");
|
||||
free_the_label(&label);
|
||||
}
|
||||
|
||||
static void lm92_print_temp (float n_cur,float n_high,float n_low,float n_crit,float n_hyst)
|
||||
{
|
||||
if (fahrenheit) {
|
||||
|
||||
@@ -52,6 +52,8 @@ extern void print_fscher(const sensors_chip_name *name);
|
||||
extern void print_pcf8591(const sensors_chip_name *name);
|
||||
extern void print_vt1211(const sensors_chip_name *name);
|
||||
extern void print_smsc47m1(const sensors_chip_name *name);
|
||||
extern void print_pc87360(const sensors_chip_name *name);
|
||||
extern void print_pc87364(const sensors_chip_name *name);
|
||||
extern void print_lm92(const sensors_chip_name *name);
|
||||
extern void print_vt8231(const sensors_chip_name *name);
|
||||
extern void print_bmc(const sensors_chip_name *name);
|
||||
|
||||
@@ -410,6 +410,9 @@ struct match matches[] = {
|
||||
{ "pcf8591", print_pcf8591 },
|
||||
{ "vt1211", print_vt1211 },
|
||||
{ "smsc47m1", print_smsc47m1 },
|
||||
{ "pc87360", print_pc87360 },
|
||||
{ "pc87363", print_pc87360 },
|
||||
{ "pc87364", print_pc87364 },
|
||||
{ "lm92", print_lm92 },
|
||||
{ "vt8231", print_vt8231 },
|
||||
{ "bmc", print_bmc },
|
||||
|
||||
Reference in new issue
Block a user