From 4c82c38ae29a01338b5104b0111cecefaf3a1025 Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Wed, 7 Jan 2009 16:37:30 +0100 Subject: hwmon: (f71882fg) Remove the fan_mode module option Remove the fan_mode module option it was a monstrosity to begin with, and when adding support for the F8000 it becomes a real pain! Signed-off-by: Hans de Goede Signed-off-by: Jean Delvare diff --git a/drivers/hwmon/f71882fg.c b/drivers/hwmon/f71882fg.c index 95a279f..842592f 100644 --- a/drivers/hwmon/f71882fg.c +++ b/drivers/hwmon/f71882fg.c @@ -90,12 +90,6 @@ static unsigned short force_id; module_param(force_id, ushort, 0); MODULE_PARM_DESC(force_id, "Override the detected device ID"); -static int fan_mode[4] = { 0, 0, 0, 0 }; -module_param_array(fan_mode, int, NULL, 0644); -MODULE_PARM_DESC(fan_mode, "List of fan control modes (f71882fg only) " - "(0=don't change, 1=pwm, 2=rpm)\n" - "Note: this needs a write to pwm#_enable to take effect"); - enum chips { f71862fg, f71882fg }; static const char *f71882fg_names[] = { @@ -846,15 +840,8 @@ static ssize_t store_fan_full_speed(struct device *dev, val = fan_to_reg(val); mutex_lock(&data->update_lock); - data->pwm_enable = f71882fg_read8(data, F71882FG_REG_PWM_ENABLE); - if (data->pwm_enable & (1 << (2 * nr))) - /* PWM mode */ - count = -EINVAL; - else { - /* RPM mode */ - f71882fg_write16(data, F71882FG_REG_FAN_FULL_SPEED(nr), val); - data->fan_full_speed[nr] = val; - } + f71882fg_write16(data, F71882FG_REG_FAN_FULL_SPEED(nr), val); + data->fan_full_speed[nr] = val; mutex_unlock(&data->update_lock); return count; @@ -1252,16 +1239,6 @@ static ssize_t store_pwm_enable(struct device *dev, struct device_attribute data->pwm_enable &= ~(2 << (2 * nr)); break; /* Temperature ctrl */ } - if (data->type == f71882fg) { - switch (fan_mode[nr]) { - case 1: - data->pwm_enable |= 1 << (2 * nr); - break; /* Duty cycle mode */ - case 2: - data->pwm_enable &= ~(1 << (2 * nr)); - break; /* RPM mode */ - } - } f71882fg_write8(data, F71882FG_REG_PWM_ENABLE, data->pwm_enable); mutex_unlock(&data->update_lock); -- cgit v0.10.2