[PATCH v3 01/14] gpio: regmap: set gpio_chip of_node
Michael Walle
michael at walle.cc
Wed Mar 3 15:39:08 GMT 2021
Am 2021-03-03 16:27, schrieb Linus Walleij:
> On Wed, Mar 3, 2021 at 3:23 PM Álvaro Fernández Rojas
> <noltari at 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 at 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
More information about the linux-arm-kernel
mailing list