Skip to content

RFC device wakeup event support

[email protected] linux-acpi linux-pm 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest5 patches 54 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5devcore introduce wakeup_event callbackinclude/linux/pm.h+3 -00 replies
1/5devcore introduce wakeup_event callbackinclude/linux/pm.h+3 -018 replies
2/5devcore adds generic wakeup event handlerdrivers/base/power/main.c include/linux/pm.h+8 -00 replies
2/5devcore adds generic wakeup event handlerdrivers/base/power/main.c include/linux/pm.h+8 -00 replies
3/5pci wakeup handlerdrivers/pci/pci-driver.c+46 -00 replies
3/5pci wakeup handlerdrivers/pci/pci-driver.c+46 -018 replies
4/5PCIe native PME detectiondrivers/pci/pcie/Kconfig drivers/pci/pcie/Makefile drivers/pci/pcie/npme.c +1 more+351 -00 replies
4/5PCIe native PME detectiondrivers/pci/pcie/Kconfig drivers/pci/pcie/Makefile drivers/pci/pcie/npme.c +1 more+351 -04 replies
5/5ACPI GPE based wakeup event detectiondrivers/acpi/Kconfig drivers/acpi/bus.c drivers/acpi/sleep/wakeup.c +1 more+94 -00 replies
5/5ACPI GPE based wakeup event detectiondrivers/acpi/Kconfig drivers/acpi/bus.c drivers/acpi/sleep/wakeup.c +1 more+94 -010 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [RFC 0/5] device wakeup event support

This series add device wakeup event detection support. This is the base to implement runtime device suspend/resume, though we don't support it now. But David said USB is approaching to this. See this bugzilla
http://bugzilla.kernel.org/show_bug.cgi?id=6892 for detail.

The current process to handle wakeup event is:
1. driver enable wakeup event line pme and suspend
2. NPME or ACPI receives wakeup event
3. NPME or ACPI call .wakeup_event() to clear and disable wakeup event. Driver can do extra things in .wakeup_event() too.
4. NPME or ACPI call generic wakeup event handler (device_receive_wakeup_event())
5. device resumes, and goto 1 for next round of suspend

There are somethings we need discuss:
1. is this generic for other platforms?
2. what should the generic wakeup event handler do?

Comments and suggestions are welcome!