Re: [PATCH V1 0/1] Export an API to reinit SDIO card
From: Ulf Hansson
Date: Wed Jul 23 2025 - 06:26:40 EST
On Mon, 21 Jul 2025 at 11:43, Sayali Lokhande <quic_sayalil@xxxxxxxxxxx> wrote:
>
> Some SDIO client drivers, manage external power to the SDIO card.
> In such cases, the card may be power-cycled independently of the
> MMC core's runtime PM state.
> Currently, reinitialization of the SDIO card is tied to the runtime
> PM resume path. However, if the card is powered off and on again before
> the autosuspend delay expires, the runtime suspend/resume callbacks are
> not triggered, leaving the card in an uninitialized state.
>
> To address this, export sdio_reinit_card() so that client drivers can
> explicitly trigger reinitialization after powering the card back on,
> ensuring proper device state regardless of runtime PM behavior.
>
> This change enables more robust handling of power-managed SDIO devices
> in scenarios where runtime PM is disabled or insufficient.
Please use mmc_hw|sw_reset() instead.
Kind regards
Uffe
>
> Sayali Lokhande (1):
> mmc: sdio: Export an API to reinit the SDIO card
>
> drivers/mmc/core/core.h | 1 +
> drivers/mmc/core/sdio.c | 2 +-
> drivers/mmc/core/sdio_io.c | 6 ++++++
> include/linux/mmc/sdio_func.h | 2 ++
> 4 files changed, 10 insertions(+), 1 deletion(-)
>
> --
> The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
> a Linux Foundation Collaborative Project
>