lkml.org 
[lkml]   [2011]   [Dec]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH RESEND 6/8] serial: 8250: update rs485 flags with polarity settings
On Fri,  9 Dec 2011 18:07:18 +0100
Wolfram Sang <w.sang@pengutronix.de> wrote:

> Report the only mode we can support with the 16C850.
>
> Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
> ---
> drivers/tty/serial/8250.c | 3 +++
> 1 files changed, 3 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/tty/serial/8250.c b/drivers/tty/serial/8250.c
> index 28b3608..8cf6d76 100644
> --- a/drivers/tty/serial/8250.c
> +++ b/drivers/tty/serial/8250.c
> @@ -2750,6 +2750,9 @@ static int serial8250_ioctl_port(struct uart_port *port,
> serial_outp(up, UART_LCR, lcr);
> spin_unlock_irqrestore(&up->port.lock, flags);
>
> + /* only mode supported by the 16C850 */
> + rs485ctrl.flags &= ~SER_RS485_RTS_ON_SEND;
> + rs485ctrl.flags |= SER_RS485_RTS_AFTER_SEND;
> up->rs485_flags = rs485ctrl.flags;

Chip specific stuff all wants to be in a port method so while #3 sorts
out much of #2 this goes back to wanting port-> methods and flags to
avoid assumptions about chip types in the core bits.

#7 really makes the point why it is needed.

So pardon the confused series of review comments but I think the summary
is port->ops for RS485 stuff please.



\
 
 \ /
  Last update: 2011-12-09 20:15    [W:0.080 / U:4.960 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site