From: Philipp Zabel <p.zabel@pengutronix.de>
To: Yang Siyuan <hsyysy@163.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3] reset: core: honour optional resets when the GPIO fallback returns -ENOENT
Date: Tue, 17 Nov 2026 12:11:33 +0100 [thread overview]
Message-ID: <7e6e10acc08d15d193e9af69eba54bb2d93aadbc.camel@pengutronix.de> (raw)
In-Reply-To: <20261117110812.20371-1-hsyysy@163.com>
On Di, 2026-11-17 at 19:08 +0800, Yang Siyuan wrote:
> __fwnode_reset_control_get() honours RESET_CONTROL_FLAGS_BIT_OPTIONAL by
> returning NULL when the requested reset is not described in the device
> tree. The reset-gpio fallback breaks this: when
> __reset_add_reset_gpio_device() fails with -ENOENT, the error is returned
> even for an optional reset.
>
> This is reachable on Allwinner SoCs, whose pinctrl uses three-cell GPIO
> specifiers. The reset-gpio fallback only supports two cells, so it
> returns -ENOENT and a consumer asking for an optional reset fails to
> probe instead of falling back to its own GPIO handling. mmc-pwrseq-simple
> on the Anbernic RG35XX family hits this: its wifi_pwrseq node has
> reset-gpios but no resets, so the SDIO WiFi adapter never probes.
>
> Return NULL only for -ENOENT when the reset was requested as optional.
> A reset that is described but cannot be used is still an error, so
> -EPROBE_DEFER and all other failures are propagated.
>
> Signed-off-by: Yang Siyuan <hsyysy@163.com>
Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
regards
Philipp
next prev parent reply other threads:[~2026-11-17 11:11 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-17 9:20 [PATCH RESEND] reset: core: honour optional resets when the GPIO fallback is unusable Yang Siyuan
2026-11-17 9:49 ` Philipp Zabel
2026-11-17 9:55 ` [PATCH v2] reset: core: honour optional resets when the GPIO fallback returns -ENOENT Yang Siyuan
2026-11-17 10:30 ` Philipp Zabel
2026-11-17 11:08 ` [PATCH v3] " Yang Siyuan
2026-11-17 11:11 ` Philipp Zabel [this message]
2026-11-17 13:39 ` Philipp Zabel
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=7e6e10acc08d15d193e9af69eba54bb2d93aadbc.camel@pengutronix.de \
--to=p.zabel@pengutronix.de \
--cc=hsyysy@163.com \
--cc=linux-kernel@vger.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
all inboxes | Powered by JetHome®