linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Cc: Marek Szyprowski <m.szyprowski@samsung.com>,
	Qianggui Song <qianggui.song@amlogic.com>,
	Geert Uytterhoeven <geert+renesas@glider.be>,
	Krzysztof Kozlowski <krzk@kernel.org>,
	Marc Zyngier <maz@kernel.org>,
	Fabien Dessenne <fabien.dessenne@foss.st.com>,
	Linus Walleij <linus.walleij@linaro.org>,
	"open list:GPIO SUBSYSTEM" <linux-gpio@vger.kernel.org>,
	linux-arm Mailing List <linux-arm-kernel@lists.infradead.org>,
	linux-amlogic <linux-amlogic@lists.infradead.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	OpenBMC Maillist <openbmc@lists.ozlabs.org>,
	Linux-Renesas <linux-renesas-soc@vger.kernel.org>,
	Linux Samsung SOC <linux-samsung-soc@vger.kernel.org>,
	linux-stm32@st-md-mailman.stormreply.com,
	Neil Armstrong <narmstrong@baylibre.com>,
	Kevin Hilman <khilman@baylibre.com>,
	Jerome Brunet <jbrunet@baylibre.com>,
	Andrew Lunn <andrew@lunn.ch>,
	Gregory Clement <gregory.clement@bootlin.com>,
	Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>,
	Avi Fishman <avifishman70@gmail.com>,
	Tomer Maimon <tmaimon77@gmail.com>,
	Tali Perry <tali.perry1@gmail.com>,
	Patrick Venture <venture@google.com>,
	Nancy Yuen <yuenn@google.com>,
	Benjamin Fair <benjaminfair@google.com>,
	Tomasz Figa <tomasz.figa@gmail.com>,
	Sylwester Nawrocki <s.nawrocki@samsung.com>,
	Alim Akhtar <alim.akhtar@samsung.com>,
	Maxime Coquelin <mcoquelin.stm32@gmail.com>,
	Alexandre Torgue <alexandre.torgue@foss.st.com>,
	Bartosz Golaszewski <brgl@bgdev.pl>,
	Philipp Zabel <p.zabel@pengutronix.de>
Subject: Re: [PATCH v4 11/13] pinctrl: meson: Replace custom code by gpiochip_node_count() call
Date: Thu, 14 Apr 2022 21:33:11 +0300	[thread overview]
Message-ID: <Ylho5+teMJGxooYI@smile.fi.intel.com> (raw)
In-Reply-To: <Ylhnzg3bvbrfpoFi@smile.fi.intel.com>

On Thu, Apr 14, 2022 at 09:28:30PM +0300, Andy Shevchenko wrote:
> On Thu, Apr 14, 2022 at 07:06:21PM +0300, Andy Shevchenko wrote:
> > On Thu, Apr 14, 2022 at 6:32 PM Martin Blumenstingl
> > <martin.blumenstingl@googlemail.com> wrote:
> > > On Thu, Apr 14, 2022 at 3:51 PM Andy Shevchenko
> > > <andy.shevchenko@gmail.com> wrote:
> > > [...]
> > > > > This patch landed in linux next-20220413 as commit 88834c75cae5
> > > > > ("pinctrl: meson: Replace custom code by gpiochip_node_count() call").
> > > > > Unfortunately it breaks booting of all my Amlogic-based test boards
> > > > > (Odroid C4, N2, Khadas VIM3, VIM3l). MMC driver is no longer probed and
> > > > > boards are unable to mount rootfs. Reverting this patch on top of
> > > > > linux-next fixes the issue.
> > > >
> > > > Thank you for letting me know, I'll withdraw it and investigate.
> > > If needed I can investigate further later today/tomorrow. I think the
> > > problem is that our node name doesn't follow the .dts recommendation.
> > >
> > > For GXL (arch/arm64/boot/dts/amlogic/meson-gxl.dtsi) the GPIO
> > > controller nodes are for example:
> > >   gpio: bank@4b0 {
> > >       ...
> > >   }
> > > and
> > >   gpio_ao: bank@14 {
> > >       ...
> > >   }
> > >
> > > See also:
> > > $ git grep -C6 gpio-controller arch/arm64/boot/dts/amlogic/*.dtsi
> > >
> > > Marek did not state which error he's getting but I suspect it fails
> > > with "no gpio node found".
> > 
> > Would be interesting to know that, yeah.
> > 
> > The subtle difference between the patched and unpatched version is
> > that the former uses only available nodes, it means that node is not
> > available by some reason and then the error would be the one you
> > guessed.
> 
> Looking into the difference between iterating via available nodes I have found
> nothing suspicious. Your DTSes do not have status property, so it assumes the
> node is available.
> 
> I'm quite puzzled what's going on there. Because I can't see what the logical
> difference the patch brought in.
> 
> P.S. In any case it's withdrawn now and shouldn't appear in the next Linux
> Next. But I would really appreciate more input on this.

Okay, now I got it. The "name" of the node is not the same as containing the
property with a given name. So, the faulting line of the code is this one:

gpio_np = to_of_node(device_get_named_child_node(pc->dev, "gpio-controller"));


-- 
With Best Regards,
Andy Shevchenko



  reply	other threads:[~2022-04-14 18:33 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-01 10:35 [PATCH v4 00/13] gpiolib: Two new helpers and way toward fwnode Andy Shevchenko
2022-04-01 10:35 ` [PATCH v4 01/13] gpiolib: Introduce for_each_gpiochip_node() loop helper Andy Shevchenko
2022-04-05 12:12   ` Bartosz Golaszewski
2022-04-01 10:35 ` [PATCH v4 02/13] gpiolib: Introduce gpiochip_node_count() helper Andy Shevchenko
2022-04-05 12:13   ` Bartosz Golaszewski
2022-04-01 10:35 ` [PATCH v4 03/13] pinctrl: stm32: Replace custom code by gpiochip_node_count() call Andy Shevchenko
2022-04-01 10:35 ` [PATCH v4 04/13] pinctrl: stm32: Switch to use for_each_gpiochip_node() helper Andy Shevchenko
2022-04-01 10:35 ` [PATCH v4 05/13] pinctrl: samsung: " Andy Shevchenko
2022-04-08 15:22   ` Krzysztof Kozlowski
2022-04-08 15:39     ` Andy Shevchenko
2022-04-09 13:33       ` Krzysztof Kozlowski
2022-04-11 11:56         ` Andy Shevchenko
2022-04-11 12:03           ` Krzysztof Kozlowski
2022-04-11 12:21   ` Krzysztof Kozlowski
2022-04-11 13:13     ` Andy Shevchenko
2022-04-01 10:35 ` [PATCH v4 06/13] pinctrl: renesas: rza1: Replace custom code by gpiochip_node_count() call Andy Shevchenko
2022-04-01 10:35 ` [PATCH v4 07/13] pinctrl: renesas: rza1: Switch to use for_each_gpiochip_node() helper Andy Shevchenko
2022-04-01 10:35 ` [PATCH v4 08/13] pinctrl: npcm7xx: " Andy Shevchenko
2022-04-01 10:36 ` [PATCH v4 09/13] pinctrl: meson: Rename REG_* to MESON_REG_* Andy Shevchenko
2022-04-11  9:04   ` Geert Uytterhoeven
2022-04-11 10:19     ` Andy Shevchenko
2022-04-11 11:41       ` Andy Shevchenko
2022-04-01 10:36 ` [PATCH v4 10/13] pinctrl: meson: Enable COMPILE_TEST Andy Shevchenko
2022-04-01 10:36 ` [PATCH v4 11/13] pinctrl: meson: Replace custom code by gpiochip_node_count() call Andy Shevchenko
2022-04-14  6:38   ` Marek Szyprowski
2022-04-14 13:51     ` Andy Shevchenko
2022-04-14 15:32       ` Martin Blumenstingl
2022-04-14 16:06         ` Andy Shevchenko
2022-04-14 18:28           ` Andy Shevchenko
2022-04-14 18:33             ` Andy Shevchenko [this message]
2022-04-01 10:36 ` [PATCH v4 12/13] pinctrl: armada-37xx: Switch to use fwnode instead of of_node Andy Shevchenko
2022-04-01 10:36 ` [PATCH v4 13/13] pinctrl: armada-37xx: Reuse GPIO fwnode in armada_37xx_irqchip_register() Andy Shevchenko
2022-04-11 11:59 ` [PATCH v4 00/13] gpiolib: Two new helpers and way toward fwnode Andy Shevchenko

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=Ylho5+teMJGxooYI@smile.fi.intel.com \
    --to=andriy.shevchenko@linux.intel.com \
    --cc=alexandre.torgue@foss.st.com \
    --cc=alim.akhtar@samsung.com \
    --cc=andrew@lunn.ch \
    --cc=avifishman70@gmail.com \
    --cc=benjaminfair@google.com \
    --cc=brgl@bgdev.pl \
    --cc=fabien.dessenne@foss.st.com \
    --cc=geert+renesas@glider.be \
    --cc=gregory.clement@bootlin.com \
    --cc=jbrunet@baylibre.com \
    --cc=khilman@baylibre.com \
    --cc=krzk@kernel.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-amlogic@lists.infradead.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=linux-stm32@st-md-mailman.stormreply.com \
    --cc=m.szyprowski@samsung.com \
    --cc=martin.blumenstingl@googlemail.com \
    --cc=maz@kernel.org \
    --cc=mcoquelin.stm32@gmail.com \
    --cc=narmstrong@baylibre.com \
    --cc=openbmc@lists.ozlabs.org \
    --cc=p.zabel@pengutronix.de \
    --cc=qianggui.song@amlogic.com \
    --cc=s.nawrocki@samsung.com \
    --cc=sebastian.hesselbarth@gmail.com \
    --cc=tali.perry1@gmail.com \
    --cc=tmaimon77@gmail.com \
    --cc=tomasz.figa@gmail.com \
    --cc=venture@google.com \
    --cc=yuenn@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).