[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAGETcx9YGkqOj7e5xeXdE-icog9-v+SsTpW35-n1KeCf6JvpbQ@mail.gmail.com>
Date: Wed, 3 Feb 2021 14:03:42 -0800
From: Saravana Kannan <saravanak@...gle.com>
To: Martin Kaiser <martin@...ser.cx>
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
"Rafael J. Wysocki" <rafael@...nel.org>,
Marek Szyprowski <m.szyprowski@...sung.com>,
Geert Uytterhoeven <geert@...ux-m68k.org>,
Marc Zyngier <maz@...nel.org>,
Tudor Ambarus <Tudor.Ambarus@...rochip.com>,
Linus Walleij <linus.walleij@...aro.org>,
Bartosz Golaszewski <bgolaszewski@...libre.com>,
Rob Herring <robh+dt@...nel.org>,
Frank Rowand <frowand.list@...il.com>,
Len Brown <lenb@...nel.org>,
LKML <linux-kernel@...r.kernel.org>,
"open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS"
<devicetree@...r.kernel.org>,
ACPI Devel Maling List <linux-acpi@...r.kernel.org>,
Android Kernel Team <kernel-team@...roid.com>
Subject: Re: [PATCH v2 0/3] Make fw_devlink=on more forgiving
On Wed, Feb 3, 2021 at 1:58 PM Martin Kaiser <martin@...ser.cx> wrote:
>
> Thus wrote Saravana Kannan (saravanak@...gle.com):
>
> > > With modules disabled, the kernel boots but probe fails for some
> > > (non-mainline) drivers in my tree.
>
> > Thanks Martin!
>
> > > 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?
>
> No. With the fsl,avic patch in place, all drivers are probed correctly.
>
> > The property you are using is not a standard GPIO binding (-gpios,
> > gpio, gpios) and I'm not surprised it's not working.
>
> I know that I should be using the gpiod API as suggested by Geert.
>
> BTW is this definition ok? Could its driver be converted to using the
> gpiod api?
>
> rtc: rtc {
> compatible = "moxa,moxart-rtc";
> gpio-rtc-sclk = <&gpio 5 0>;
> ...
The correct non-deprecated binding AFAIK is something-gpios. Not
gpio-something. And then you can use different APIs to get the GPIO (I
forget what it's called).
-Saravana
>
>
> > The gpio1 is probably getting probe deferred and ends up running after
> > "my_driver".
>
> I added a debug print in the probe function. It turned out that the
> driver for gpio1 is probed for the first time after my_driver.
>
> I removed the interrupt-controller property for gpio2 for testing. gpio2
> was then probed much earlier.
Powered by blists - more mailing lists