diff options
author | Clark Williams <williams@redhat.com> | 2012-02-03 15:10:42 -0600 |
---|---|---|
committer | Clark Williams <williams@redhat.com> | 2012-02-03 15:10:42 -0600 |
commit | 77f57fb93d132875acead3581bcdc5d2fefbe7a0 (patch) | |
tree | 5db5ccf5e1754248edc790e2f37f3a2b863f0ddb /drivers/hwmon/w83627ehf.c | |
parent | d28048db190097536aef2be5ee9a736bd7bb92eb (diff) | |
parent | 69bade053d0f2ef0c8ee98af9f6699a55a8d8bb9 (diff) |
Merge commit 'v3.2.3' into rt-3.2.3-rt10
Diffstat (limited to 'drivers/hwmon/w83627ehf.c')
-rw-r--r-- | drivers/hwmon/w83627ehf.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/hwmon/w83627ehf.c b/drivers/hwmon/w83627ehf.c index 93f5fc7d6059..4b57ab67f9b6 100644 --- a/drivers/hwmon/w83627ehf.c +++ b/drivers/hwmon/w83627ehf.c @@ -1319,6 +1319,7 @@ store_pwm_mode(struct device *dev, struct device_attribute *attr, { struct w83627ehf_data *data = dev_get_drvdata(dev); struct sensor_device_attribute *sensor_attr = to_sensor_dev_attr(attr); + struct w83627ehf_sio_data *sio_data = dev->platform_data; int nr = sensor_attr->index; unsigned long val; int err; @@ -1330,6 +1331,11 @@ store_pwm_mode(struct device *dev, struct device_attribute *attr, if (val > 1) return -EINVAL; + + /* On NCT67766F, DC mode is only supported for pwm1 */ + if (sio_data->kind == nct6776 && nr && val != 1) + return -EINVAL; + mutex_lock(&data->update_lock); reg = w83627ehf_read_value(data, W83627EHF_REG_PWM_ENABLE[nr]); data->pwm_mode[nr] = val; |