serial: Add common rs485 device tree parsing function

Several drivers have the same device tree parsing code. Create
a common helper function for it.

This patch bases on work done by Sascha Hauer.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Uwe Kleine-König 2017-09-13 10:18:27 +02:00 committed by Greg Kroah-Hartman
parent c45e2d2547
commit ef838a81dd
2 changed files with 41 additions and 0 deletions

View file

@ -501,4 +501,9 @@ static inline int uart_handle_break(struct uart_port *port)
(cflag) & CRTSCTS || \
!((cflag) & CLOCAL))
/*
* Common device tree parsing helpers
*/
void of_get_rs485_mode(struct device_node *np, struct serial_rs485 *rs485conf);
#endif /* LINUX_SERIAL_CORE_H */