linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Michael Walle <michael@walle.cc>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: "Álvaro Fernández Rojas" <noltari@gmail.com>,
	"Rob Herring" <robh+dt@kernel.org>,
	"Bartosz Golaszewski" <bgolaszewski@baylibre.com>,
	"Florian Fainelli" <f.fainelli@gmail.com>,
	bcm-kernel-feedback-list <bcm-kernel-feedback-list@broadcom.com>,
	"Jonas Gorski" <jonas.gorski@gmail.com>,
	"Necip Fazil Yildiran" <fazilyildiran@gmail.com>,
	"open list:GPIO SUBSYSTEM" <linux-gpio@vger.kernel.org>,
	"open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS"
	<devicetree@vger.kernel.org>,
	linux-kernel@vger.kernel.org,
	"Linux ARM" <linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH v3 01/14] gpio: regmap: set gpio_chip of_node
Date: Wed, 03 Mar 2021 16:39:08 +0100	[thread overview]
Message-ID: <ab50e6dddcbf418a41d39cc09356834a@walle.cc> (raw)
In-Reply-To: <CACRpkdb56dB+f89Neuix=KKtAsYSTHKuCifhmmzN7jy2LuUbdQ@mail.gmail.com>

Am 2021-03-03 16:27, schrieb Linus Walleij:
> On Wed, Mar 3, 2021 at 3:23 PM Álvaro Fernández Rojas 
> <noltari@gmail.com> wrote:
> 
>> This is needed for properly registering gpio regmap as a child of a 
>> regmap
>> pin controller.
>> 
>> Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
>> ---
>>  v3: introduce patch needed for properly parsing gpio-ranges.
> 
> Oops a little bug. I suggest that I merge this into the pinctrl tree
> together with the rest of the patches when we are done with review.

Ha, I've just debugged this because it puzzled me why it was working
for me.

I was about to suggesting using the following instead:
chip->of_node = config->of_node ?: dev_of_node(config->parent);

It turns out this is already done in of_gpio_dev_init():
https://elixir.bootlin.com/linux/v5.12-rc1/source/drivers/gpio/gpiolib-of.c#L1043

So config->of_node is still optional. But I'm not sure if we
should add the line above for clarity in gpio-regmap.c.

-michael

  reply	other threads:[~2021-03-03 18:52 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-03 14:22 [PATCH v3 00/14] pinctrl: add BCM63XX pincontrol support Álvaro Fernández Rojas
2021-03-03 14:22 ` [PATCH v3 01/14] gpio: regmap: set gpio_chip of_node Álvaro Fernández Rojas
2021-03-03 15:27   ` Linus Walleij
2021-03-03 15:39     ` Michael Walle [this message]
2021-03-03 16:08   ` Michael Walle
2021-03-03 16:12     ` Álvaro Fernández Rojas
2021-03-04  8:13       ` Linus Walleij
2021-03-04  8:27         ` Álvaro Fernández Rojas
2021-03-03 14:22 ` [PATCH v3 02/14] pinctrl: bcm: add bcm63xx base code Álvaro Fernández Rojas
2021-03-03 14:22 ` [PATCH v3 03/14] Documentation: add BCM6328 pincontroller binding documentation Álvaro Fernández Rojas
2021-03-03 14:23 ` [PATCH v3 04/14] pinctrl: add a pincontrol driver for BCM6328 Álvaro Fernández Rojas
2021-03-03 14:23 ` [PATCH v3 05/14] Documentation: add BCM6358 pincontroller binding documentation Álvaro Fernández Rojas
2021-03-03 14:23 ` [PATCH v3 06/14] pinctrl: add a pincontrol driver for BCM6358 Álvaro Fernández Rojas
2021-03-03 14:23 ` [PATCH v3 07/14] Documentation: add BCM6362 pincontroller binding documentation Álvaro Fernández Rojas
2021-03-03 14:23 ` [PATCH v3 08/14] pinctrl: add a pincontrol driver for BCM6362 Álvaro Fernández Rojas
2021-03-03 14:23 ` [PATCH v3 09/14] Documentation: add BCM6368 pincontroller binding documentation Álvaro Fernández Rojas
2021-03-03 14:23 ` [PATCH v3 10/14] pinctrl: add a pincontrol driver for BCM6368 Álvaro Fernández Rojas
2021-03-03 14:23 ` [PATCH v3 11/14] Documentation: add BCM63268 pincontroller binding documentation Álvaro Fernández Rojas
2021-03-03 14:23 ` [PATCH v3 12/14] pinctrl: add a pincontrol driver for BCM63268 Álvaro Fernández Rojas
2021-03-03 14:23 ` [PATCH v3 13/14] Documentation: add BCM6318 pincontroller binding documentation Álvaro Fernández Rojas
2021-03-03 14:23 ` [PATCH v3 14/14] pinctrl: add a pincontrol driver for BCM6318 Álvaro Fernández Rojas
2021-03-03 15:29 ` [PATCH v3 00/14] pinctrl: add BCM63XX pincontrol support Linus Walleij
2021-03-03 16:23   ` Álvaro Fernández Rojas
2021-03-04  0:13     ` Linus Walleij

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=ab50e6dddcbf418a41d39cc09356834a@walle.cc \
    --to=michael@walle.cc \
    --cc=bcm-kernel-feedback-list@broadcom.com \
    --cc=bgolaszewski@baylibre.com \
    --cc=devicetree@vger.kernel.org \
    --cc=f.fainelli@gmail.com \
    --cc=fazilyildiran@gmail.com \
    --cc=jonas.gorski@gmail.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=noltari@gmail.com \
    --cc=robh+dt@kernel.org \
    /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).