From 5cd3222a9f3742e3da6becbd1a939e1221e030c4 Mon Sep 17 00:00:00 2001 From: Guenter Roeck Date: Thu, 8 Dec 2011 10:55:16 -0800 Subject: [PATCH] hwmon: (f75375s) Disable setting DC fan control mode for F75373 F75373 does not support DC (linear voltage) fan control mode, so don't let the user set it. Cc: Riku Voipio Reviewed-by: Bjoern Gerhart Signed-off-by: Guenter Roeck --- drivers/hwmon/f75375s.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/hwmon/f75375s.c b/drivers/hwmon/f75375s.c index 9c3f078e263..35b570e56ff 100644 --- a/drivers/hwmon/f75375s.c +++ b/drivers/hwmon/f75375s.c @@ -372,6 +372,10 @@ static ssize_t set_pwm_mode(struct device *dev, struct device_attribute *attr, if (!(val == 0 || val == 1)) return -EINVAL; + /* F75373 does not support DC (linear voltage) fan control mode */ + if (data->kind == f75373 && val == 0) + return -EINVAL; + mutex_lock(&data->update_lock); conf = f75375_read8(client, F75375_REG_CONFIG1); conf &= ~(1 << FAN_CTRL_LINEAR(nr)); -- 2.20.1