Commit 5cd3222a authored by Guenter Roeck's avatar Guenter Roeck

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: default avatarBjoern Gerhart <oss@extracloud.de>
Signed-off-by: default avatarGuenter Roeck <guenter.roeck@ericsson.com>
parent b1b561a2
......@@ -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));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment