Message ID | 20210303142310.6371-1-noltari@gmail.com |
---|---|
Headers | show |
Series | pinctrl: add BCM63XX pincontrol support | expand |
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. Yours. Linus Walleij
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
Hi Linus, > El 3 mar 2021, a las 16:29, Linus Walleij <linus.walleij@linaro.org> escribió: > > On Wed, Mar 3, 2021 at 3:23 PM Álvaro Fernández Rojas <noltari@gmail.com> wrote: > >> v3: introduce new files for shared code and add more changes suggested by >> Linus Walleij. Also add a new patch needed for properly parsing gpio-ranges. > > This looks very appetizing, I am ready to merge this once we cut some > slack for DT review (a week or two). > > I'd like to merge it soon so you can start working on the IRQ add-on. > > I'd probably drop the IRQ-related selects from Kconfig > when applying though (no big deal, no need to resend over that). About that, it seems that GPIO_REGMAP should select GPIOLIB_IRQCHIP, since I couldn’t build the kernel due to the following error when I removed the IRQ-related selects: LD vmlinux.o MODPOST vmlinux.symvers MODINFO modules.builtin.modinfo GEN modules.builtin LD .tmp_vmlinux.kallsyms1 mips-linux-gnu-ld: drivers/gpio/gpio-regmap.o: in function `gpio_regmap_register': gpio-regmap.c:(.text+0x704): undefined reference to `gpiochip_irqchip_add_domain' make: *** [Makefile:1197: vmlinux] Error 1 Or maybe we could guard these lines of gpio-regmap.c with #ifdef GPIOLIB_IRQCHIP: https://github.com/torvalds/linux/blob/f69d02e37a85645aa90d18cacfff36dba370f797/drivers/gpio/gpio-regmap.c#L282-L286 > > Yours, > Linus Walleij Best regards, Álvaro.
On Wed, Mar 3, 2021 at 5:12 PM Álvaro Fernández Rojas <noltari@gmail.com> wrote: > Do you want me to send v4 with these changes? > Or maybe just this single patch? It's usually better to resend the series because then the b4 tool will pick it all up properly. Yours, Linus Walleij