diff options
author | Guenter Roeck <guenter.roeck@ericsson.com> | 2011-12-08 12:59:25 -0500 |
---|---|---|
committer | Guenter Roeck <guenter.roeck@ericsson.com> | 2012-01-05 11:19:29 -0500 |
commit | 740f6be3ccc885ca103c90c48d3b3066239c585c (patch) | |
tree | ba7ca66132195e76ddcd3b7f3e666141c1baa6b4 /drivers/hwmon | |
parent | 4fd826ef97867a6e2ea53b089b3890d8914e9606 (diff) |
hwmon: (f75375s) Use standard sysfs attribute names
The driver uses non-standard sysfs attribute names for maximum and target fan
speeds, even though standard attibute names for the same values do exist.
Replace non-standard attribute names with standard attribute names.
Cc: Riku Voipio <riku.voipio@iki.fi>
Reviewed-by: Bjoern Gerhart <oss@extracloud.de>
Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
Diffstat (limited to 'drivers/hwmon')
-rw-r--r-- | drivers/hwmon/f75375s.c | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/drivers/hwmon/f75375s.c b/drivers/hwmon/f75375s.c index 92b939b274b7..316c29a0b318 100644 --- a/drivers/hwmon/f75375s.c +++ b/drivers/hwmon/f75375s.c | |||
@@ -102,8 +102,8 @@ struct f75375_data { | |||
102 | u8 in_min[4]; | 102 | u8 in_min[4]; |
103 | u16 fan[2]; | 103 | u16 fan[2]; |
104 | u16 fan_min[2]; | 104 | u16 fan_min[2]; |
105 | u16 fan_full[2]; | 105 | u16 fan_max[2]; |
106 | u16 fan_exp[2]; | 106 | u16 fan_target[2]; |
107 | u8 fan_timer; | 107 | u8 fan_timer; |
108 | u8 pwm[2]; | 108 | u8 pwm[2]; |
109 | u8 pwm_mode[2]; | 109 | u8 pwm_mode[2]; |
@@ -181,11 +181,11 @@ static struct f75375_data *f75375_update_device(struct device *dev) | |||
181 | f75375_read8(client, F75375_REG_TEMP_HIGH(nr)); | 181 | f75375_read8(client, F75375_REG_TEMP_HIGH(nr)); |
182 | data->temp_max_hyst[nr] = | 182 | data->temp_max_hyst[nr] = |
183 | f75375_read8(client, F75375_REG_TEMP_HYST(nr)); | 183 | f75375_read8(client, F75375_REG_TEMP_HYST(nr)); |
184 | data->fan_full[nr] = | 184 | data->fan_max[nr] = |
185 | f75375_read16(client, F75375_REG_FAN_FULL(nr)); | 185 | f75375_read16(client, F75375_REG_FAN_FULL(nr)); |
186 | data->fan_min[nr] = | 186 | data->fan_min[nr] = |
187 | f75375_read16(client, F75375_REG_FAN_MIN(nr)); | 187 | f75375_read16(client, F75375_REG_FAN_MIN(nr)); |
188 | data->fan_exp[nr] = | 188 | data->fan_target[nr] = |
189 | f75375_read16(client, F75375_REG_FAN_EXP(nr)); | 189 | f75375_read16(client, F75375_REG_FAN_EXP(nr)); |
190 | data->pwm[nr] = f75375_read8(client, | 190 | data->pwm[nr] = f75375_read8(client, |
191 | F75375_REG_FAN_PWM_DUTY(nr)); | 191 | F75375_REG_FAN_PWM_DUTY(nr)); |
@@ -256,7 +256,7 @@ static ssize_t set_fan_min(struct device *dev, struct device_attribute *attr, | |||
256 | return count; | 256 | return count; |
257 | } | 257 | } |
258 | 258 | ||
259 | static ssize_t set_fan_exp(struct device *dev, struct device_attribute *attr, | 259 | static ssize_t set_fan_target(struct device *dev, struct device_attribute *attr, |
260 | const char *buf, size_t count) | 260 | const char *buf, size_t count) |
261 | { | 261 | { |
262 | int nr = to_sensor_dev_attr(attr)->index; | 262 | int nr = to_sensor_dev_attr(attr)->index; |
@@ -270,8 +270,8 @@ static ssize_t set_fan_exp(struct device *dev, struct device_attribute *attr, | |||
270 | return err; | 270 | return err; |
271 | 271 | ||
272 | mutex_lock(&data->update_lock); | 272 | mutex_lock(&data->update_lock); |
273 | data->fan_exp[nr] = rpm_to_reg(val); | 273 | data->fan_target[nr] = rpm_to_reg(val); |
274 | f75375_write16(client, F75375_REG_FAN_EXP(nr), data->fan_exp[nr]); | 274 | f75375_write16(client, F75375_REG_FAN_EXP(nr), data->fan_target[nr]); |
275 | mutex_unlock(&data->update_lock); | 275 | mutex_unlock(&data->update_lock); |
276 | return count; | 276 | return count; |
277 | } | 277 | } |
@@ -550,8 +550,8 @@ static ssize_t show_##thing(struct device *dev, struct device_attribute *attr, \ | |||
550 | 550 | ||
551 | show_fan(fan); | 551 | show_fan(fan); |
552 | show_fan(fan_min); | 552 | show_fan(fan_min); |
553 | show_fan(fan_full); | 553 | show_fan(fan_max); |
554 | show_fan(fan_exp); | 554 | show_fan(fan_target); |
555 | 555 | ||
556 | static SENSOR_DEVICE_ATTR(in0_input, S_IRUGO, show_in, NULL, 0); | 556 | static SENSOR_DEVICE_ATTR(in0_input, S_IRUGO, show_in, NULL, 0); |
557 | static SENSOR_DEVICE_ATTR(in0_max, S_IRUGO|S_IWUSR, | 557 | static SENSOR_DEVICE_ATTR(in0_max, S_IRUGO|S_IWUSR, |
@@ -584,17 +584,17 @@ static SENSOR_DEVICE_ATTR(temp2_max_hyst, S_IRUGO|S_IWUSR, | |||
584 | static SENSOR_DEVICE_ATTR(temp2_max, S_IRUGO|S_IWUSR, | 584 | static SENSOR_DEVICE_ATTR(temp2_max, S_IRUGO|S_IWUSR, |
585 | show_temp_max, set_temp_max, 1); | 585 | show_temp_max, set_temp_max, 1); |
586 | static SENSOR_DEVICE_ATTR(fan1_input, S_IRUGO, show_fan, NULL, 0); | 586 | static SENSOR_DEVICE_ATTR(fan1_input, S_IRUGO, show_fan, NULL, 0); |
587 | static SENSOR_DEVICE_ATTR(fan1_full, S_IRUGO, show_fan_full, NULL, 0); | 587 | static SENSOR_DEVICE_ATTR(fan1_max, S_IRUGO, show_fan_max, NULL, 0); |
588 | static SENSOR_DEVICE_ATTR(fan1_min, S_IRUGO|S_IWUSR, | 588 | static SENSOR_DEVICE_ATTR(fan1_min, S_IRUGO|S_IWUSR, |
589 | show_fan_min, set_fan_min, 0); | 589 | show_fan_min, set_fan_min, 0); |
590 | static SENSOR_DEVICE_ATTR(fan1_exp, S_IRUGO|S_IWUSR, | 590 | static SENSOR_DEVICE_ATTR(fan1_target, S_IRUGO|S_IWUSR, |
591 | show_fan_exp, set_fan_exp, 0); | 591 | show_fan_target, set_fan_target, 0); |
592 | static SENSOR_DEVICE_ATTR(fan2_input, S_IRUGO, show_fan, NULL, 1); | 592 | static SENSOR_DEVICE_ATTR(fan2_input, S_IRUGO, show_fan, NULL, 1); |
593 | static SENSOR_DEVICE_ATTR(fan2_full, S_IRUGO, show_fan_full, NULL, 1); | 593 | static SENSOR_DEVICE_ATTR(fan2_max, S_IRUGO, show_fan_max, NULL, 1); |
594 | static SENSOR_DEVICE_ATTR(fan2_min, S_IRUGO|S_IWUSR, | 594 | static SENSOR_DEVICE_ATTR(fan2_min, S_IRUGO|S_IWUSR, |
595 | show_fan_min, set_fan_min, 1); | 595 | show_fan_min, set_fan_min, 1); |
596 | static SENSOR_DEVICE_ATTR(fan2_exp, S_IRUGO|S_IWUSR, | 596 | static SENSOR_DEVICE_ATTR(fan2_target, S_IRUGO|S_IWUSR, |
597 | show_fan_exp, set_fan_exp, 1); | 597 | show_fan_target, set_fan_target, 1); |
598 | static SENSOR_DEVICE_ATTR(pwm1, S_IRUGO|S_IWUSR, | 598 | static SENSOR_DEVICE_ATTR(pwm1, S_IRUGO|S_IWUSR, |
599 | show_pwm, set_pwm, 0); | 599 | show_pwm, set_pwm, 0); |
600 | static SENSOR_DEVICE_ATTR(pwm1_enable, S_IRUGO|S_IWUSR, | 600 | static SENSOR_DEVICE_ATTR(pwm1_enable, S_IRUGO|S_IWUSR, |
@@ -616,13 +616,13 @@ static struct attribute *f75375_attributes[] = { | |||
616 | &sensor_dev_attr_temp2_max.dev_attr.attr, | 616 | &sensor_dev_attr_temp2_max.dev_attr.attr, |
617 | &sensor_dev_attr_temp2_max_hyst.dev_attr.attr, | 617 | &sensor_dev_attr_temp2_max_hyst.dev_attr.attr, |
618 | &sensor_dev_attr_fan1_input.dev_attr.attr, | 618 | &sensor_dev_attr_fan1_input.dev_attr.attr, |
619 | &sensor_dev_attr_fan1_full.dev_attr.attr, | 619 | &sensor_dev_attr_fan1_max.dev_attr.attr, |
620 | &sensor_dev_attr_fan1_min.dev_attr.attr, | 620 | &sensor_dev_attr_fan1_min.dev_attr.attr, |
621 | &sensor_dev_attr_fan1_exp.dev_attr.attr, | 621 | &sensor_dev_attr_fan1_target.dev_attr.attr, |
622 | &sensor_dev_attr_fan2_input.dev_attr.attr, | 622 | &sensor_dev_attr_fan2_input.dev_attr.attr, |
623 | &sensor_dev_attr_fan2_full.dev_attr.attr, | 623 | &sensor_dev_attr_fan2_max.dev_attr.attr, |
624 | &sensor_dev_attr_fan2_min.dev_attr.attr, | 624 | &sensor_dev_attr_fan2_min.dev_attr.attr, |
625 | &sensor_dev_attr_fan2_exp.dev_attr.attr, | 625 | &sensor_dev_attr_fan2_target.dev_attr.attr, |
626 | &sensor_dev_attr_pwm1.dev_attr.attr, | 626 | &sensor_dev_attr_pwm1.dev_attr.attr, |
627 | &sensor_dev_attr_pwm1_enable.dev_attr.attr, | 627 | &sensor_dev_attr_pwm1_enable.dev_attr.attr, |
628 | &sensor_dev_attr_pwm1_mode.dev_attr.attr, | 628 | &sensor_dev_attr_pwm1_mode.dev_attr.attr, |