* [PATCH] Show devices for active/passive cooling in thermal trip_points file
@ 2006-11-19 22:01 Thomas Renninger
2006-11-20 16:20 ` Thomas Renninger
2007-05-20 22:55 ` Len Brown
0 siblings, 2 replies; 3+ messages in thread
From: Thomas Renninger @ 2006-11-19 22:01 UTC (permalink / raw)
To: linux-acpi; +Cc: len.brown, fseidel, Arjan van de Ven
Len, can you queue this one for after 2.6.19 inclusion, please.
With this and a firmwarekit test it should be possible to identify
not working fans as it happened on some HPs in 2.6.16 and later
automatically.
Thanks,
Thomas
Show devices for active/passive cooling in thermal trip_points file
Currently the internal pointer to a ACPI handle of a device
which is used for active/passive cooling at a certain temperature
is exported to userspace. This pointer isn't of any use for userspace.
Instead, export the device name, so
that automated tests (e.g. linuxfirmwarekit) can check whether the
device (at least fans for active cooling trip points) really get activated
on the right temperature.
Signed-off-by: Thomas Renninger <trenn@suse.de>
drivers/acpi/thermal.c | 13 +++++++------
1 files changed, 7 insertions(+), 6 deletions(-)
Index: linux-2.6.19-rc6/drivers/acpi/thermal.c
===================================================================
--- linux-2.6.19-rc6.orig/drivers/acpi/thermal.c
+++ linux-2.6.19-rc6/drivers/acpi/thermal.c
@@ -838,6 +838,7 @@ static int acpi_thermal_temp_open_fs(str
static int acpi_thermal_trip_seq_show(struct seq_file *seq, void *offset)
{
struct acpi_thermal *tz = (struct acpi_thermal *)seq->private;
+ struct acpi_device *device;
int i = 0;
int j = 0;
@@ -860,9 +861,8 @@ static int acpi_thermal_trip_seq_show(st
tz->trips.passive.tc1, tz->trips.passive.tc2,
tz->trips.passive.tsp);
for (j = 0; j < tz->trips.passive.devices.count; j++) {
-
- seq_printf(seq, "0x%p ",
- tz->trips.passive.devices.handles[j]);
+ acpi_bus_get_device(tz->trips.passive.devices.handles[j], &device);
+ seq_printf(seq, "%4.4s ", acpi_device_bid(device));
}
seq_puts(seq, "\n");
}
@@ -873,9 +873,10 @@ static int acpi_thermal_trip_seq_show(st
seq_printf(seq, "active[%d]: %ld C: devices=",
i,
KELVIN_TO_CELSIUS(tz->trips.active[i].temperature));
- for (j = 0; j < tz->trips.active[i].devices.count; j++)
- seq_printf(seq, "0x%p ",
- tz->trips.active[i].devices.handles[j]);
+ for (j = 0; j < tz->trips.active[i].devices.count; j++){
+ acpi_bus_get_device(tz->trips.active[i].devices.handles[j], &device);
+ seq_printf(seq, "%4.4s ", acpi_device_bid(device));
+ }
seq_puts(seq, "\n");
}
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Show devices for active/passive cooling in thermal trip_points file
2006-11-19 22:01 [PATCH] Show devices for active/passive cooling in thermal trip_points file Thomas Renninger
@ 2006-11-20 16:20 ` Thomas Renninger
2007-05-20 22:55 ` Len Brown
1 sibling, 0 replies; 3+ messages in thread
From: Thomas Renninger @ 2006-11-20 16:20 UTC (permalink / raw)
To: linux-acpi; +Cc: len.brown, fseidel, Arjan van de Ven
On Sun, 2006-11-19 at 23:01 +0100, Thomas Renninger wrote:
> Len, can you queue this one for after 2.6.19 inclusion, please.
> With this and a firmwarekit test it should be possible to identify
> not working fans as it happened on some HPs in 2.6.16 and later
> automatically.
Here is an example of how trip_points file looks like then, got some
time to boot on a machine with active trip points to make the intend of
the patch more obvious:
trip_points file:
-----------------
critical (S5): 105 C
passive: 100 C: tc1=1 tc2=2 tsp=100 devices=C000
active[0]: 80 C: devices=C25C
active[1]: 65 C: devices=C25D
active[2]: 55 C: devices=C25E
active[3]: 35 C: devices=C25F
ls -d /proc/acpi/fan/*:
----------------------
/proc/acpi/fan/C25C
/proc/acpi/fan/C25D
/proc/acpi/fan/C25E
/proc/acpi/fan/C25F
ls -d /proc/acpi/processor/*:
-----------------------------
/proc/acpi/processor/C000
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Show devices for active/passive cooling in thermal trip_points file
2006-11-19 22:01 [PATCH] Show devices for active/passive cooling in thermal trip_points file Thomas Renninger
2006-11-20 16:20 ` Thomas Renninger
@ 2007-05-20 22:55 ` Len Brown
1 sibling, 0 replies; 3+ messages in thread
From: Len Brown @ 2007-05-20 22:55 UTC (permalink / raw)
To: trenn; +Cc: linux-acpi, fseidel, Arjan van de Ven, Zhang, Rui
Applied a refreshed version of this patch.
(thought I had done so a while ago)
thanks,
-Len
On Sunday 19 November 2006 17:01, Thomas Renninger wrote:
> Len, can you queue this one for after 2.6.19 inclusion, please.
> With this and a firmwarekit test it should be possible to identify
> not working fans as it happened on some HPs in 2.6.16 and later
> automatically.
>
> Thanks,
>
> Thomas
>
> Show devices for active/passive cooling in thermal trip_points file
>
> Currently the internal pointer to a ACPI handle of a device
> which is used for active/passive cooling at a certain temperature
> is exported to userspace. This pointer isn't of any use for userspace.
>
> Instead, export the device name, so
> that automated tests (e.g. linuxfirmwarekit) can check whether the
> device (at least fans for active cooling trip points) really get activated
> on the right temperature.
>
> Signed-off-by: Thomas Renninger <trenn@suse.de>
>
> drivers/acpi/thermal.c | 13 +++++++------
> 1 files changed, 7 insertions(+), 6 deletions(-)
>
> Index: linux-2.6.19-rc6/drivers/acpi/thermal.c
> ===================================================================
> --- linux-2.6.19-rc6.orig/drivers/acpi/thermal.c
> +++ linux-2.6.19-rc6/drivers/acpi/thermal.c
> @@ -838,6 +838,7 @@ static int acpi_thermal_temp_open_fs(str
> static int acpi_thermal_trip_seq_show(struct seq_file *seq, void *offset)
> {
> struct acpi_thermal *tz = (struct acpi_thermal *)seq->private;
> + struct acpi_device *device;
> int i = 0;
> int j = 0;
>
> @@ -860,9 +861,8 @@ static int acpi_thermal_trip_seq_show(st
> tz->trips.passive.tc1, tz->trips.passive.tc2,
> tz->trips.passive.tsp);
> for (j = 0; j < tz->trips.passive.devices.count; j++) {
> -
> - seq_printf(seq, "0x%p ",
> - tz->trips.passive.devices.handles[j]);
> + acpi_bus_get_device(tz->trips.passive.devices.handles[j], &device);
> + seq_printf(seq, "%4.4s ", acpi_device_bid(device));
> }
> seq_puts(seq, "\n");
> }
> @@ -873,9 +873,10 @@ static int acpi_thermal_trip_seq_show(st
> seq_printf(seq, "active[%d]: %ld C: devices=",
> i,
> KELVIN_TO_CELSIUS(tz->trips.active[i].temperature));
> - for (j = 0; j < tz->trips.active[i].devices.count; j++)
> - seq_printf(seq, "0x%p ",
> - tz->trips.active[i].devices.handles[j]);
> + for (j = 0; j < tz->trips.active[i].devices.count; j++){
> + acpi_bus_get_device(tz->trips.active[i].devices.handles[j], &device);
> + seq_printf(seq, "%4.4s ", acpi_device_bid(device));
> + }
> seq_puts(seq, "\n");
> }
>
>
>
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2007-05-20 22:57 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-11-19 22:01 [PATCH] Show devices for active/passive cooling in thermal trip_points file Thomas Renninger
2006-11-20 16:20 ` Thomas Renninger
2007-05-20 22:55 ` Len Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox