sdio: introduce API for special power management features
authorNicolas Pitre <nico@fluxnic.net>
Fri, 5 Mar 2010 21:43:31 +0000 (13:43 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sat, 6 Mar 2010 19:26:36 +0000 (11:26 -0800)
commitda68c4eb258cd9f3f0b8aeb7e46b8118bb6358b6
treeb7767ce0b0d05d16dec6eeeadd21bd70cc458ac7
parent9e506f35b1dc327c448d4791bc098f07b9b2efe9
sdio: introduce API for special power management features

This patch series provides the core changes needed to allow SDIO cards to
remain powered and active while the host system is suspended, and let them
wake up the host system when needed.  This is used to implement
wake-on-lan with SDIO wireless cards at the moment.  Patches to add that
support to the libertas driver will be posted separately.

This patch:

Some SDIO cards have the ability to keep on running autonomously when the
host system is suspended, and wake it up when needed.  This however
requires that the host controller preserve power to the card, and
configure itself appropriately for wake-up.

There is however 4 layers of abstractions involved: the host controller
driver, the MMC core code, the SDIO card management code, and the actual
SDIO function driver.  To make things simple and manageable, host drivers
must advertise their PM capabilities with a feature bitmask, then function
drivers can query and set those features from their suspend method.  Then
each layer in the suspend call chain is expected to act upon those bits
accordingly.

[akpm@linux-foundation.org: fix typo in comment]
Signed-off-by: Nicolas Pitre <nico@marvell.com>
Cc: <linux-mmc@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/mmc/core/core.c
drivers/mmc/core/sdio_io.c
include/linux/mmc/host.h
include/linux/mmc/pm.h [new file with mode: 0644]
include/linux/mmc/sdio_func.h