Skip to content

Commit

Permalink
hwmon: (lineage-pem): Fix in1 voltage alarm sysfs attributes
Browse files Browse the repository at this point in the history
The alarm bit assumed to be a low voltage alarm bit is not set for low voltage
alarms, and the alarm bit assumed to be a high voltage alarm turns out to be a
general alarm bit which is set for both low and high voltage alarms.

Remove the in1_min_alarm sysfs attribute and rename in1_max_alarm to in1_alarm
to reflect the situation.

Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
Acked-by: Jean Delvare <khali@linux-fr.org>
  • Loading branch information
Guenter Roeck committed Mar 16, 2011
1 parent e5e713c commit d668a8b
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions drivers/hwmon/lineage-pem.c
Original file line number Diff line number Diff line change
Expand Up @@ -345,9 +345,7 @@ static ssize_t pem_show_fan(struct device *dev, struct device_attribute *da,
/* Voltages */
static SENSOR_DEVICE_ATTR(in1_input, S_IRUGO, pem_show_data, NULL,
PEM_DATA_VOUT_LSB);
static SENSOR_DEVICE_ATTR_2(in1_min_alarm, S_IRUGO, pem_show_bool, NULL,
PEM_DATA_ALARM_2, ALRM2_OV_LOW);
static SENSOR_DEVICE_ATTR_2(in1_max_alarm, S_IRUGO, pem_show_bool, NULL,
static SENSOR_DEVICE_ATTR_2(in1_alarm, S_IRUGO, pem_show_bool, NULL,
PEM_DATA_ALARM_1, ALRM1_VOUT_OUT_LIMIT);
static SENSOR_DEVICE_ATTR_2(in1_crit_alarm, S_IRUGO, pem_show_bool, NULL,
PEM_DATA_ALARM_1, ALRM1_OV_VOLT_SHUTDOWN);
Expand Down Expand Up @@ -395,8 +393,7 @@ static SENSOR_DEVICE_ATTR_2(temp1_fault, S_IRUGO, pem_show_bool, NULL,

static struct attribute *pem_attributes[] = {
&sensor_dev_attr_in1_input.dev_attr.attr,
&sensor_dev_attr_in1_min_alarm.dev_attr.attr,
&sensor_dev_attr_in1_max_alarm.dev_attr.attr,
&sensor_dev_attr_in1_alarm.dev_attr.attr,
&sensor_dev_attr_in1_crit_alarm.dev_attr.attr,
&sensor_dev_attr_in2_alarm.dev_attr.attr,

Expand Down

0 comments on commit d668a8b

Please sign in to comment.