RFC PATCH lm_sensors2: remove w83697hf,
Greetings,
This patch removes non-i2c drivers from lm_sensors and complements removal of same from 2.6 kernel. Compile tested. 'make clean; make'
Needs a tester?
--Grant.
--- CHANGES | 1 kernel/chips/w83781d.c | 110 +++++++------------------------------------------ 2 files changed, 18 insertions(+), 93 deletions(-)
CHANGES +1 -0
@@ -22,6 +22,7 @@ ask CVS about it: Module i2c-ali1563: New (2.6 backport by Winbond) Modules i2c-ipmb, i2c-ipmi: Support ipmi_request() additional argument Module smsc47m1: Fix PWM enable polarity on read + Module w83781d: remove non-i2c drivers w83697hf, w83627hf (Grant Coady) Program fancontrol.pl: Fix compile errors Program mkpatch: Include i2c-ali1563 Include w83792d
kernel/chips/w83781d.c +8 -73
174 lines not on this page · raw message
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,
+ 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->alarms | w83781d_read_value(client,
W83781D_REG_ALARM3) << 16;@@ -1697,12 +1625,8 @@ void w83781d_fan_div(struct i2c_client *
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 +1634,7 @@ void w83781d_fan_div(struct i2c_client *
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);