aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hwmon/f75375s.c
diff options
context:
space:
mode:
authorGuenter Roeck <guenter.roeck@ericsson.com>2011-12-08 13:55:16 -0500
committerGuenter Roeck <guenter.roeck@ericsson.com>2012-01-05 11:19:31 -0500
commit5cd3222a9f3742e3da6becbd1a939e1221e030c4 (patch)
treefefb7b4539a01b9115ef58e1b45be62c74af1eb7 /drivers/hwmon/f75375s.c
parentb1b561a228de9796eff8c7e03e1e7ee63ab13115 (diff)
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 <riku.voipio@iki.fi> Reviewed-by: Bjoern Gerhart <oss@extracloud.de> Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
Diffstat (limited to 'drivers/hwmon/f75375s.c')
-rw-r--r--drivers/hwmon/f75375s.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/hwmon/f75375s.c b/drivers/hwmon/f75375s.c
index 9c3f078e263b..35b570e56ff0 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,
372 if (!(val == 0 || val == 1)) 372 if (!(val == 0 || val == 1))
373 return -EINVAL; 373 return -EINVAL;
374 374
375 /* F75373 does not support DC (linear voltage) fan control mode */
376 if (data->kind == f75373 && val == 0)
377 return -EINVAL;
378
375 mutex_lock(&data->update_lock); 379 mutex_lock(&data->update_lock);
376 conf = f75375_read8(client, F75375_REG_CONFIG1); 380 conf = f75375_read8(client, F75375_REG_CONFIG1);
377 conf &= ~(1 << FAN_CTRL_LINEAR(nr)); 381 conf &= ~(1 << FAN_CTRL_LINEAR(nr));