From: Tom Rini <trini@konsulko.com>
To: Nate Drude <nate.d@variscite.com>
Cc: Simon Glass <sjg@chromium.org>,
Fabio Estevam <festevam@gmail.com>,
Samuel Holland <samuel@sholland.org>,
Heinrich Schuchardt <xypron.glpk@gmx.de>,
Andrew Jeffery <andrew@aj.id.au>,
Eddie James <eajames@linux.ibm.com>,
U-Boot Mailing List <u-boot@lists.denx.de>,
eran.m@variscite.com
Subject: Re: [PATCH] gpio: uclass: Introduce gpio-hog-optional property
Date: Wed, 14 Sep 2022 10:16:46 -0400 [thread overview]
Message-ID: <20220914141646.GR6993@bill-the-cat> (raw)
In-Reply-To: <01cfeafe-980c-aad7-7acc-4957c4622aaa@variscite.com>
[-- Attachment #1: Type: text/plain, Size: 4034 bytes --]
On Wed, Sep 14, 2022 at 08:59:52AM -0500, Nate Drude wrote:
> Hi Simon,
>
> On 9/14/22 7:49 AM, Simon Glass wrote:
> > Hi Nate,
> >
> > On Mon, 12 Sept 2022 at 14:57, Nate Drude <nate.d@variscite.com> wrote:
> > >
> > > Hi Simon and Fabio,
> > >
> > > On 9/12/22 3:16 PM, Simon Glass wrote:
> > > > Hi,
> > > >
> > > > On Mon, 12 Sept 2022 at 12:48, Fabio Estevam <festevam@gmail.com> wrote:
> > > > >
> > > > > Hi Nate and Simon,
> > > > >
> > > > > On Mon, Sep 12, 2022 at 2:55 PM Nate Drude <nate.d@variscite.com> wrote:
> > > > > >
> > > > > > gpio_hog_probe_all is invoked by init_sequence_r in board_r.c.
> > > > > > If device_probe fails for any gpio-hog, boot hangs with the following error:
> > > > > >
> > > > > > > initcall sequence 00000000fffc8e18 failed at call 000000004023b320 (err=-121)
> > > > > > > ### ERROR ### Please RESET the board ###
> > > > > >
> > > > > > gpio-hog-optional allows the boot sequence to continue if device_probe
> > > > > > fails for optional gpio-hog(s).
> > > > > >
> > > > > > Signed-off-by: Nate Drude <nate.d@variscite.com>
> > > > > > ---
> > > > > > doc/device-tree-bindings/gpio/gpio.txt | 1 +
> > > > > > drivers/gpio/gpio-uclass.c | 4 +++-
> > > > > > 2 files changed, 4 insertions(+), 1 deletion(-)
> > > > > >
> > > > > > diff --git a/doc/device-tree-bindings/gpio/gpio.txt b/doc/device-tree-bindings/gpio/gpio.txt
> > > > > > index 1481ed607d..02d296316b 100644
> > > > > > --- a/doc/device-tree-bindings/gpio/gpio.txt
> > > > > > +++ b/doc/device-tree-bindings/gpio/gpio.txt
> > > > > > @@ -189,6 +189,7 @@ gpio-controller's driver probe function.
> > > > > > Each GPIO hog definition is represented as a child node of the GPIO controller.
> > > > > > Required properties:
> > > > > > - gpio-hog: A property specifying that this child node represents a GPIO hog.
> > > > > > +- gpio-hog-optional: A property specifying to continue boot when device_probe fails in gpio_hog_probe_all
> > > > >
> > > > > gpio-hog-optional property does not exist in Linux.
> > > > >
> > > > > If this property is introduced then U-Boot and Linux devicetrees will
> > > > > not be in sync.
> > > > >
> > > > > Can this be fixed differently?
> > > >
> > > > Nate, can you send a patch to Linux with the binding update?
> > > >
> > > > Regards,
> > > > Simon
> > >
> > > Thanks for your responses and feedback.
> > >
> > > I don't think gpio-hog-optional is relevant to Linux.
> >
> > Sure, but Linux is (for better or worse) the main repo for the device
> > tree bindings.
>
> I am not understanding the action. I think you're suggesting I update the
> Linux device tree bindings so they stay aligned with U-Boot, adding a
> property gpio-hog-optional after this line: https://github.com/torvalds/linux/blob/v6.0-rc5/Documentation/devicetree/bindings/gpio/gpio.txt#L191
>
> However, since it's not relevant to Linux, I think it will be confusing
> since it will have no effect and won't be be used in any Linux code.
>
> Can you please advise what description I should use for the
> gpio-hog-optional property so that the Linux maintainers would accept such a
> patch?
Yes, that would be one way to go about this, and there are other
non-Linux bindings in the Linux kernel tree, but this might be the first
property of an existing binding, so that might also be a bit challenging
to get accepted, or find out what the preferred solution is.
[snip]
> > > Do you have any suggestions for a better approach? Does it make sense
> > > for gpio_hog_probe_all to cause a fatal error when the gpio hog probe
> > > fails (most devices, including the gpio-expander, will not cause a hang
> > > if they fail to probe)?
> >
> > I think your approach is fine as is.
>
> An alternate approach is to modify the default behavior so that
> gpio_hog_probe_all will not trigger a fatal error. Do you think this is
> better?
This too would be acceptable.
--
Tom
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]
next prev parent reply other threads:[~2022-09-14 14:16 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-12 17:55 [PATCH] gpio: uclass: Introduce gpio-hog-optional property Nate Drude
2022-09-12 18:31 ` Simon Glass
2022-09-12 18:48 ` Fabio Estevam
2022-09-12 20:16 ` Simon Glass
2022-09-12 20:56 ` Nate Drude
2022-09-14 12:49 ` Simon Glass
2022-09-14 13:59 ` Nate Drude
2022-09-14 14:09 ` Fabio Estevam
2022-09-14 14:16 ` Tom Rini [this message]
2022-09-14 14:31 ` Nate Drude
2022-09-14 17:09 ` Simon Glass
2022-09-20 11:43 ` Fabio Estevam
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=20220914141646.GR6993@bill-the-cat \
--to=trini@konsulko.com \
--cc=andrew@aj.id.au \
--cc=eajames@linux.ibm.com \
--cc=eran.m@variscite.com \
--cc=festevam@gmail.com \
--cc=nate.d@variscite.com \
--cc=samuel@sholland.org \
--cc=sjg@chromium.org \
--cc=u-boot@lists.denx.de \
--cc=xypron.glpk@gmx.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.