mirror of
https://github.com/lm-sensors/lm-sensors.git
synced 2026-11-07 16:01:34 +00:00
pc87360 fan clock dividers are now read-only.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@2562 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
1 parent
95ecf99693
commit
488b99274d
3 files changed
+11
-33
No files matched your search
+2
-24
@@ -646,13 +646,10 @@ int pc87360_detect(struct i2c_adapter *adapter, int address,
|
||||
#endif
|
||||
}
|
||||
|
||||
/* Fan clock dividers and fan low limits may be needed before any
|
||||
data is read */
|
||||
/* Fan clock dividers may be needed before any data is read */
|
||||
for (i = 0; i < data->fannr; i++) {
|
||||
data->fan_status[i] = pc87360_read_value(data, LD_FAN,
|
||||
NO_BANK, PC87360_REG_FAN_STATUS(i));
|
||||
data->fan_min[i] = pc87360_read_value(data, LD_FAN,
|
||||
NO_BANK, PC87360_REG_FAN_MIN(i));
|
||||
}
|
||||
|
||||
if (init > 0) {
|
||||
@@ -1063,7 +1060,7 @@ void pc87360_fan_div(struct i2c_client *client, int operation,
|
||||
int ctl_name, int *nrels_mag, long *results)
|
||||
{
|
||||
struct pc87360_data *data = client->data;
|
||||
int i, nr;
|
||||
int i;
|
||||
|
||||
if (operation == SENSORS_PROC_REAL_INFO)
|
||||
*nrels_mag = 0;
|
||||
@@ -1074,25 +1071,6 @@ void pc87360_fan_div(struct i2c_client *client, int operation,
|
||||
}
|
||||
*nrels_mag = data->fannr;
|
||||
}
|
||||
/* We ignore National's recommendation */
|
||||
else if (operation == SENSORS_PROC_REAL_WRITE) {
|
||||
nr = data->fannr <= *nrels_mag ? data->fannr : *nrels_mag;
|
||||
for (i = 0; i < nr; i++) {
|
||||
/* Preserve fan min */
|
||||
int fan_min = FAN_FROM_REG(data->fan_min[i],
|
||||
FAN_DIV_FROM_REG(data->fan_status[i]));
|
||||
data->fan_status[i] = (data->fan_status[i] & 0x9F)
|
||||
| FAN_DIV_TO_REG(results[i]);
|
||||
pc87360_write_value(data, LD_FAN, NO_BANK,
|
||||
PC87360_REG_FAN_STATUS(i),
|
||||
data->fan_status[i]);
|
||||
data->fan_min[i] = FAN_TO_REG(fan_min,
|
||||
FAN_DIV_FROM_REG(data->fan_status[i]));
|
||||
pc87360_write_value(data, LD_FAN, NO_BANK,
|
||||
PC87360_REG_FAN_MIN(i),
|
||||
data->fan_min[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void pc87360_pwm(struct i2c_client *client, int operation, int ctl_name,
|
||||
|
||||
+6
-6
@@ -4269,11 +4269,11 @@ static sensors_chip_feature pc87360_features[] =
|
||||
SENSORS_PC87360_FAN3, RW, PC87360_SYSCTL_FAN3,
|
||||
VALUE(1), 0 },
|
||||
{ SENSORS_PC87360_FAN1_DIV, "fan1_div", SENSORS_PC87360_FAN1,
|
||||
NOMAP, RW, PC87360_SYSCTL_FAN_DIV, VALUE(1), 0 },
|
||||
NOMAP, R, PC87360_SYSCTL_FAN_DIV, VALUE(1), 0 },
|
||||
{ SENSORS_PC87360_FAN2_DIV, "fan2_div", SENSORS_PC87360_FAN2,
|
||||
NOMAP, RW, PC87360_SYSCTL_FAN_DIV, VALUE(2), 0 },
|
||||
NOMAP, R, PC87360_SYSCTL_FAN_DIV, VALUE(2), 0 },
|
||||
{ SENSORS_PC87360_FAN3_DIV, "fan3_div", SENSORS_PC87360_FAN3,
|
||||
NOMAP, RW, PC87360_SYSCTL_FAN_DIV, VALUE(3), 0 },
|
||||
NOMAP, R, PC87360_SYSCTL_FAN_DIV, VALUE(3), 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,
|
||||
@@ -4305,11 +4305,11 @@ static sensors_chip_feature pc87365_features[] =
|
||||
SENSORS_PC87360_FAN3, RW, PC87360_SYSCTL_FAN3,
|
||||
VALUE(1), 0 },
|
||||
{ SENSORS_PC87360_FAN1_DIV, "fan1_div", SENSORS_PC87360_FAN1,
|
||||
NOMAP, RW, PC87360_SYSCTL_FAN_DIV, VALUE(1), 0 },
|
||||
NOMAP, R, PC87360_SYSCTL_FAN_DIV, VALUE(1), 0 },
|
||||
{ SENSORS_PC87360_FAN2_DIV, "fan2_div", SENSORS_PC87360_FAN2,
|
||||
NOMAP, RW, PC87360_SYSCTL_FAN_DIV, VALUE(2), 0 },
|
||||
NOMAP, R, PC87360_SYSCTL_FAN_DIV, VALUE(2), 0 },
|
||||
{ SENSORS_PC87360_FAN3_DIV, "fan3_div", SENSORS_PC87360_FAN3,
|
||||
NOMAP, RW, PC87360_SYSCTL_FAN_DIV, VALUE(3), 0 },
|
||||
NOMAP, R, PC87360_SYSCTL_FAN_DIV, VALUE(3), 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,
|
||||
|
||||
+3
-3
@@ -1634,9 +1634,9 @@
|
||||
#define SENSORS_PC87360_FAN1_MIN 41 /* RW */
|
||||
#define SENSORS_PC87360_FAN2_MIN 42 /* RW */
|
||||
#define SENSORS_PC87360_FAN3_MIN 43 /* RW */
|
||||
#define SENSORS_PC87360_FAN1_DIV 71 /* RW */
|
||||
#define SENSORS_PC87360_FAN2_DIV 72 /* RW */
|
||||
#define SENSORS_PC87360_FAN3_DIV 73 /* RW */
|
||||
#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 */
|
||||
|
||||
Reference in new issue
Block a user