Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 287076
b: refs/heads/master
c: ad77c3e
h: refs/heads/master
v: v3
  • Loading branch information
Guenter Roeck authored and Guenter Roeck committed Jan 29, 2012
1 parent 575134b commit 1648a58
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 6edf3c30af01854c416f8654d3d5d2652470afd4
refs/heads/master: ad77c3e1808f07fa70f707b1c92a683b7c7d3f85
6 changes: 6 additions & 0 deletions trunk/drivers/hwmon/w83627ehf.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand Down

0 comments on commit 1648a58

Please sign in to comment.