From: Geert Uytterhoeven <geert@linux-m68k.org>
To: Saravana Kannan <saravanak@google.com>
Cc: Martin Kaiser <martin@kaiser.cx>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
"Rafael J. Wysocki" <rafael@kernel.org>,
Marek Szyprowski <m.szyprowski@samsung.com>,
Marc Zyngier <maz@kernel.org>,
Tudor Ambarus <Tudor.Ambarus@microchip.com>,
Linus Walleij <linus.walleij@linaro.org>,
Bartosz Golaszewski <bgolaszewski@baylibre.com>,
Rob Herring <robh+dt@kernel.org>,
Frank Rowand <frowand.list@gmail.com>,
Len Brown <lenb@kernel.org>, LKML <linux-kernel@vger.kernel.org>,
"open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS"
<devicetree@vger.kernel.org>,
ACPI Devel Maling List <linux-acpi@vger.kernel.org>,
Android Kernel Team <kernel-team@android.com>
Subject: Re: [PATCH v2 0/3] Make fw_devlink=on more forgiving
Date: Wed, 3 Feb 2021 09:15:48 +0100 [thread overview]
Message-ID: <CAMuHMdWyA3y1PYff5X9DoPaj0TREK3jFe_P+e+rNVb1K-kRDbA@mail.gmail.com> (raw)
In-Reply-To: <CAGETcx8Yai=q+sHiixcv=D=T9r0+X1GZ8LRBc98SX_omYVhavQ@mail.gmail.com>
Hi Saravana,
On Wed, Feb 3, 2021 at 9:11 AM Saravana Kannan <saravanak@google.com> wrote:
> On Tue, Feb 2, 2021 at 11:55 PM Geert Uytterhoeven <geert@linux-m68k.org> wrote:
> > On Tue, Feb 2, 2021 at 11:44 PM Saravana Kannan <saravanak@google.com> wrote:
> > > On Tue, Feb 2, 2021 at 1:22 PM Martin Kaiser <martin@kaiser.cx> wrote:
> > > > Thus wrote Saravana Kannan (saravanak@google.com):
> > > > All of those drivers have a gpio in
> > > > their device-tree node, such as
> > > >
> > > > my_driver {
> > > > gpio_test1 = <&gpio1 0 0>;
> > > > ...
> > > > };
> > > >
> > > > with gpio1 from arch/arm/boot/dts/imx25.dtsi.
> > > >
> > > > The probe function calls
> > > >
> > > > of_get_named_gpio(np, "gpio_test1", 0);
> > > >
> > > > to get the gpio. This fails with -EINVAL.
> > >
> > > And you didn't see this issue with the fsl,avic patch?
> > >
> > > The property you are using is not a standard GPIO binding (-gpios,
> > > gpio, gpios) and I'm not surprised it's not working. The gpio1 is
> > > probably getting probe deferred and ends up running after "my_driver".
> >
> > So my_driver doesn't support deferred probe, as of_get_named_gpio()
> > returns -EINVAL instead of -EPROBE_DEFER?
> > Converting my_driver from of_get_named_gpio() to the gpiod_*() API
> > should at least make the driver support probe deferral, after which I
> > expect it to start working again on reprobe?
>
> The way I understood the API/example, you can't just change the code
> and have it work. The DT itself isn't using standard bindings. And we
Oh, right.
> can't make kernel changes that assume the DT has been changed to match
> the code. So, the best we could do is have of_get_named_gpio() return
> -EPROBE_DEFER if it doesn't find the GPIO -- assuming that doesn't
> break other users. Or have this specific driver remap the -EINVAL to
> -EPROBE_DEFER.
The latter would hide real errors, too, and would cause futile reprobes.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
next prev parent reply other threads:[~2021-02-03 8:16 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-02 4:33 [PATCH v2 0/3] Make fw_devlink=on more forgiving Saravana Kannan
2021-02-02 4:33 ` [PATCH v2 1/3] driver core: fw_devlink: Detect supplier devices that will never be added Saravana Kannan
2021-02-02 14:12 ` Rafael J. Wysocki
2021-02-02 19:35 ` Saravana Kannan
2021-02-02 4:33 ` [PATCH v2 2/3] driver core: fw_devlink: Handle missing drivers for optional suppliers Saravana Kannan
2021-02-02 14:34 ` Rafael J. Wysocki
2021-02-02 19:46 ` Saravana Kannan
2021-02-04 18:41 ` Rafael J. Wysocki
2021-02-04 19:03 ` Saravana Kannan
2021-02-02 4:33 ` [PATCH v2 3/3] of: property: Don't add links to absent suppliers Saravana Kannan
2021-02-04 19:17 ` Saravana Kannan
2021-02-02 16:52 ` [PATCH v2 0/3] Make fw_devlink=on more forgiving Tudor.Ambarus
2021-02-02 17:41 ` Rob Herring
2021-02-02 18:28 ` Saravana Kannan
2021-02-02 21:22 ` Martin Kaiser
2021-02-02 22:43 ` Saravana Kannan
2021-02-03 7:54 ` Geert Uytterhoeven
2021-02-03 8:11 ` Saravana Kannan
2021-02-03 8:15 ` Geert Uytterhoeven [this message]
2021-02-03 22:02 ` Martin Kaiser
2021-02-03 21:57 ` Martin Kaiser
2021-02-03 22:03 ` Saravana Kannan
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=CAMuHMdWyA3y1PYff5X9DoPaj0TREK3jFe_P+e+rNVb1K-kRDbA@mail.gmail.com \
--to=geert@linux-m68k.org \
--cc=Tudor.Ambarus@microchip.com \
--cc=bgolaszewski@baylibre.com \
--cc=devicetree@vger.kernel.org \
--cc=frowand.list@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=kernel-team@android.com \
--cc=lenb@kernel.org \
--cc=linus.walleij@linaro.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=m.szyprowski@samsung.com \
--cc=martin@kaiser.cx \
--cc=maz@kernel.org \
--cc=rafael@kernel.org \
--cc=robh+dt@kernel.org \
--cc=saravanak@google.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;
as well as URLs for NNTP newsgroup(s).