All of lore.kernel.org
 help / color / mirror / Atom feed
From: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Linus Walleij <linus.walleij@linaro.org>,
	Geert Uytterhoeven <geert+renesas@glider.be>,
	Bartosz Golaszewski <bgolaszewski@baylibre.com>,
	"open list:GPIO SUBSYSTEM" <linux-gpio@vger.kernel.org>,
	Simon Horman <horms@verge.net.au>,
	Chris Paterson <Chris.Paterson2@renesas.com>,
	Biju Das <biju.das@bp.renesas.com>,
	Linux-Renesas <linux-renesas-soc@vger.kernel.org>
Subject: RE: [RFC v3 1/2] pinctrl: core: Add pinctrl_mux_gpio_request_enable
Date: Fri, 1 Mar 2019 14:22:10 +0000	[thread overview]
Message-ID: <TYXPR01MB17759188A1AF01DB4444BC29C0760@TYXPR01MB1775.jpnprd01.prod.outlook.com> (raw)
In-Reply-To: <CAMuHMdUxcxRJv_H+_25pavjeJOKoEihrjBQTxjWR-fe9x5rBNw@mail.gmail.com>

Hello Geert,

Thank you for your feedback!

> From: linux-renesas-soc-owner@vger.kernel.org <linux-renesas-soc-owner@vger.kernel.org> On Behalf Of Geert Uytterhoeven
> Sent: 01 March 2019 13:28
> Subject: Re: [RFC v3 1/2] pinctrl: core: Add pinctrl_mux_gpio_request_enable
> 
> Hi Fabrizio,
> 
> On Thu, Dec 6, 2018 at 10:47 AM Fabrizio Castro
> <fabrizio.castro@bp.renesas.com> wrote:
> > > From: Linus Walleij <linus.walleij@linaro.org>
> > > 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@bp.renesas.com> 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.

Doh! It was running smoothly on my iwg23s when I tested it, I am going to
have another look at this at a later stage.

Thank you for looking into this!

Cheers,
Fab

> 
> Gr{oetje,eeting}s,
> 
>                         Geert
> 
> 
> --
> Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
> 
> 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

  reply	other threads:[~2019-03-01 14:22 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-20 15:19 [RFC v3 0/2] Request GPIO when enabling interrupt Fabrizio Castro
2018-11-20 15:19 ` [RFC v3 1/2] pinctrl: core: Add pinctrl_mux_gpio_request_enable Fabrizio Castro
2018-12-05 21:46   ` Linus Walleij
2018-12-06  9:47     ` Fabrizio Castro
2019-03-01 13:27       ` Geert Uytterhoeven
2019-03-01 14:22         ` Fabrizio Castro [this message]
2019-03-08  8:24         ` Linus Walleij
2018-11-20 15:19 ` [RFC v3 2/2] gpio: rcar: Set pin as a GPIO when configuring an interrupt Fabrizio Castro

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=TYXPR01MB17759188A1AF01DB4444BC29C0760@TYXPR01MB1775.jpnprd01.prod.outlook.com \
    --to=fabrizio.castro@bp.renesas.com \
    --cc=Chris.Paterson2@renesas.com \
    --cc=bgolaszewski@baylibre.com \
    --cc=biju.das@bp.renesas.com \
    --cc=geert+renesas@glider.be \
    --cc=geert@linux-m68k.org \
    --cc=horms@verge.net.au \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-renesas-soc@vger.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.