Commit:     8aa55591bfea25c441117e82711cbfd7c274250a
Parent:     cf6c6045a06aed2ccd8ebd0a3128ce0f2f8a11aa
Author:     David Brownell <[EMAIL PROTECTED]>
AuthorDate: Wed Apr 25 15:20:10 2007 -0400
Committer:  Len Brown <[EMAIL PROTECTED]>
CommitDate: Wed Apr 25 15:20:10 2007 -0400

    ACPI: make /proc/acpi/wakeup more useful
    This updates /proc/acpi/wakeup to be more informative, primarily by showing
    the sysfs node associated with each wakeup-enabled device.  Example:
        Device  S-state   Status   Sysfs node
        PCI0      S4     disabled  no-bus:pci0000:00
        PS2M      S4     disabled  pnp:00:05
        PS2K      S4     disabled  pnp:00:06
        UAR1      S4     disabled  pnp:00:08
        USB1      S3     disabled  pci:0000:00:03.0
        USB2      S3     disabled  pci:0000:00:03.1
        USB3      S3     disabled
        USB4      S3     disabled  pci:0000:00:03.3
        S139      S4     disabled
        LAN       S4     disabled  pci:0000:00:04.0
        MDM       S4     disabled
        AUD       S4     disabled  pci:0000:00:02.7
        SLPB      S4    *enabled
    Eventually this file should be removed, but until then it's almost the only
    way we have to tell how the relevant ACPI tables are broken (and cope).  In
    that example, two devices don't actually exist (USB3, S139), one can't issue
    wakeup events (PCI0), and two seem harmlessly (?) confused (MDM and AUD are
    the same PCI device, but it's the _modem_ that does wake-on-ring).
    In particular, we need to be sure driver model nodes are properly hooked
    up before we can get rid of this ACPI-only interface for wakeup events.
    Signed-off-by: David Brownell <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Len Brown <[EMAIL PROTECTED]>
 drivers/acpi/sleep/proc.c |   16 +++++++++++++---
 1 files changed, 13 insertions(+), 3 deletions(-)

diff --git a/drivers/acpi/sleep/proc.c b/drivers/acpi/sleep/proc.c
index ccc11b3..2d912b7 100644
--- a/drivers/acpi/sleep/proc.c
+++ b/drivers/acpi/sleep/proc.c
@@ -350,21 +350,31 @@ acpi_system_wakeup_device_seq_show(struct seq_file *seq, 
void *offset)
        struct list_head *node, *next;
-       seq_printf(seq, "Device Sleep state     Status\n");
+       seq_printf(seq, "Device\tS-state\t  Status   Sysfs node\n");
        list_for_each_safe(node, next, &acpi_wakeup_device_list) {
                struct acpi_device *dev =
                    container_of(node, struct acpi_device, wakeup_list);
+               struct device *ldev;
                if (!dev->wakeup.flags.valid)
-               seq_printf(seq, "%4s    %4d             %s%8s\n",
+               ldev = acpi_get_physical_device(dev->handle);
+               seq_printf(seq, "%s\t  S%d\t%c%-8s  ",
                           (u32) dev->wakeup.sleep_state,
-                          dev->wakeup.flags.run_wake ? "*" : "",
+                          dev->wakeup.flags.run_wake ? '*' : ' ',
                           dev->wakeup.state.enabled ? "enabled" : "disabled");
+               if (ldev)
+                       seq_printf(seq, "%s:%s",
+                               ldev->bus ? ldev->bus->name : "no-bus",
+                               ldev->bus_id);
+               seq_printf(seq, "\n");
+               put_device(ldev);
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at

Reply via email to