[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2abe2137e699e5ae3100b97316da469f6d1c9bb9.camel@linux.intel.com>
Date: Wed, 06 Jun 2018 16:11:46 +0300
From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To: Giulio Benetti <giulio.benetti@...ronovasrl.com>
Cc: matwey.kornilov@...il.com,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Jiri Slaby <jslaby@...e.com>,
Matthias Brugger <mbrugger@...e.com>,
Kees Cook <keescook@...omium.org>,
Allen Pais <allen.lkml@...il.com>, Sean Young <sean@...s.org>,
"open list:SERIAL DRIVERS" <linux-serial@...r.kernel.org>,
open list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 1/4] serial: 8250: Copy em485 from port to real port.
On Wed, 2018-06-06 at 14:15 +0200, Giulio Benetti wrote:
> Il 06/06/2018 13:56, Andy Shevchenko ha scritto:
> > On Wed, 2018-06-06 at 11:49 +0200, Giulio Benetti wrote:
> > > em485 gets lost during
> > >
> > > Copy em485 to final uart port.
> > >
> >
> > Is it needed at all?
> >
> > The individual driver decides either to use software emulation (and
> > calls explicitly serial8250_em485_init() for that) or do HW assisted
> > stuff.
>
> In 8250_dw.c, during probe(), I need to call dw8250_rs485_config()
> against local struct uart_8250_port uart = {};
> Inside serial8250_register_8250_port() not all uart fields are
> copied(em485 too).
> So after probe, em485 is NULL.
>
> Another way could be to call dw8250_rs485_config() against real uart
> port, after calling serial8250_register_8250_port(),
> would it make sense?
Look at OMAP case closely. They have a callback to configure RS485 which
is called in uart_set_rs485_config() which is called whenever user
space does TIOCGRS485 IOCTL.
So, it's completely driven by user space which makes sense by my
opinion.
--
Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Intel Finland Oy
Powered by blists - more mailing lists