* [lm-sensors] [PATCH] hwmon: (ltc4215) make sysfs file match the
@ 2010-12-13 16:42 Ira W. Snyder
2010-12-13 17:09 ` Guenter Roeck
0 siblings, 1 reply; 2+ messages in thread
From: Ira W. Snyder @ 2010-12-13 16:42 UTC (permalink / raw)
To: lm-sensors
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>
---
drivers/hwmon/ltc4215.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/hwmon/ltc4215.c b/drivers/hwmon/ltc4215.c
index 00d975e..c7e6d8e 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,
};
--
1.7.2.2
_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [lm-sensors] [PATCH] hwmon: (ltc4215) make sysfs file match the
2010-12-13 16:42 [lm-sensors] [PATCH] hwmon: (ltc4215) make sysfs file match the Ira W. Snyder
@ 2010-12-13 17:09 ` Guenter Roeck
0 siblings, 0 replies; 2+ messages in thread
From: Guenter Roeck @ 2010-12-13 17:09 UTC (permalink / raw)
To: lm-sensors
On Mon, Dec 13, 2010 at 11:42:30AM -0500, Ira W. Snyder wrote:
> 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>
Applied.
Thanks,
Guenter
_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-12-13 17:09 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-12-13 16:42 [lm-sensors] [PATCH] hwmon: (ltc4215) make sysfs file match the Ira W. Snyder
2010-12-13 17:09 ` Guenter Roeck
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.