summaryrefslogtreecommitdiffstats
path: root/drivers/acpi/proc.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-10-07 18:14:06 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2012-10-07 18:14:06 -0400
commitd8dc91b753b881c60c766c06aeec87675a07df4a (patch)
tree9a02f81fc5436b424d88c2340dcd6b0fe6ae6cca /drivers/acpi/proc.c
parent7035cdf36d5c4d913f68ff97e1c2e5603500d946 (diff)
parent3f44ea0d1c3835872033a6633135e16f87161202 (diff)
Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux
Pul ACPI & Power Management updates from Len Brown: - acpidump utility added - intel_idle driver now supports IVB Xeon - turbostat utility can now count SMIs - ACPI can now bind to USB3 hubs - misc fixes * 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux: (49 commits) ACPI: Add new sysfs interface to export device description ACPI: Harden acpi_table_parse_entries() against BIOS bug tools/power/turbostat: add option to count SMIs, re-name some options tools/power turbostat: add [-d MSR#][-D MSR#] options to print counter deltas intel_idle: enable IVB Xeon support tools/power turbostat: add [-m MSR#] option tools/power turbostat: make -M output pretty tools/power turbostat: print more turbo-limit information tools/power turbostat: delete unused line tools/power turbostat: run on IVB Xeon tools/power/acpi/acpidump: create acpidump(8), local make install targets tools/power/acpi/acpidump: version 20101221 - find dynamic tables in sysfs ACPI: run _OSC after ACPI_FULL_INITIALIZATION tools/power/acpi/acpidump: create acpidump(8), local make install targets tools/power/acpi/acpidump: version 20101221 - find dynamic tables in sysfs tools/power/acpi/acpidump: version 20071116 tools/power/acpi/acpidump: version 20070714 tools/power/acpi/acpidump: version 20060606 tools/power/acpi/acpidump: version 20051111 xo15-ebook: convert to module_acpi_driver() ...
Diffstat (limited to 'drivers/acpi/proc.c')
-rw-r--r--drivers/acpi/proc.c57
1 files changed, 37 insertions, 20 deletions
diff --git a/drivers/acpi/proc.c b/drivers/acpi/proc.c
index 251c7b6273a9..27adb090bb30 100644
--- a/drivers/acpi/proc.c
+++ b/drivers/acpi/proc.c
@@ -302,26 +302,41 @@ acpi_system_wakeup_device_seq_show(struct seq_file *seq, void *offset)
302 list_for_each_safe(node, next, &acpi_wakeup_device_list) { 302 list_for_each_safe(node, next, &acpi_wakeup_device_list) {
303 struct acpi_device *dev = 303 struct acpi_device *dev =
304 container_of(node, struct acpi_device, wakeup_list); 304 container_of(node, struct acpi_device, wakeup_list);
305 struct device *ldev; 305 struct acpi_device_physical_node *entry;
306 306
307 if (!dev->wakeup.flags.valid) 307 if (!dev->wakeup.flags.valid)
308 continue; 308 continue;
309 309
310 ldev = acpi_get_physical_device(dev->handle); 310 seq_printf(seq, "%s\t S%d\t",
311 seq_printf(seq, "%s\t S%d\t%c%-8s ",
312 dev->pnp.bus_id, 311 dev->pnp.bus_id,
313 (u32) dev->wakeup.sleep_state, 312 (u32) dev->wakeup.sleep_state);
314 dev->wakeup.flags.run_wake ? '*' : ' ', 313
315 (device_may_wakeup(&dev->dev) 314 if (!dev->physical_node_count)
316 || (ldev && device_may_wakeup(ldev))) ? 315 seq_printf(seq, "%c%-8s\n",
317 "enabled" : "disabled"); 316 dev->wakeup.flags.run_wake ?
318 if (ldev) 317 '*' : ' ', "disabled");
319 seq_printf(seq, "%s:%s", 318 else {
320 ldev->bus ? ldev->bus->name : "no-bus", 319 struct device *ldev;
321 dev_name(ldev)); 320 list_for_each_entry(entry, &dev->physical_node_list,
322 seq_printf(seq, "\n"); 321 node) {
323 put_device(ldev); 322 ldev = get_device(entry->dev);
324 323 if (!ldev)
324 continue;
325
326 if (&entry->node !=
327 dev->physical_node_list.next)
328 seq_printf(seq, "\t\t");
329
330 seq_printf(seq, "%c%-8s %s:%s\n",
331 dev->wakeup.flags.run_wake ? '*' : ' ',
332 (device_may_wakeup(&dev->dev) ||
333 (ldev && device_may_wakeup(ldev))) ?
334 "enabled" : "disabled",
335 ldev->bus ? ldev->bus->name :
336 "no-bus", dev_name(ldev));
337 put_device(ldev);
338 }
339 }
325 } 340 }
326 mutex_unlock(&acpi_device_lock); 341 mutex_unlock(&acpi_device_lock);
327 return 0; 342 return 0;
@@ -329,12 +344,14 @@ acpi_system_wakeup_device_seq_show(struct seq_file *seq, void *offset)
329 344
330static void physical_device_enable_wakeup(struct acpi_device *adev) 345static void physical_device_enable_wakeup(struct acpi_device *adev)
331{ 346{
332 struct device *dev = acpi_get_physical_device(adev->handle); 347 struct acpi_device_physical_node *entry;
333 348
334 if (dev && device_can_wakeup(dev)) { 349 list_for_each_entry(entry,
335 bool enable = !device_may_wakeup(dev); 350 &adev->physical_node_list, node)
336 device_set_wakeup_enable(dev, enable); 351 if (entry->dev && device_can_wakeup(entry->dev)) {
337 } 352 bool enable = !device_may_wakeup(entry->dev);
353 device_set_wakeup_enable(entry->dev, enable);
354 }
338} 355}
339 356
340static ssize_t 357static ssize_t