From: Judith Mendez <jm@ti.com>
To: Judith Mendez <jm@ti.com>, Ulf Hansson <ulfh@kernel.org>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>
Cc: <linux-mmc@vger.kernel.org>, <devicetree@vger.kernel.org>,
<linux-kernel@vger.kernel.org>,
Sebastian Reichel <sebastian.reichel@collabora.com>
Subject: [PATCH v3 0/2] mmc: Add power_off_delay_us support
Date: Thu, 6 Aug 2026 11:22:00 -0500 [thread overview]
Message-ID: <20260806162202.657512-1-jm@ti.com> (raw)
This series adds power_off_delay_us support for MMC controllers,
enabling boards to specify custom delays after MMC power off to work around
hardware issues such as slow RC circuites on MMC VDD rails.
Rather than adding host driver-specific workarounds, we abstract the
implementation into the MMC core and pickup the delay value with a device
tree property (power-off-delay-us). This allows any board with slow
power off requirements to configure the necessary delay without code
changes.
The solution is minimal and follows existing patterns as with
power_delay_ms. The allowed minimum value = 0 ms (early return).
The default value is 1000us to not deviate from the
original 1ms delay set in mmc_power_off().
Link to v1:
https://lore.kernel.org/all/20260716232641.2659710-1-jm@ti.com/
Link to v2:
https://lore.kernel.org/all/20260722205701.372789-1-jm@ti.com/
Changes since v2:
- allow 0us as lowest possible value (early return)
- Change custom logic in mmc_delay_us() to use fsleep()
- drop dt parsing checkers
Judith Mendez (2):
dt-bindings: mmc: Add power-off-delay-us property
mmc: core: Add power-off-delay-us support
.../devicetree/bindings/mmc/mmc-controller-common.yaml | 10 ++++++++++
drivers/mmc/core/core.c | 2 +-
drivers/mmc/core/core.h | 8 ++++++++
drivers/mmc/core/host.c | 4 ++++
include/linux/mmc/host.h | 1 +
5 files changed, 24 insertions(+), 1 deletion(-)
--
2.54.0
next reply other threads:[~2026-08-06 16:23 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-06 16:22 Judith Mendez [this message]
2026-08-06 16:22 ` [PATCH v3 1/2] dt-bindings: mmc: Add power-off-delay-us property Judith Mendez
2026-08-06 16:22 ` [PATCH v3 2/2] mmc: core: Add power-off-delay-us support Judith Mendez
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=20260806162202.657512-1-jm@ti.com \
--to=jm@ti.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=krzk+dt@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mmc@vger.kernel.org \
--cc=robh@kernel.org \
--cc=sebastian.reichel@collabora.com \
--cc=ulfh@kernel.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