[RFC PATCH 0/4] Enable setting of sdio device power state with ACPI

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

-- 
1.7.12.21.g871e293

--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux