• Ulf Hansson's avatar
    mmc: rtsx_usb_sdmmc: Re-work runtime PM support · f275179f
    Ulf Hansson authored
    The current implementation uses the runtime PM autosuspend feature with a
    default timeout set to 50ms. This really doesn't makes sense, as it's a USB
    driven host device, which needs it rtsx USB device (parent device) to be
    runtime resumed to provide power to the card.
    
    In practise, using the autosuspend or any async runtime PM suspend method,
    means unnecessary delaying the host device and thus the parent, to be
    runtime suspended when a card is removed/powered off. For this reasons,
    let's simply drop the support for runtime PM autosuspend and tell the mmc
    core to use synced runtime PM suspend methods, via setting
    MMC_CAP_SYNC_RUNTIME_PM during probe.
    
    Moreover, as the mmc core nowadays deploys runtime PM reference counting of
    the mmc host device, convert ->set_ios() to use the more lightweight
    pm_runtime_get_noresume() and pm_runtime_put_noidle() APIs.
    Signed-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
    Tested-by: default avatarKai-Heng Feng <kai.heng.feng@canonical.com>
    Tested-by: default avatarOleksandr Natalenko <oleksandr@natalenko.name>
    f275179f
rtsx_usb_sdmmc.c 35.9 KB