]> git.baikalelectronics.ru Git - kernel.git/commit
mmc: core SDIO suspend/resume support
authorNicolas Pitre <nico@fluxnic.net>
Tue, 22 Sep 2009 23:45:28 +0000 (16:45 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 23 Sep 2009 14:39:38 +0000 (07:39 -0700)
commit8c4891e7f15bcb7d2fa162f77ea3347ac3d28fa2
treefc5c75b7886cf6ac0af054fd68bb837c88e09dc5
parentca96d40632ac1a5035bdeae5885326777d22bdce
mmc: core SDIO suspend/resume support

Currently, all SDIO cards are virtually removed upon a suspend, and
completely reprobed upon a resume.  This adds the suspend and resume
methods to the SDIO bus driver so to be able to dispatch those events to
the actual SDIO function drivers for real suspend/resume instead.

All active functions on a card must have a driver with both a suspend and
a resume method though.  Failing that, we fall back to the current
behavior of simply "removing" the card when suspending.

When resuming, we make sure the same card is still inserted by comparing
the vendor and product IDs.  If there is a mismatch, or if there is simply
no card anymore in the slot, then the previous card is "removed" and the
new card is detected.  This is further enhanced with the next patch.

[akpm@linux-foundation.org: fix warnings]
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/sdio.c