Hello, I just noticed that drivers/tty/serial/etraxfs-uart.c (introduced in commit 692132b5b1c5 (serial: driver for ETRAX FS UART) for 4.0-rc1) doesn't use the gpiod stuff correctly and does strange things with the modem status lines. In etraxfs_uart_probe it calls up->dtr_pin = devm_gpiod_get_optional(&pdev->dev, "dtr"); without further checking of the result. The only other usage of the dtr_pin member is: static unsigned int etraxfs_uart_get_mctrl(struct uart_port *port) { ... if (up->dtr_pin && !gpiod_get_raw_value(up->dtr_pin)) ret |= TIOCM_DTR; ... } and a similar construct in .set_mctrl. There are several problems: - get_mctrl isn't about DTR; - the dtr_pin gpiod doesn't have a direction set; - devm_gpiod_get_optional might return ERR_PTR(-ESOMETHING) and gpiod_get_raw_value isn't able to handle that; and - instead of explicitly coding gpio mctrl lines, serial_mctrl_gpio should be used. The other 3 gpiods requested have similar problems. Who cares for that? Best regards Uwe -- Pengutronix e.K. | Uwe Kleine-König | Industrial Linux Solutions | http://www.pengutronix.de/ | -- To unsubscribe from this list: send the line "unsubscribe linux-serial" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html