• Nicolas Pitre's avatar
    mmc: core SDIO suspend/resume support · 17d33e14
    Nicolas Pitre authored
    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: default avatarNicolas Pitre <nico@marvell.com>
    Cc: <linux-mmc@vger.kernel.org>
    Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    17d33e14
sdio.c 10.9 KB