summaryrefslogtreecommitdiff
path: root/drivers/hwmon/ltc4215.c
diff options
context:
space:
mode:
authorIra W. Snyder <iws@ovro.caltech.edu>2010-12-13 11:42:30 -0500
committerGuenter Roeck <guenter.roeck@ericsson.com>2010-12-13 09:54:50 -0800
commit0a6bf658c3b9d1d0e520d320b6392c8680c2e381 (patch)
tree90527fd825832c0d46693c3d338b7925e936768a /drivers/hwmon/ltc4215.c
parent6313e3c21743cc88bb5bd8aa72948ee1e83937b6 (diff)
downloadkernel-common-0a6bf658c3b9d1d0e520d320b6392c8680c2e381.tar.gz
kernel-common-0a6bf658c3b9d1d0e520d320b6392c8680c2e381.tar.bz2
kernel-common-0a6bf658c3b9d1d0e520d320b6392c8680c2e381.zip
hwmon: (ltc4215) make sysfs file match the alarm cause
The ltc4215 driver used the chip's "power good" status bit to provide the power1_alarm file. This is wrong: the chip is really reporting the status of one of the monitored voltages. Change the sysfs file from power1_alarm to in2_min_alarm instead. This matches the voltage that the chip is raising an alarm for. Signed-off-by: Ira W. Snyder <iws@ovro.caltech.edu> Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
Diffstat (limited to 'drivers/hwmon/ltc4215.c')
-rw-r--r--drivers/hwmon/ltc4215.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/hwmon/ltc4215.c b/drivers/hwmon/ltc4215.c
index 00d975eb5b83..c7e6d8e81656 100644
--- a/drivers/hwmon/ltc4215.c
+++ b/drivers/hwmon/ltc4215.c
@@ -205,7 +205,6 @@ LTC4215_ALARM(curr1_max_alarm, (1 << 2), LTC4215_STATUS);
/* Power (virtual) */
LTC4215_POWER(power1_input);
-LTC4215_ALARM(power1_alarm, (1 << 3), LTC4215_STATUS);
/* Input Voltage */
LTC4215_VOLTAGE(in1_input, LTC4215_ADIN);
@@ -214,6 +213,7 @@ LTC4215_ALARM(in1_min_alarm, (1 << 1), LTC4215_STATUS);
/* Output Voltage */
LTC4215_VOLTAGE(in2_input, LTC4215_SOURCE);
+LTC4215_ALARM(in2_min_alarm, (1 << 3), LTC4215_STATUS);
/* Finally, construct an array of pointers to members of the above objects,
* as required for sysfs_create_group()
@@ -223,13 +223,13 @@ static struct attribute *ltc4215_attributes[] = {
&sensor_dev_attr_curr1_max_alarm.dev_attr.attr,
&sensor_dev_attr_power1_input.dev_attr.attr,
- &sensor_dev_attr_power1_alarm.dev_attr.attr,
&sensor_dev_attr_in1_input.dev_attr.attr,
&sensor_dev_attr_in1_max_alarm.dev_attr.attr,
&sensor_dev_attr_in1_min_alarm.dev_attr.attr,
&sensor_dev_attr_in2_input.dev_attr.attr,
+ &sensor_dev_attr_in2_min_alarm.dev_attr.attr,
NULL,
};