From: Adrian Hunter <adrian.hunter@intel.com>
To: Sarthak Garg <quic_sartgarg@quicinc.com>, ulf.hansson@linaro.org
Cc: linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-arm-msm@vger.kernel.org, quic_kamasali@quicinc.com,
quic_rampraka@quicinc.com, quic_pragalla@quicinc.com,
quic_sayalil@quicinc.com,
"Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>,
"Thorsten Scherer" <t.scherer@eckelmann.de>,
"Sergey Shtylyov" <s.shtylyov@omp.ru>,
"Dmitry Torokhov" <dmitry.torokhov@gmail.com>,
lizhe <sensor1010@163.com>
Subject: Re: [PATCH V2 1/2] mmc: core: Define a new vendor ops to enable wakeup capability
Date: Fri, 27 May 2022 12:22:15 +0300 [thread overview]
Message-ID: <9baa3f34-8ef7-cee2-f396-163b8206534d@intel.com> (raw)
In-Reply-To: <20220526121215.25947-2-quic_sartgarg@quicinc.com>
On 26/05/22 15:12, Sarthak Garg wrote:
> Define a new vendor ops to let vendor initialize card as wakeup source
Did you consider using the existing ->init_card() op?
> 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(+)
>
> diff --git a/drivers/mmc/core/bus.c b/drivers/mmc/core/bus.c
> index 58a60afa650b..6192a52288fd 100644
> --- a/drivers/mmc/core/bus.c
> +++ b/drivers/mmc/core/bus.c
> @@ -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);
> diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h
> index c193c50ccd78..3bd4374a64b8 100644
> --- a/include/linux/mmc/host.h
> +++ b/include/linux/mmc/host.h
> @@ -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 {
next prev parent reply other threads:[~2022-05-27 9:22 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-26 12:12 [PATCH V2 0/2] mmc: Add wakeup functionality support for sdio cards Sarthak Garg
2022-05-26 12:12 ` [PATCH V2 1/2] mmc: core: Define a new vendor ops to enable wakeup capability Sarthak Garg
2022-05-27 9:22 ` Adrian Hunter [this message]
2022-05-26 12:12 ` [PATCH V2 2/2] mmc: sdhci-msm: Add wakeup functionality to sdio cards Sarthak Garg
2022-06-14 23:12 ` [PATCH V2 0/2] mmc: Add wakeup functionality support for " Ulf Hansson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=9baa3f34-8ef7-cee2-f396-163b8206534d@intel.com \
--to=adrian.hunter@intel.com \
--cc=dmitry.torokhov@gmail.com \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mmc@vger.kernel.org \
--cc=quic_kamasali@quicinc.com \
--cc=quic_pragalla@quicinc.com \
--cc=quic_rampraka@quicinc.com \
--cc=quic_sartgarg@quicinc.com \
--cc=quic_sayalil@quicinc.com \
--cc=s.shtylyov@omp.ru \
--cc=sensor1010@163.com \
--cc=t.scherer@eckelmann.de \
--cc=u.kleine-koenig@pengutronix.de \
--cc=ulf.hansson@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox