Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 84534
b: refs/heads/master
c: 4b4df95
h: refs/heads/master
v: v3
  • Loading branch information
Jean Delvare authored and Mark M. Hoffman committed Feb 8, 2008
1 parent 83cbc99 commit b239b7a
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 050ab8789869eabb6b2e066aca0d13d86013c315
refs/heads/master: 4b4df95dccdd2c6a573c9dedefb747ed663c074d
15 changes: 13 additions & 2 deletions trunk/drivers/hwmon/lm85.c
Original file line number Diff line number Diff line change
Expand Up @@ -519,10 +519,21 @@ static ssize_t show_pwm_enable(struct device *dev, struct device_attribute
{
int nr = to_sensor_dev_attr(attr)->index;
struct lm85_data *data = lm85_update_device(dev);
int pwm_zone;
int pwm_zone, enable;

pwm_zone = ZONE_FROM_REG(data->autofan[nr].config);
return sprintf(buf,"%d\n", (pwm_zone != 0 && pwm_zone != -1) );
switch (pwm_zone) {
case -1: /* PWM is always at 100% */
enable = 0;
break;
case 0: /* PWM is always at 0% */
case -2: /* PWM responds to manual control */
enable = 1;
break;
default: /* PWM in automatic mode */
enable = 2;
}
return sprintf(buf, "%d\n", enable);
}

#define show_pwm_reg(offset) \
Expand Down

0 comments on commit b239b7a

Please sign in to comment.