Hi Fabrizio, On Thu, Dec 6, 2018 at 10:47 AM Fabrizio Castro <fabrizio.castro@xxxxxxxxxxxxxx> wrote: > > From: Linus Walleij <linus.walleij@xxxxxxxxxx> > > Sent: 05 December 2018 21:46 > > Subject: Re: [RFC v3 1/2] pinctrl: core: Add pinctrl_mux_gpio_request_enable > > > > On Tue, Nov 20, 2018 at 4:19 PM Fabrizio Castro > > <fabrizio.castro@xxxxxxxxxxxxxx> wrote: > > > > > Sometimes there is the need to change the muxing of a pin to make it > > > a GPIO without going through gpiolib. > > > This patch adds pinctrl_mux_gpio_request_enable to deal with this new > > > use case from code that has nothing to do with pinctrl. > > > > It has a lot to do with pinctrl I think, so I get confused by this > > commit message. > > I can improve that > > > > > > extern int pinctrl_gpio_request(unsigned gpio); > > > +extern int pinctrl_mux_gpio_request_enable(unsigned gpio); > > > > What's wrong with just using the existing call > > pinctrl_gpio_request() right above your new one? > > > > It's not like we're reference counting or something, it's just > > a callback. Sprinkle some comments to show what's going > > on. > > I tried that, and it was working for me, then something changed lately > in gpiolib that broke that solution, and Geert picked it up on his end. > Please see this: > https://patchwork.kernel.org/patch/10671325/ > > This patch was made to overcome the problems of the previous patch. > > > > > If you for some reason need a new call for this specific > > use case, it needs to be named after the use case, > > like pinctrl_gpio_request_for_irq() > > so it is obvious what the function is doing. > > I can do that, but I would like to hear from Geert first, no point in going > around in circle if this solution is not acceptable to him. > > Geert, what do you think? /me gives v3 a try on Koelsch, Salvator-XS, and Ebisu-4D: BUG: sleeping function called from invalid context for mmc, adv7511, gpio-keys, and Ethernet PHY. 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