From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Saravana Kannan <saravanak@google.com>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
"Rafael J. Wysocki" <rafael@kernel.org>,
Kevin Hilman <khilman@kernel.org>,
Ulf Hansson <ulf.hansson@linaro.org>,
Len Brown <len.brown@intel.com>, Pavel Machek <pavel@ucw.cz>,
Joerg Roedel <joro@8bytes.org>, Will Deacon <will@kernel.org>,
Andrew Lunn <andrew@lunn.ch>,
Heiner Kallweit <hkallweit1@gmail.com>,
Russell King <linux@armlinux.org.uk>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Linus Walleij <linus.walleij@linaro.org>,
Daniel Scally <djrscally@gmail.com>,
Heikki Krogerus <heikki.krogerus@linux.intel.com>,
Sakari Ailus <sakari.ailus@linux.intel.com>,
Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org>,
David Ahern <dsahern@kernel.org>, Mark Brown <broonie@kernel.org>,
Rob Herring <robh@kernel.org>,
Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>,
John Stultz <jstultz@google.com>,
Nathan Chancellor <nathan@kernel.org>,
Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
Android Kernel Team <kernel-team@android.com>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Linux PM list <linux-pm@vger.kernel.org>,
Linux IOMMU <iommu@lists.linux-foundation.org>,
netdev <netdev@vger.kernel.org>,
"open list:GPIO SUBSYSTEM" <linux-gpio@vger.kernel.org>,
ACPI Devel Maling List <linux-acpi@vger.kernel.org>
Subject: Re: [RFC PATCH v1 2/9] pinctrl: devicetree: Delete usage of driver_deferred_probe_check_state()
Date: Mon, 6 Jun 2022 13:17:24 +0300 [thread overview]
Message-ID: <Yp3UNAW5Zv+RjabA@smile.fi.intel.com> (raw)
In-Reply-To: <CAGETcx-=kAJp282OvG4yd830fhQowN7-yXifERqiHRi2w0bGFw@mail.gmail.com>
On Sat, Jun 04, 2022 at 08:41:01PM -0700, Saravana Kannan wrote:
> On Mon, May 30, 2022 at 2:22 AM Geert Uytterhoeven <geert@linux-m68k.org> wrote:
> > On Thu, May 26, 2022 at 10:16 AM Saravana Kannan <saravanak@google.com> wrote:
> > > Now that fw_devlink=on by default and fw_devlink supports
> > > "pinctrl-[0-8]" property, the execution will never get to the point
> >
> > 0-9?
> >
> > oh, it's really 0-8:
> >
> > drivers/of/property.c:DEFINE_SIMPLE_PROP(pinctrl0, "pinctrl-0", NULL)
> > drivers/of/property.c:DEFINE_SIMPLE_PROP(pinctrl1, "pinctrl-1", NULL)
> > drivers/of/property.c:DEFINE_SIMPLE_PROP(pinctrl2, "pinctrl-2", NULL)
> > drivers/of/property.c:DEFINE_SIMPLE_PROP(pinctrl3, "pinctrl-3", NULL)
> > drivers/of/property.c:DEFINE_SIMPLE_PROP(pinctrl4, "pinctrl-4", NULL)
> > drivers/of/property.c:DEFINE_SIMPLE_PROP(pinctrl5, "pinctrl-5", NULL)
> > drivers/of/property.c:DEFINE_SIMPLE_PROP(pinctrl6, "pinctrl-6", NULL)
> > drivers/of/property.c:DEFINE_SIMPLE_PROP(pinctrl7, "pinctrl-7", NULL)
> > drivers/of/property.c:DEFINE_SIMPLE_PROP(pinctrl8, "pinctrl-8", NULL)
> >
> > Looks fragile, especially since we now have:
> >
> > arch/arm64/boot/dts/microchip/sparx5_pcb134_board.dtsi:
> > pinctrl-9 = <&i2cmux_9>;
> > arch/arm64/boot/dts/microchip/sparx5_pcb134_board.dtsi: pinctrl-10
> > = <&i2cmux_10>;
> > arch/arm64/boot/dts/microchip/sparx5_pcb134_board.dtsi: pinctrl-11
> > = <&i2cmux_11>;
> > arch/arm64/boot/dts/microchip/sparx5_pcb134_board.dtsi: pinctrl-12
> > = <&i2cmux_pins_i>;
>
> Checking for pinctrl-* and then verifying if * matches %d would be
> more complicated and probably more expensive compared to listing
> pinctrl-[0-8]. Especially because more than 50% of pinctrl-*
> properties in DT files are NOT pinctrl-%d. So back when we merged
> this, Rob and I agreed [0-8] was good enough for now and we can add
> more if we needed to. Also, when I checked back then, all the
> pinctrl-5+ properties ended up pointing to the same suppliers as the
> lower numbered ones. So it didn't make a difference.
>
> Ok, I just checked linux-next all the pinctrl-9+ instances and it's
> still true that they all point to the same supplier pointed to by
> pinctrl-[0-8].
>
> So yeah, it looks fragile,
And feels fragile, adds into confusion, etc.
Please, consider redesigning this to be more robust.
> but is not broken and it's more efficient
> than looking for pinctrl-%d or adding more pinctrl-xx entries. So,
> let's fix it if it actually breaks? Not going to oppose a patch if
> anyone wants to make it more complete.
>
> > > where driver_deferred_probe_check_state() is called before the supplier
> > > has probed successfully or before deferred probe timeout has expired.
> > >
> > > So, delete the call and replace it with -ENODEV.
--
With Best Regards,
Andy Shevchenko
next prev parent reply other threads:[~2022-06-06 10:20 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-26 8:15 [RFC PATCH v1 0/9] deferred_probe_timeout logic clean up Saravana Kannan
2022-05-26 8:15 ` [RFC PATCH v1 1/9] PM: domains: Delete usage of driver_deferred_probe_check_state() Saravana Kannan
2022-05-26 8:15 ` [RFC PATCH v1 2/9] pinctrl: devicetree: " Saravana Kannan
2022-05-30 9:22 ` Geert Uytterhoeven
2022-06-05 3:41 ` Saravana Kannan
2022-06-06 10:17 ` Andy Shevchenko [this message]
2022-05-26 8:15 ` [RFC PATCH v1 3/9] net: mdio: " Saravana Kannan
2022-05-26 8:15 ` [RFC PATCH v1 4/9] Revert "driver core: Set default deferred_probe_timeout back to 0." Saravana Kannan
2022-05-30 9:12 ` Geert Uytterhoeven
2022-06-05 3:18 ` Saravana Kannan
2022-06-05 4:12 ` Saravana Kannan
2022-05-26 8:15 ` [RFC PATCH v1 5/9] driver core: Set fw_devlink.strict=1 by default Saravana Kannan
2022-05-26 8:15 ` [RFC PATCH v1 6/9] iommu/of: Delete usage of driver_deferred_probe_check_state() Saravana Kannan
2022-05-26 8:15 ` [RFC PATCH v1 7/9] driver core: Add fw_devlink_unblock_may_probe() helper function Saravana Kannan
2022-05-30 9:46 ` Andy Shevchenko
2022-05-26 8:15 ` [RFC PATCH v1 8/9] net: ipconfig: Force fw_devlink to unblock any devices that might probe Saravana Kannan
2022-06-07 12:36 ` Geert Uytterhoeven
2022-05-26 8:15 ` [RFC PATCH v1 9/9] driver core: Delete driver_deferred_probe_check_state() Saravana Kannan
2022-05-30 8:49 ` [RFC PATCH v1 0/9] deferred_probe_timeout logic clean up Sebastian Andrzej Siewior
2022-06-05 3:45 ` Saravana Kannan
2022-05-30 9:38 ` Geert Uytterhoeven
2022-06-05 3:47 ` 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=Yp3UNAW5Zv+RjabA@smile.fi.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=andrew@lunn.ch \
--cc=bigeasy@linutronix.de \
--cc=broonie@kernel.org \
--cc=davem@davemloft.net \
--cc=djrscally@gmail.com \
--cc=dsahern@kernel.org \
--cc=edumazet@google.com \
--cc=geert@linux-m68k.org \
--cc=gregkh@linuxfoundation.org \
--cc=heikki.krogerus@linux.intel.com \
--cc=hkallweit1@gmail.com \
--cc=iommu@lists.linux-foundation.org \
--cc=joro@8bytes.org \
--cc=jstultz@google.com \
--cc=kernel-team@android.com \
--cc=khilman@kernel.org \
--cc=kuba@kernel.org \
--cc=len.brown@intel.com \
--cc=linus.walleij@linaro.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=nathan@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=pavel@ucw.cz \
--cc=rafael@kernel.org \
--cc=robh@kernel.org \
--cc=sakari.ailus@linux.intel.com \
--cc=saravanak@google.com \
--cc=ulf.hansson@linaro.org \
--cc=will@kernel.org \
--cc=yoshfuji@linux-ipv6.org \
--cc=yoshihiro.shimoda.uh@renesas.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).