serial: 8250_dw: allow enable rs485 at boot time

A patch from »serial: 8250: Add rs485 emulation to 8250_dw« in state Mainline for linux-kernel

From: Giulio Benetti <giulio.benetti@...> Date: Wed, 6 Jun 2018 11:51:51 +0200

Commit-Message

If "linux,rs485-enabled-at-boot-time" is specified need to setup 485 in probe function. Call uart_get_rs485_mode() to get rs485 configuration, then call rs485_config() callback directly to setup port as rs485. Signed-off-by: Giulio Benetti <giulio.benetti@...> Signed-off-by: Heiko Stuebner <heiko.stuebner@...>

Patch-Comment

drivers/tty/serial/8250/8250_dw.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)

Statistics

  • 3 lines added
  • 1 lines removed

Changes

---------------------- drivers/tty/serial/8250/8250_dw.c -----------------------
index 7023b656658d..c771faeaa260 100644
@@ -550,8 +550,10 @@ static int dw8250_probe(struct platform_device *pdev)
if (data->uart_16550_compatible)
p->handle_irq = NULL;
- if (!data->skip_autocfg)
+ if (!data->skip_autocfg) {
dw8250_setup_port(p);
+ uart_get_rs485_mode(dev, &p->rs485);
+ }
/* If we have a valid fifosize, try hooking up DMA */
if (p->fifosize) {
 
 

Recent Patches

About Us

Sed lacus. Donec lectus. Nullam pretium nibh ut turpis. Nam bibendum. In nulla tortor, elementum vel, tempor at, varius non, purus. Mauris vitae nisl nec metus placerat consectetuer.

Read More...