@@ -364,6 +364,9 @@ int mmc_add_card(struct mmc_card *card)
#endif
card->dev.of_node = mmc_of_find_child_device(card->host, 0);
+ if (card->host->ops->card_init_wakeup)
+ card->host->ops->card_init_wakeup(card);
+
device_enable_async_suspend(&card->dev);
ret = device_add(&card->dev);
@@ -193,6 +193,13 @@ struct mmc_host_ops {
/* Initialize an SD express card, mandatory for MMC_CAP2_SD_EXP. */
int (*init_sd_express)(struct mmc_host *host, struct mmc_ios *ios);
+
+ /*
+ * Optional for vendor to initialize card as wakeup source and
+ * enable wakeup capability specially for SDIO cards which supports
+ * waking host from suspend through external dedicated pins.
+ */
+ void (*card_init_wakeup)(struct mmc_card *card);
};
struct mmc_cqe_ops {
Define a new vendor ops to let vendor initialize card as wakeup source and enable wakeup capability specially for SDIO cards which supports waking host from system suspend through external dedicated pins. Signed-off-by: Sarthak Garg <quic_sartgarg@quicinc.com> --- drivers/mmc/core/bus.c | 3 +++ include/linux/mmc/host.h | 7 +++++++ 2 files changed, 10 insertions(+)