From: Mehmet Fide <mehmet.fide@gmail.com>
To: Simon Glass <sjg@chromium.org>
Cc: Tom Rini <trini@konsulko.com>,
Jaehoon Chung <jh80.chung@samsung.com>,
Peng Fan <peng.fan@nxp.com>, Vincent Jardin <vjardin@free.fr>,
Ye Li <ye.li@nxp.com>, Michal Simek <michal.simek@amd.com>,
Aristo Chen <aristo.chen@canonical.com>,
u-boot@lists.u-boot-project.org,
Mehmet Fide <mehmet.fide@screeningeagle.com>
Subject: Re: [PATCH 2/4] regulator: claim the enable GPIO at probe time, not in of_to_plat()
Date: Thu, 10 Sep 2026 16:58:30 +0200 [thread overview]
Message-ID: <20260910145830.1276001-1-mehmet.fide@gmail.com> (raw)
In-Reply-To: <CAFLszTgNV3_vOO4o6rzVabU7+amqLR2NSek3xU-05kb_jvpv9w@mail.gmail.com>
Hi Simon,
On 2026-09-10 Simon Glass wrote:
> The debug message is stale once the request moves to probe()
Will reword and add the missing newline.
> This quietly changes behaviour: the old of_to_plat() only
> debug()-logged a failure from gpio_request_by_name() and carried on,
> whereas probe() now aborts the device for any non-ENOENT error.
For the fixed regulator there is no change: regulator_common_of_to_plat()
already returned any error other than -ENOENT after the debug(), so a
missing controller or a busy pin failed the device before this series
too, only at a different stage. The change is real for the
gpio-regulator's voltage GPIO, which used to debug() and carry on even
though the driver cannot do anything without that GPIO. I will state
that in the commit message.
> Also the 'if (plat->gpio_dt.present)' guard duplicates the check that
> gpio_request_parsed() already does
Agreed, v2 drops the guards and tolerates -ENOENT in both places.
> Does fixed-clock ever actually carry an enable GPIO in the wild?
Not in this tree: the only regulator-fixed-clock node is the Colibri
iMX6ULL Ethernet PHY supply and it has no GPIO. The binding allows one
and Linux drives it next to the clock, but our set_enable() ignores it.
I added the request only to keep what the shared of_to_plat() did
before. Since nothing observable depends on it, v2 drops the call from
fixed-clock's probe() and says so in the commit message. Teaching
set_enable() to drive the GPIO as Linux does would be a separate patch,
if anyone needs it.
> Once the device is probed, gpio_dt is dead weight in plat
Yes. priv is not allocated when of_to_plat() runs, so plat is the only
place the parsed description can live; I will note the trade-off in the
commit message.
Regards,
Mehmet
next prev parent reply other threads:[~2026-09-10 14:58 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-28 10:52 [PATCH 0/4] dm: gpio: read GPIOs in of_to_plat(), request them in probe() Mehmet Fide
2026-08-28 10:52 ` [PATCH 1/4] gpio: add a way to parse a GPIO now and request it later Mehmet Fide
2026-09-10 14:06 ` Simon Glass
2026-09-10 14:58 ` Mehmet Fide
2026-08-28 10:52 ` [PATCH 2/4] regulator: claim the enable GPIO at probe time, not in of_to_plat() Mehmet Fide
2026-09-10 14:08 ` Simon Glass
2026-09-10 14:58 ` Mehmet Fide [this message]
2026-08-28 10:52 ` [PATCH 3/4] doc: driver-model: state that of_to_plat() must not probe or claim Mehmet Fide
2026-09-10 14:09 ` Simon Glass
2026-09-10 14:58 ` Mehmet Fide
2026-08-28 10:52 ` [PATCH 4/4] test: dm: check the fixed regulator claims its GPIO at probe time Mehmet Fide
2026-09-10 14:09 ` Simon Glass
2026-09-10 14:58 ` Mehmet Fide
2026-09-10 14:10 ` [0/4] dm: gpio: read GPIOs in of_to_plat(), request them in probe() Simon Glass
2026-09-10 14:58 ` [PATCH 0/4] " Mehmet Fide
2026-09-10 15:08 ` 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=20260910145830.1276001-1-mehmet.fide@gmail.com \
--to=mehmet.fide@gmail.com \
--cc=aristo.chen@canonical.com \
--cc=jh80.chung@samsung.com \
--cc=mehmet.fide@screeningeagle.com \
--cc=michal.simek@amd.com \
--cc=peng.fan@nxp.com \
--cc=sjg@chromium.org \
--cc=trini@konsulko.com \
--cc=u-boot@lists.u-boot-project.org \
--cc=vjardin@free.fr \
--cc=ye.li@nxp.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox