Hi Fabrizio, On Fri, Oct 26, 2018 at 9:57 PM Fabrizio Castro <fabrizio.castro@xxxxxxxxxxxxxx> wrote: > There are cases when the bootloader configures a pin to work > as a function rather than GPIO, and other cases when the pin > is configured as a function at POR. > This commit makes sure the pin is configured as a GPIO the > moment we need it to work as an interrupt. > > Signed-off-by: Fabrizio Castro <fabrizio.castro@xxxxxxxxxxxxxx> > --- > > Dear All, > > we have got some issues while trying to bring up the interrupt > line of the HDMI transmitter on the iwg23s, as GP2_29 is configured > as a function when the kernel starts, and therefore setting up the > interrupt from the driver won't have the desired effect. > This patch makes sure the pinctrl driver sets GP2[29] to GP-2-29 > before enabling the interrupt, but it doesn't addresses the > "direction problem", as in the pin will be a GPIO after calling > gc->request, but the direction would be whatever was previously > configured. There could be the option of moving the additional > code added by this patch to the bottom of function > gpio_rcar_irq_set_type, but is that going to behave properly on > every SoC this driver is supporting? > Is configuring every gpio with direction input while probing > something that should be looked into to reduce concerns over > switching from function to GPIO? Configuring everything to input may cause issues where a GPIO is connected to the reset line of an external device, and where the bootloader configured the line to deassert the reset. Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds