Devicetree
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Kamal Dasu" <kamal.dasu@broadcom.com>
Cc: conor+dt@kernel.org, robh@kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCH v4 1/2] dt-bindings: mmc: Extend keep-power-in-suspend beyond SDIO
Date: Tue, 28 Jul 2026 19:16:29 +0000	[thread overview]
Message-ID: <20260728191630.4B8631F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260728190314.2325906-2-kamal.dasu@broadcom.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] The `keep-power-in-suspend` DT property contract is extended to (e)MMC devices but is not implemented in the MMC core, causing cards to be incorrectly powered off during suspend.
--

--- Patch [1]: [PATCH v4 1/2] dt-bindings: mmc: Extend keep-power-in-suspend beyond SDIO ---
commit 586f6f073c6606f13ea85125ddb68d3d032283b3
Author: Kamal Dasu <kamal.dasu@broadcom.com>

dt-bindings: mmc: Extend keep-power-in-suspend beyond SDIO

This commit drops the SDIO only restriction for the keep-power-in-suspend
property and documents its use for MMC devices. This allows platforms where
firmware accesses the card directly during system resume to specify that
card power must be preserved.

> diff --git a/Documentation/devicetree/bindings/mmc/mmc-controller-common.yaml b/Documentation/devicetree/bindings/mmc/mmc-controller-common.yaml
> index 3d7195e9461c3..f4663b3184355 100644
> --- a/Documentation/devicetree/bindings/mmc/mmc-controller-common.yaml
> +++ b/Documentation/devicetree/bindings/mmc/mmc-controller-common.yaml
> @@ -291,7 +291,12 @@ properties:
>    keep-power-in-suspend:
>      $ref: /schemas/types.yaml#/definitions/flag
>      description:
> -      SDIO only. Preserves card power during a suspend/resume cycle.
> +      Preserves card power during a suspend/resume cycle. For SDIO,
> +      this is a request an individual function driver can make at
> +      runtime via sdio_set_host_pm_flags(). For (e)MMC, it is instead
> +      a fixed platform characteristic, needed on boards where firmware
> +      accesses the card directly during system resume, before the
> +      kernel's own resume path runs.

[Severity: High]
Does the MMC core currently support preserving power for MMC devices
during suspend to fulfill this newly documented contract?

Looking at the eMMC suspend path, it unconditionally calls mmc_power_off():

drivers/mmc/core/mmc.c:_mmc_suspend() {
	...
	if (!err) {
		mmc_power_off(host);
		mmc_card_set_suspended(host->card);
	}
	...
}

The SD suspend path also unconditionally powers off the card:

drivers/mmc/core/sd.c:_mmc_sd_suspend() {
	...
	if (!err) {
		mmc_power_off(host);
		mmc_card_set_suspended(card);
	}
	...
}

If a platform relies on this property because its firmware accesses the
card directly during resume, wouldn't unconditionally powering it off during
suspend break the system resume?

Is there a missing patch in this series to update the core to check
the property before calling mmc_power_off()?

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260728190314.2325906-1-kamal.dasu@broadcom.com?part=1

  reply	other threads:[~2026-07-28 19:16 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-28 19:03 [PATCH v4 0/2] mmc: core: Keep the card powered across suspend when firmware needs it live Kamal Dasu
2026-07-28 19:03 ` [PATCH v4 1/2] dt-bindings: mmc: Extend keep-power-in-suspend beyond SDIO Kamal Dasu
2026-07-28 19:16   ` sashiko-bot [this message]
2026-07-28 19:03 ` [PATCH v4 2/2] mmc: core: Honor keep-power-in-suspend for (e)MMC in suspend/resume Kamal Dasu
2026-07-28 19:15   ` sashiko-bot

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=20260728191630.4B8631F000E9@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=kamal.dasu@broadcom.com \
    --cc=robh@kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    /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