From: Michal Simek <michal.simek@amd.com>
To: Simon Glass <sjg@chromium.org>
Cc: u-boot@lists.denx.de, git@amd.com
Subject: Re: [PATCH 1/4] reset: Add reset_reset() and reset_reset_bulk() API
Date: Mon, 4 May 2026 14:38:57 +0200 [thread overview]
Message-ID: <9a88e2cb-37a2-46a5-b56e-e01d336daa31@amd.com> (raw)
In-Reply-To: <CAFLszTgWRJgZoLQqqLvLuUR0B_uKje5ffvQt3uZG9sdhPiKNNg@mail.gmail.com>
On 5/4/26 14:17, Simon Glass wrote:
> Hi Michal,
>
> On 2026-04-30T12:20:00, Michal Simek <michal.simek@amd.com> wrote:
>> reset: Add reset_reset() and reset_reset_bulk() API
>>
>> Add reset_reset() and reset_reset_bulk() functions to the reset
>> controller API. These functions assert and then deassert reset signals
>> in a single call, providing a convenient way to pulse/toggle a reset
>> line.
>>
>> This mirrors the Linux kernel's reset_control_reset() and
>> reset_control_bulk_reset() APIs. The new functions are useful for
>> drivers that need to cycle a reset line during initialization or
>> error recovery.
>>
>> Signed-off-by: Michal Simek <michal.simek@amd.com>
>>
>> drivers/reset/reset-uclass.c | 30 ++++++++++++++++++++++++++++++
>> include/reset-uclass.h | 11 +++++++++++
>> include/reset.h | 35 +++++++++++++++++++++++++++++++++++
>> 3 files changed, 76 insertions(+)
>
>> diff --git a/drivers/reset/reset-uclass.c b/drivers/reset/reset-uclass.c
>> @@ -225,6 +225,36 @@ int reset_deassert_bulk(struct reset_ctl_bulk *bulk)
>> +int reset_reset(struct reset_ctl *reset_ctl)
>> +{
>> + struct reset_ops *ops = reset_dev_ops(reset_ctl->dev);
>> + int ret;
>> +
>> + debug('%s(reset_ctl=%p)\n', __func__, reset_ctl);
>> +
>> + if (ops->rst_reset)
>> + return ops->rst_reset(reset_ctl);
>> +
>> + ret = reset_assert(reset_ctl);
>> + if (ret < 0)
>> + return ret;
>> +
>> + return reset_deassert(reset_ctl);
>> +}
>
> Will this provide a long-enough pulse on real hardware?
In our case delays are handled by firmware itself because we are asking firmware
to do it. It means no issue on our platform.
GPIO based reset can be also handled via gpio delay driver.
But I can add there one more parameter to also pass waiting delay. What do you
think?
>
>> diff --git a/include/reset.h b/include/reset.h
>> @@ -443,6 +468,16 @@ static inline int reset_deassert_bulk(struct reset_ctl_bulk *bulk)
>> +static inline int reset_reset(struct reset_ctl *reset_ctl)
>> +{
>> + return 0;
>> +}
>
> Just to check - this matches the existing assert/deassert stubs,
> silently succeeding with !CONFIG_DM_RESET: is that intended? Should we
> return -NOSYS here?
Will look at this one.
M
next prev parent reply other threads:[~2026-05-04 12:39 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-30 12:20 [PATCH 0/4] reset: Introduce reset_reset.*() API Michal Simek
2026-04-30 12:20 ` [PATCH 1/4] reset: Add reset_reset() and reset_reset_bulk() API Michal Simek
2026-05-04 12:17 ` Simon Glass
2026-05-04 12:38 ` Michal Simek [this message]
2026-05-04 12:44 ` Simon Glass
2026-04-30 12:20 ` [PATCH 2/4] reset: Add sandbox tests for reset_reset() and reset_reset_bulk() Michal Simek
2026-05-04 12:17 ` Simon Glass
2026-05-04 12:40 ` Michal Simek
2026-04-30 12:20 ` [PATCH 3/4] spi: cadence: Use reset_reset_bulk() for proper reset cycling Michal Simek
2026-05-04 12:18 ` Simon Glass
2026-05-04 12:39 ` Michal Simek
2026-04-30 12:20 ` [PATCH 4/4] reset: zynqmp: Implement rst_reset using PM_RESET_ACTION_PULSE Michal Simek
2026-05-04 12:15 ` Simon Glass
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=9a88e2cb-37a2-46a5-b56e-e01d336daa31@amd.com \
--to=michal.simek@amd.com \
--cc=git@amd.com \
--cc=sjg@chromium.org \
--cc=u-boot@lists.denx.de \
/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.