RFC Enable setting of sdio device power state with ACPI
Get series with b4
b4 am [email protected]Versions newest first
- v1 RFC Latest4 patches 8 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/4 | sdhci: add slot number into sdhci_host structuredrivers/ drivers/ drivers/ +4 more | +10 | 0 replies | |
| 2/4 | mmc: sdio: bind sdio device with acpi devicedrivers/ drivers/ drivers/ +1 more | +50 | 2 replies | |
| 3/4 | sdio: introduce sdio_platform_pm_opsdrivers/ drivers/ drivers/ | +112 | 1 reply | |
| 4/4 | sdio: pm: set device's power state after driver runtime suspended itdrivers/ | +47 | 5 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [RFC PATCH 0/4] Enable setting of sdio device power state with ACPI
This patchset enables setting of acpi power state for sdio device when it is runtime suspended/resumed. SDIO function drivers can use the interfaces too introduced in patch 3 when there is such a need.
Patch 1 adds slot number information to the sdhci_host structure, the slot number will be used to bind the sdio device with acpi node.
Patch 2 does the actual binding.
Patch 3 introduces a platform power management operation structure, in which 4 callbacks are defined. The reason this structure is used is that in addition to ACPI, there may be other platform mechanisms to place a device into a low power state. And a implementation of this structure is done for ACPI in this patch. The idea and the definition of this structure is heavily based on the one used in PCI subsystem.
Patch 4 utilizes the newly added platform pm api to set the device into a low power state after its driver's runtime suspend callback. Its runtime wakeup capability is also enabled, and for this to work, driver must call device_set_run_wake(dev, true) somewhere when wakeup is desired. Please note that this wakeup mentioned here is realized through a sideband signal, it's not done by a SDIO interrupt. So platform support code is needed.
Aaron Lu (4):
sdhci: add slot number into sdhci_host structure
mmc: sdio: bind sdio device with acpi device
sdio: introduce sdio_platform_pm_ops
sdio: pm: set device's power state after driver runtime suspended it
drivers/mmc/core/Makefile | 1 + drivers/mmc/core/sdio.c | 37 +++++++++++++++++++ drivers/mmc/core/sdio.h | 28 +++++++++++++++ drivers/mmc/core/sdio_acpi.c | 81 ++++++++++++++++++++++++++++++++++++++++++ drivers/mmc/core/sdio_bus.c | 63 +++++++++++++++++++++++++++++--- drivers/mmc/core/sdio_bus.h | 2 ++ drivers/mmc/host/sdhci-pci.c | 2 +- drivers/mmc/host/sdhci-pltfm.c | 4 +-- drivers/mmc/host/sdhci-s3c.c | 2 +- drivers/mmc/host/sdhci-spear.c | 4 +-- drivers/mmc/host/sdhci.c | 3 +- drivers/mmc/host/sdhci.h | 2 +- include/linux/mmc/sdhci.h | 1 + 13 files changed, 218 insertions(+), 12 deletions(-) create mode 100644 drivers/mmc/core/sdio.h create mode 100644 drivers/mmc/core/sdio_acpi.c
Signature · 1 line
1.7.12.21.g871e293