mirror of
https://github.com/lm-sensors/lm-sensors.git
synced 2026-10-25 12:14:33 +00:00
Drop the W83697HF support from the w83781d driver. It is better
supported by the super-I/O w83627hf driver. Patch from Grant Coady. git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@3071 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
1 parent
70eca45135
commit
222cfb6918
3 files changed
+16
-91
No files matched your search
@@ -228,7 +228,6 @@ w83781d
|
||||
w83783s 1-2 5-6 3 2 pwm yes no
|
||||
w83791d 3 10 5 5 pwm yes no
|
||||
w83627hf 3 9 3 2 pwm yes yes (LPC)
|
||||
w83697hf 2 6 2 2 pwm no yes
|
||||
|
||||
w83l785ts
|
||||
w83l785ts 1 - - - yes no
|
||||
|
||||
@@ -6,7 +6,6 @@ Status: W83781D support is complete and well-tested.
|
||||
W83783S support is complete but has not been well-tested.
|
||||
W83791D support is BETA.
|
||||
W83627HF support is complete but has not been well-tested.
|
||||
W83697HF support is complete but has not been well-tested.
|
||||
AS99127F support is BETA and has known problems due to lack of a
|
||||
chip datasheet. SEE BELOW.
|
||||
|
||||
@@ -31,10 +30,6 @@ Supported chips:
|
||||
Prefix: 'w83627hf'
|
||||
Addresses scanned: I2C 0x20 - 0x2f, ISA 0x290 (8 I/O ports)
|
||||
Datasheet: http://www.winbond.com/PDF/sheet/w83627hf.pdf
|
||||
* Winbond W83697HF
|
||||
Prefix: 'w83697hf'
|
||||
Addresses scanned: ISA 0x290 (8 I/O ports)
|
||||
Datasheet: http://www.winbond.com/PDF/sheet/w83697hf.pdf
|
||||
* Asus AS99127F
|
||||
Prefix: 'as99127f'
|
||||
Addresses scanned: I2C 0x28 - 0x2f
|
||||
@@ -62,8 +57,6 @@ Module Parameters
|
||||
Ditto
|
||||
* force_w83627hf:
|
||||
Ditto
|
||||
* force_w83697hf:
|
||||
Ditto
|
||||
* force_as99127f:
|
||||
Ditto
|
||||
* force_subclients=bus,caddr,saddr,saddr
|
||||
|
||||
+16
-83
@@ -27,7 +27,6 @@
|
||||
as99127f 7 3 0 3 0x31 0x12c3 yes no
|
||||
as99127f rev.2 (type name = as99127f) 0x31 0x5ca3 yes no
|
||||
w83627hf 9 3 2 3 0x21 0x5ca3 yes yes(LPC)
|
||||
w83697hf 8 2 2 2 0x60 0x5ca3 no yes(LPC)
|
||||
w83781d 7 3 0 3 0x10-1 0x5ca3 yes yes
|
||||
w83782d 9 3 2-4 3 0x30 0x5ca3 yes yes
|
||||
w83783s 5-6 3 2 1-2 0x40 0x5ca3 yes no
|
||||
@@ -56,7 +55,7 @@ static unsigned int normal_isa[] = { 0x0290, SENSORS_ISA_END };
|
||||
static unsigned int normal_isa_range[] = { SENSORS_ISA_END };
|
||||
|
||||
/* Insmod parameters */
|
||||
SENSORS_INSMOD_7(w83781d, w83782d, w83783s, w83627hf, as99127f, w83697hf, w83791d);
|
||||
SENSORS_INSMOD_6(w83781d, w83782d, w83783s, w83627hf, as99127f, w83791d);
|
||||
SENSORS_MODULE_PARM(force_subclients, "List of subclient addresses: " \
|
||||
"{bus, clientaddr, subclientaddr1, subclientaddr2}");
|
||||
|
||||
@@ -158,8 +157,6 @@ static const u8 regpwm_w83791d[] = { W83791D_REG_PWM1, W83791D_REG_PWM2,
|
||||
|
||||
#define W83781D_REG_PWM(type, nr) (((type) == w83791d) ? \
|
||||
regpwm_w83791d[(nr) - 1] : \
|
||||
((type) == w83697hf) ? \
|
||||
(((nr) * 2) - 1) : \
|
||||
regpwm[(nr) - 1])
|
||||
|
||||
#define W83781D_REG_I2C_ADDR 0x48
|
||||
@@ -705,50 +702,6 @@ static ctl_table w83783s_dir_table_template[] = {
|
||||
{0}
|
||||
};
|
||||
|
||||
/* similar to w83782d but no fan3, no vid */
|
||||
static ctl_table w83697hf_dir_table_template[] = {
|
||||
{W83781D_SYSCTL_IN0, "in0", NULL, 0, 0644, NULL, &i2c_proc_real,
|
||||
&i2c_sysctl_real, NULL, &w83781d_in},
|
||||
/* no in1 to maintain compatibility with 781d and 782d. */
|
||||
{W83781D_SYSCTL_IN2, "in2", NULL, 0, 0644, NULL, &i2c_proc_real,
|
||||
&i2c_sysctl_real, NULL, &w83781d_in},
|
||||
{W83781D_SYSCTL_IN3, "in3", NULL, 0, 0644, NULL, &i2c_proc_real,
|
||||
&i2c_sysctl_real, NULL, &w83781d_in},
|
||||
{W83781D_SYSCTL_IN4, "in4", NULL, 0, 0644, NULL, &i2c_proc_real,
|
||||
&i2c_sysctl_real, NULL, &w83781d_in},
|
||||
{W83781D_SYSCTL_IN5, "in5", NULL, 0, 0644, NULL, &i2c_proc_real,
|
||||
&i2c_sysctl_real, NULL, &w83781d_in},
|
||||
{W83781D_SYSCTL_IN6, "in6", NULL, 0, 0644, NULL, &i2c_proc_real,
|
||||
&i2c_sysctl_real, NULL, &w83781d_in},
|
||||
{W83781D_SYSCTL_IN7, "in7", NULL, 0, 0644, NULL, &i2c_proc_real,
|
||||
&i2c_sysctl_real, NULL, &w83781d_in},
|
||||
{W83781D_SYSCTL_IN8, "in8", NULL, 0, 0644, NULL, &i2c_proc_real,
|
||||
&i2c_sysctl_real, NULL, &w83781d_in},
|
||||
{W83781D_SYSCTL_FAN1, "fan1", NULL, 0, 0644, NULL, &i2c_proc_real,
|
||||
&i2c_sysctl_real, NULL, &w83781d_fan},
|
||||
{W83781D_SYSCTL_FAN2, "fan2", NULL, 0, 0644, NULL, &i2c_proc_real,
|
||||
&i2c_sysctl_real, NULL, &w83781d_fan},
|
||||
{W83781D_SYSCTL_TEMP1, "temp1", NULL, 0, 0644, NULL, &i2c_proc_real,
|
||||
&i2c_sysctl_real, NULL, &w83781d_temp},
|
||||
{W83781D_SYSCTL_TEMP2, "temp2", NULL, 0, 0644, NULL, &i2c_proc_real,
|
||||
&i2c_sysctl_real, NULL, &w83781d_temp_add},
|
||||
{W83781D_SYSCTL_FAN_DIV, "fan_div", NULL, 0, 0644, NULL, &i2c_proc_real,
|
||||
&i2c_sysctl_real, NULL, &w83781d_fan_div},
|
||||
{W83781D_SYSCTL_ALARMS, "alarms", NULL, 0, 0444, NULL, &i2c_proc_real,
|
||||
&i2c_sysctl_real, NULL, &w83781d_alarms},
|
||||
{W83781D_SYSCTL_BEEP, "beep", NULL, 0, 0644, NULL, &i2c_proc_real,
|
||||
&i2c_sysctl_real, NULL, &w83781d_beep},
|
||||
{W83781D_SYSCTL_PWM1, "pwm1", NULL, 0, 0644, NULL, &i2c_proc_real,
|
||||
&i2c_sysctl_real, NULL, &w83781d_pwm},
|
||||
{W83781D_SYSCTL_PWM2, "pwm2", NULL, 0, 0644, NULL, &i2c_proc_real,
|
||||
&i2c_sysctl_real, NULL, &w83781d_pwm},
|
||||
{W83781D_SYSCTL_SENS1, "sensor1", NULL, 0, 0644, NULL, &i2c_proc_real,
|
||||
&i2c_sysctl_real, NULL, &w83781d_sens},
|
||||
{W83781D_SYSCTL_SENS2, "sensor2", NULL, 0, 0644, NULL, &i2c_proc_real,
|
||||
&i2c_sysctl_real, NULL, &w83781d_sens},
|
||||
{0}
|
||||
};
|
||||
|
||||
|
||||
/* This function is called when:
|
||||
* w83781d_driver is inserted (when this module is loaded), for each
|
||||
@@ -887,8 +840,6 @@ static int w83781d_detect(struct i2c_adapter *adapter, int address,
|
||||
kind = w83791d;
|
||||
else if (val1 == 0x31 && !is_isa && address >= 0x28)
|
||||
kind = as99127f;
|
||||
else if (val1 == 0x60 && vendid == winbond && is_isa)
|
||||
kind = w83697hf;
|
||||
else {
|
||||
if (kind == 0)
|
||||
printk(KERN_WARNING "w83781d.o: Ignoring "
|
||||
@@ -914,9 +865,6 @@ static int w83781d_detect(struct i2c_adapter *adapter, int address,
|
||||
} else if (kind == as99127f) {
|
||||
type_name = "as99127f";
|
||||
client_name = "AS99127F chip";
|
||||
} else if (kind == w83697hf) {
|
||||
type_name = "w83697hf";
|
||||
client_name = "W83697HF chip";
|
||||
} else if (kind == w83791d) {
|
||||
type_name = "w83791d";
|
||||
client_name = "W83791D chip";
|
||||
@@ -1026,8 +974,6 @@ static int w83781d_detect(struct i2c_adapter *adapter, int address,
|
||||
w83781d_dir_table_template :
|
||||
(kind == w83783s) ?
|
||||
w83783s_dir_table_template :
|
||||
(kind == w83697hf) ?
|
||||
w83697hf_dir_table_template :
|
||||
(kind == w83791d ) ?
|
||||
w83791d_dir_table_template :
|
||||
(is_isa || kind == w83627hf) ?
|
||||
@@ -1284,7 +1230,7 @@ static void w83781d_init_client(struct i2c_client *client)
|
||||
else
|
||||
data->sens[i - 1] = 2;
|
||||
}
|
||||
if ((type == w83783s || type == w83697hf) && (i == 2))
|
||||
if (type == w83783s && i == 2)
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -1319,7 +1265,7 @@ static void w83781d_init_client(struct i2c_client *client)
|
||||
|
||||
if (init && type != as99127f) {
|
||||
w83781d_write_value(client, W83781D_REG_TEMP2_CONFIG, 0x00);
|
||||
if (type != w83783s && type != w83697hf) {
|
||||
if (type != w83783s) {
|
||||
w83781d_write_value(client, W83781D_REG_TEMP3_CONFIG,
|
||||
0x00);
|
||||
}
|
||||
@@ -1352,7 +1298,7 @@ static void w83781d_update_client(struct i2c_client *client)
|
||||
pr_debug(KERN_DEBUG "Starting device update\n");
|
||||
|
||||
for (i = 0; i <= 9; i++) {
|
||||
if ((data->type == w83783s || data->type == w83697hf)
|
||||
if ((data->type == w83783s)
|
||||
&& (i == 1))
|
||||
continue; /* 783S has no in1 */
|
||||
if (data->type == w83791d) {
|
||||
@@ -1374,7 +1320,7 @@ static void w83781d_update_client(struct i2c_client *client)
|
||||
w83781d_read_value(client,
|
||||
W83781D_REG_IN_MAX(i));
|
||||
}
|
||||
if ((data->type != w83782d) && (data->type != w83697hf)
|
||||
if ((data->type != w83782d)
|
||||
&& (data->type != w83627hf) && (i == 6)
|
||||
&& (data->type != w83791d))
|
||||
break;
|
||||
@@ -1397,7 +1343,6 @@ static void w83781d_update_client(struct i2c_client *client)
|
||||
W83781D_REG_PWM(data->type, i));
|
||||
if (((data->type == w83783s)
|
||||
|| (data->type == w83627hf)
|
||||
|| (data->type == w83697hf)
|
||||
|| ((data->type == w83782d)
|
||||
&& i2c_is_isa_client(client)))
|
||||
&& i == 2)
|
||||
@@ -1419,7 +1364,7 @@ static void w83781d_update_client(struct i2c_client *client)
|
||||
w83781d_read_value(client, W83781D_REG_TEMP2_OVER);
|
||||
data->temp_add_hyst[0] =
|
||||
w83781d_read_value(client, W83781D_REG_TEMP2_HYST);
|
||||
if (data->type != w83783s && data->type != w83697hf) {
|
||||
if (data->type != w83783s) {
|
||||
data->temp_add[1] =
|
||||
w83781d_read_value(client, W83781D_REG_TEMP3);
|
||||
data->temp_add_over[1] =
|
||||
@@ -1428,31 +1373,24 @@ static void w83781d_update_client(struct i2c_client *client)
|
||||
w83781d_read_value(client, W83781D_REG_TEMP3_HYST);
|
||||
}
|
||||
i = w83781d_read_value(client, W83781D_REG_VID_FANDIV);
|
||||
if (data->type != w83697hf) {
|
||||
data->vid = i & 0x0f;
|
||||
data->vid |=
|
||||
(w83781d_read_value(client, W83781D_REG_CHIPID) & 0x01)
|
||||
<< 4;
|
||||
}
|
||||
data->vid = i & 0x0f;
|
||||
data->vid |= (w83781d_read_value(client,
|
||||
W83781D_REG_CHIPID) & 0x01) << 4;
|
||||
data->fan_div[0] = (i >> 4) & 0x03;
|
||||
data->fan_div[1] = (i >> 6) & 0x03;
|
||||
if (data->type != w83697hf) {
|
||||
data->fan_div[2] = (w83781d_read_value(client,
|
||||
W83781D_REG_PIN) >> 6) & 0x03;
|
||||
}
|
||||
data->fan_div[2] = (w83781d_read_value(client,
|
||||
W83781D_REG_PIN) >> 6) & 0x03;
|
||||
if ((data->type != w83781d) && (data->type != as99127f)) {
|
||||
i = w83781d_read_value(client, W83781D_REG_VBAT);
|
||||
data->fan_div[0] |= (i >> 3) & 0x04;
|
||||
data->fan_div[1] |= (i >> 4) & 0x04;
|
||||
if (data->type != w83697hf)
|
||||
data->fan_div[2] |= (i >> 5) & 0x04;
|
||||
data->fan_div[2] |= (i >> 5) & 0x04;
|
||||
}
|
||||
data->alarms =
|
||||
w83781d_read_value(client,
|
||||
W83781D_REG_ALARM1) +
|
||||
(w83781d_read_value(client, W83781D_REG_ALARM2) << 8);
|
||||
if ((data->type == w83782d) || (data->type == w83627hf) ||
|
||||
(data->type == w83697hf)) {
|
||||
if ((data->type == w83782d) || (data->type == w83627hf)) {
|
||||
data->alarms |=
|
||||
w83781d_read_value(client,
|
||||
W83781D_REG_ALARM3) << 16;
|
||||
@@ -1684,7 +1622,6 @@ void w83781d_beep(struct i2c_client *client, int operation, int ctl_name,
|
||||
}
|
||||
}
|
||||
|
||||
/* w83697hf only has two fans */
|
||||
void w83781d_fan_div(struct i2c_client *client, int operation,
|
||||
int ctl_name, int *nrels_mag, long *results)
|
||||
{
|
||||
@@ -1697,12 +1634,8 @@ void w83781d_fan_div(struct i2c_client *client, int operation,
|
||||
w83781d_update_client(client);
|
||||
results[0] = DIV_FROM_REG(data->fan_div[0]);
|
||||
results[1] = DIV_FROM_REG(data->fan_div[1]);
|
||||
if (data->type == w83697hf) {
|
||||
*nrels_mag = 2;
|
||||
} else {
|
||||
results[2] = DIV_FROM_REG(data->fan_div[2]);
|
||||
*nrels_mag = 3;
|
||||
}
|
||||
results[2] = DIV_FROM_REG(data->fan_div[2]);
|
||||
*nrels_mag = 3;
|
||||
} else if (operation == SENSORS_PROC_REAL_WRITE) {
|
||||
old = w83781d_read_value(client, W83781D_REG_VID_FANDIV);
|
||||
/* w83781d and as99127f don't have extended divisor bits */
|
||||
@@ -1710,7 +1643,7 @@ void w83781d_fan_div(struct i2c_client *client, int operation,
|
||||
old3 =
|
||||
w83781d_read_value(client, W83781D_REG_VBAT);
|
||||
}
|
||||
if (*nrels_mag >= 3 && data->type != w83697hf) {
|
||||
if (*nrels_mag >= 3) {
|
||||
data->fan_div[2] =
|
||||
DIV_TO_REG(results[2], data->type);
|
||||
old2 = w83781d_read_value(client, W83781D_REG_PIN);
|
||||
|
||||
Reference in new issue
Block a user