Skip to content

RFC PM: Rework suspend and hibernation code for devices

Rafael J. Wysocki linux-acpi linux-pm lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest3 patches 31 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3PM: Introduce new top level suspend and hibernation callbacksarch/x86/kernel/apm_32.c drivers/base/power/main.c include/linux/device.h +3 more+583 -1410 replies
1/3PM: Introduce new top level suspend and hibernation callbacksarch/x86/kernel/apm_32.c drivers/base/power/main.c include/linux/device.h +3 more+583 -14124 replies
2/3PM: New suspend and hibernation callbacks for platform bus typedrivers/base/platform.c include/linux/platform_device.h+425 -212 replies
2/3PM: New suspend and hibernation callbacks for platform bus typedrivers/base/platform.c include/linux/platform_device.h+425 -210 replies
3/3PM: New suspend and hibernation callbacks for PCI bus typedrivers/pci/pci-driver.c include/linux/pci.h+453 -460 replies
3/3PM: New suspend and hibernation callbacks for PCI bus typedrivers/pci/pci-driver.c include/linux/pci.h+453 -465 replies

Reviews trailers per patch

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

Read the v1 thread

Cover letter [RFC][PATCH 0/3] PM: Rework suspend and hibernation code for devices

Hi,

The following three patches are intended to start the redesign of the suspend and hibernation framework for devices.

The first patch defines the new framework. Specifically, it introduces the structure 'struct pm_ops' containing a set of hibernation and suspend callbacks to be defined by bus types, device types, device classes and, finally, by device drivers (the role of each callback is described in the comment in pm.h; the documentation will be updated later). It also modifies the code in drivers/base/power/main.c to use the new framework, if available, and fall back to the old one otherwise (no visible functional changes should be added).

The other two patches implement the new suspend and hibernation callbacks for the platform and PCI bus types.

Please review and tell me what you think.

Thanks,
Rafael

Signature · 1 line
"Premature optimization is the root of all evil." - Donald Knuth