lkml.org 
[lkml]   [2020]   [May]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v3 3/5] serial: 8250: Support separate rs485 rx-enable GPIO
On Mon, May 18, 2020 at 10:04:05AM +0200, Heiko Stübner wrote:
> Am Montag, 18. Mai 2020, 06:50:06 CEST schrieb Lukas Wunner:
> > On Sun, May 17, 2020 at 11:56:08PM +0200, Heiko Stuebner wrote:
> > > @@ -1457,6 +1458,7 @@ void serial8250_em485_stop_tx(struct uart_8250_port *p)
> > > * Enable previously disabled RX interrupts.
> > > */
> > > if (!(p->port.rs485.flags & SER_RS485_RX_DURING_TX)) {
> > > + gpiod_set_value(port->rs485_re_gpio, 1);
> > > serial8250_clear_and_reinit_fifos(p);
> > >
> > > p->ier |= UART_IER_RLSI | UART_IER_RDI;
> >
> > The added line needs to be conditional on if (port->rs485_re_gpio)
> > because the gpiod could be NULL and gpiod_set_value() doesn't check
> > for that.
>
> Need to look deeper at the other comment below, but gpiod_set_value does
> check for NULL ;-)

I'll be damned. That means I should respin my patch [4/4] and
drop the NULL check. :-/

Thanks!

Lukas

\
 
 \ /
  Last update: 2020-05-18 11:20    [W:0.118 / U:0.036 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site