All of lore.kernel.org
 help / color / mirror / Atom feed
From: Shawn Lin <shawn.lin@linux.dev>
To: Ulf Hansson <ulf.hansson@oss.qualcomm.com>,
	linux-mmc@vger.kernel.org, Ulf Hansson <ulfh@kernel.org>
Cc: shawn.lin@linux.dev, Adrian Hunter <adrian.hunter@intel.com>,
	Kamal Dasu <kamal.dasu@broadcom.com>,
	Florian Fainelli <florian.fainelli@broadcom.com>,
	Wolfram Sang <wsa+renesas@sang-engineering.com>,
	Oleksij Rempel <o.rempel@pengutronix.de>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v10 4/6] mmc: core: Split sdio_set_host_pm_flags()
Date: Tue, 27 Oct 2026 23:12:56 +0800	[thread overview]
Message-ID: <a005dddd-a495-45f4-ac43-7d708eea009c@linux.dev> (raw)
In-Reply-To: <20261027144051.249211-5-ulf.hansson@oss.qualcomm.com>

Hi Ulf,

在 2026/10/27 星期二 22:40, Ulf Hansson 写道:
> To prepare for a subsequent change, let's split up sdio_set_host_pm_flags()
> allowing the second part of it to be used as an internal function for the
> core.
> 
> Signed-off-by: Ulf Hansson <ulf.hansson@oss.qualcomm.com>
> ---
>   drivers/mmc/core/core.c    | 9 +++++++++
>   drivers/mmc/core/core.h    | 1 +
>   drivers/mmc/core/sdio_io.c | 7 +------
>   3 files changed, 11 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c
> index 677e445dc48c..49c0494932cc 100644
> --- a/drivers/mmc/core/core.c
> +++ b/drivers/mmc/core/core.c
> @@ -1422,6 +1422,15 @@ int mmc_handle_undervoltage(struct mmc_host *host)
>   	return host->bus_ops->handle_undervoltage(host);
>   }
>   
> +int mmc_set_host_pm_flags(struct mmc_host *host, mmc_pm_flag_t flags)
> +{
> +	if (flags & ~host->pm_caps)
> +		return -EINVAL;
> +
> +	host->pm_flags |= flags;
> +	return 0;
> +}
> +
>   /*
>    * Assign a mmc bus handler to a host. Only one bus handler may control a
>    * host at any given time.
> diff --git a/drivers/mmc/core/core.h b/drivers/mmc/core/core.h
> index 9be2875608ce..d3a2ff00b18f 100644
> --- a/drivers/mmc/core/core.h
> +++ b/drivers/mmc/core/core.h
> @@ -64,6 +64,7 @@ int mmc_handle_undervoltage(struct mmc_host *host);
>   void mmc_regulator_register_undervoltage_notifier(struct mmc_host *host);
>   void mmc_regulator_unregister_undervoltage_notifier(struct mmc_host *host);
>   void mmc_undervoltage_workfn(struct work_struct *work);
> +int mmc_set_host_pm_flags(struct mmc_host *host, mmc_pm_flag_t flags);
>   
>   static inline void mmc_delay(unsigned int ms)
>   {
> diff --git a/drivers/mmc/core/sdio_io.c b/drivers/mmc/core/sdio_io.c
> index 12716ec0e35d..99f857514b63 100644
> --- a/drivers/mmc/core/sdio_io.c
> +++ b/drivers/mmc/core/sdio_io.c
> @@ -726,12 +726,7 @@ int sdio_set_host_pm_flags(struct sdio_func *func, mmc_pm_flag_t flags)
>   
>   	host = func->card->host;
>   
> -	if (flags & ~host->pm_caps)
> -		return -EINVAL;
> -
> -	/* function suspend methods are serialized, hence no lock needed */

This is an API for sdio function driver, should we preserve this commet 
here?

> -	host->pm_flags |= flags;
> -	return 0;
> +	return mmc_set_host_pm_flags(host, flags);
>   }
>   EXPORT_SYMBOL_GPL(sdio_set_host_pm_flags);
>   


  reply	other threads:[~2026-10-27 15:13 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-27 14:40 [PATCH v10 0/6] mmc: core: Keep the card powered across suspend when firmware needs it live Ulf Hansson
2026-10-27 14:40 ` [PATCH v10 1/6] dt-bindings: mmc: Extend keep-power-in-suspend beyond SDIO Ulf Hansson
2026-10-27 15:01   ` Shawn Lin
2026-10-27 19:46     ` Ulf Hansson
2026-10-28  0:36       ` Shawn Lin
2026-10-28 10:43         ` Ulf Hansson
2026-10-28 12:08           ` Shawn Lin
2026-10-27 15:33   ` Krzysztof Kozlowski
2026-10-27 19:48     ` Ulf Hansson
2026-10-27 20:31       ` Kamal Dasu
2026-10-28 10:36         ` Ulf Hansson
2026-10-28 15:46         ` Ulf Hansson
2026-10-27 14:40 ` [PATCH v10 2/6] dt-bindings: mmc: Add reset-card-at-resume property Ulf Hansson
2026-10-27 15:33   ` Krzysztof Kozlowski
2026-10-27 14:40 ` [PATCH v10 3/6] mmc: core: Add option to keep an eMMC powered on at system suspend Ulf Hansson
2026-10-27 15:19   ` Shawn Lin
2026-10-27 14:40 ` [PATCH v10 4/6] mmc: core: Split sdio_set_host_pm_flags() Ulf Hansson
2026-10-27 15:12   ` Shawn Lin [this message]
2026-10-27 19:43     ` Ulf Hansson
2026-10-27 14:40 ` [PATCH v10 5/6] mmc: core: Move reset functions for eMMC Ulf Hansson
2026-10-27 15:19   ` Shawn Lin
2026-10-27 14:40 ` [PATCH v10 6/6] mmc: core: Add support for resetting an eMMC at system resume Ulf Hansson
2026-10-27 15:20   ` Shawn Lin
2026-10-27 20:00     ` Kamal Dasu
2026-10-27 19:53 ` [PATCH v10 0/6] mmc: core: Keep the card powered across suspend when firmware needs it live Kamal Dasu
2026-10-28  9:35   ` 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=a005dddd-a495-45f4-ac43-7d708eea009c@linux.dev \
    --to=shawn.lin@linux.dev \
    --cc=adrian.hunter@intel.com \
    --cc=florian.fainelli@broadcom.com \
    --cc=kamal.dasu@broadcom.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=o.rempel@pengutronix.de \
    --cc=ulf.hansson@oss.qualcomm.com \
    --cc=ulfh@kernel.org \
    --cc=wsa+renesas@sang-engineering.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.