Skip to content

Commit

Permalink
hwmon: (f75375s) Disable setting DC fan control mode for F75373
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Guenter Roeck committed Jan 5, 2012
1 parent b1b561a commit 5cd3222
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/hwmon/f75375s.c
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down

0 comments on commit 5cd3222

Please sign in to comment.