Commit 4f4c90bb authored by Ilpo Järvinen's avatar Ilpo Järvinen Committed by Greg Kroah-Hartman

serial: 8250_lpc18cc: Fill in rs485_supported

Add information on supported serial_rs485 features.
Signed-off-by: default avatarIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Link: https://lore.kernel.org/r/20220606100433.13793-10-ilpo.jarvinen@linux.intel.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 70780464
...@@ -98,6 +98,12 @@ static void lpc18xx_uart_serial_out(struct uart_port *p, int offset, int value) ...@@ -98,6 +98,12 @@ static void lpc18xx_uart_serial_out(struct uart_port *p, int offset, int value)
writel(value, p->membase + offset); writel(value, p->membase + offset);
} }
static const struct serial_rs485 lpc18xx_rs485_supported = {
.flags = SER_RS485_ENABLED | SER_RS485_RTS_ON_SEND | SER_RS485_RTS_AFTER_SEND,
.delay_rts_after_send = 1,
/* Delay RTS before send is not supported */
};
static int lpc18xx_serial_probe(struct platform_device *pdev) static int lpc18xx_serial_probe(struct platform_device *pdev)
{ {
struct lpc18xx_uart_data *data; struct lpc18xx_uart_data *data;
...@@ -168,6 +174,7 @@ static int lpc18xx_serial_probe(struct platform_device *pdev) ...@@ -168,6 +174,7 @@ static int lpc18xx_serial_probe(struct platform_device *pdev)
uart.port.uartclk = clk_get_rate(data->clk_uart); uart.port.uartclk = clk_get_rate(data->clk_uart);
uart.port.private_data = data; uart.port.private_data = data;
uart.port.rs485_config = lpc18xx_rs485_config; uart.port.rs485_config = lpc18xx_rs485_config;
uart.port.rs485_supported = &lpc18xx_rs485_supported;
uart.port.serial_out = lpc18xx_uart_serial_out; uart.port.serial_out = lpc18xx_uart_serial_out;
uart.dma = &data->dma; uart.dma = &data->dma;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment