Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1579567

Re: [PATCH] serial: st-asc: Use new GPIOD API to obtain RTS pin

From Lee Jones <lee.jones@linaro.org>
Newsgroups linux.kernel
Subject Re: [PATCH] serial: st-asc: Use new GPIOD API to obtain RTS pin
Date 2017-02-13 11:00 +0100
Message-ID <talAn-1ZB-41@gated-at.bofh.it> (permalink)
References <t8sPD-4lA-1@gated-at.bofh.it> <t8wJA-6VL-13@gated-at.bofh.it> <t8Aav-Kl-45@gated-at.bofh.it> <t8Sh4-3NI-7@gated-at.bofh.it> <t8SK6-3XY-19@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Thu, 09 Feb 2017, Greg KH wrote:

> On Thu, Feb 09, 2017 at 08:21:50AM +0000, Lee Jones wrote:
> > On Wed, 08 Feb 2017, Greg KH wrote:
> > 
> > > On Wed, Feb 08, 2017 at 09:24:25AM +0000, Lee Jones wrote:
> > > > The commits mentioned below adapt the GPIO API to allow more information
> > > > to be passed directly through devm_get_gpiod_from_child() in the first
> > > > instance.  This facilitates the removal of subsequent calls, such as
> > > > gpiod_direction_output().  This patch firstly moves to utilise the new
> > > > API and secondly removes the now superfluous call do set the direction.
> > > > 
> > > > Fixes: a264d10ff45c ("gpiolib: Convert fwnode_get_named_gpiod() to configure GPIO")
> > > > Fixes: b2987d7438e0 ("gpio: Pass GPIO label down to gpiod_request")
> > > > Fixes: 4b0947974e59 ("gpio: Rename devm_get_gpiod_from_child()")
> > > > Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
> > > > Suggested-by: Boris Brezillon <boris.brezillon@free-electrons.com>
> > > > Signed-off-by: Lee Jones <lee.jones@linaro.org>
> > > > ---
> > > >  drivers/tty/serial/st-asc.c | 11 ++++++-----
> > > >  1 file changed, 6 insertions(+), 5 deletions(-)
> > > > 
> > > > diff --git a/drivers/tty/serial/st-asc.c b/drivers/tty/serial/st-asc.c
> > > > index bcf1d33..c334bcc 100644
> > > > --- a/drivers/tty/serial/st-asc.c
> > > > +++ b/drivers/tty/serial/st-asc.c
> > > > @@ -575,12 +575,13 @@ static void asc_set_termios(struct uart_port *port, struct ktermios *termios,
> > > >  			pinctrl_select_state(ascport->pinctrl,
> > > >  					     ascport->states[NO_HW_FLOWCTRL]);
> > > >  
> > > > -			gpiod =	devm_get_gpiod_from_child(port->dev, "rts",
> > > > -							  &np->fwnode);
> > > > -			if (!IS_ERR(gpiod)) {
> > > > -				gpiod_direction_output(gpiod, 0);
> > > > +			gpiod = devm_fwnode_get_gpiod_from_child(port->dev,
> > > > +								 "rts",
> > > > +								 &np->fwnode,
> > > > +								 GPIOD_OUT_LOW,
> > > > +								 np->name);
> > > 
> > > I can't apply this :(
> > > 
> > > Usually, when you move apis around, you add it, then convert it, wait a
> > > kernel release, then remove the old one.  That allows for issues like
> > > this when new code is added in one maintainer's branch but not yours.
> > > 
> > > So how about reverting your "drop the function" patch and then wait for
> > > -rc2 to really remove it?
> > 
> > I assume this is a question for LinusW?
> 
> It's for whom ever is causing this breakage by removing an api in this
> manner.

+1

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

linux-next: build failure after merge of the gpio tree Stephen Rothwell <sfr@canb.auug.org.au> - 2017-02-08 06:20 +0100
  Re: linux-next: build failure after merge of the gpio tree Lee Jones <lee.jones@linaro.org> - 2017-02-08 10:00 +0100
    Re: linux-next: build failure after merge of the gpio tree Boris Brezillon <boris.brezillon@free-electrons.com> - 2017-02-08 10:20 +0100
    Re: linux-next: build failure after merge of the gpio tree Stephen Rothwell <sfr@canb.auug.org.au> - 2017-02-08 11:40 +0100
  [PATCH] serial: st-asc: Use new GPIOD API to obtain RTS pin Lee Jones <lee.jones@linaro.org> - 2017-02-08 10:30 +0100
    Re: [PATCH] serial: st-asc: Use new GPIOD API to obtain RTS pin Greg KH <greg@kroah.com> - 2017-02-08 14:10 +0100
      Re: [PATCH] serial: st-asc: Use new GPIOD API to obtain RTS pin Lee Jones <lee.jones@linaro.org> - 2017-02-09 09:30 +0100
        Re: [PATCH] serial: st-asc: Use new GPIOD API to obtain RTS pin Greg KH <greg@kroah.com> - 2017-02-09 10:00 +0100
          Re: [PATCH] serial: st-asc: Use new GPIOD API to obtain RTS pin Lee Jones <lee.jones@linaro.org> - 2017-02-13 11:00 +0100
      Re: [PATCH] serial: st-asc: Use new GPIOD API to obtain RTS pin Linus Walleij <linus.walleij@linaro.org> - 2017-02-21 11:30 +0100
  Re: linux-next: build failure after merge of the gpio tree Linus Walleij <linus.walleij@linaro.org> - 2017-02-13 16:30 +0100

csiph-web