提交 465d3b3a 编写于 作者: J Johan Hovold

USB: serial: xr: fix gpio-mode handling

Fix the gpio-mode handling so that all the pins are under driver control
(i.e. in gpio mode) when hardware flow control is disabled.

This is specifically needed to be able to control RTS.

Fixes: c2d405aa ("USB: serial: add MaxLinear/Exar USB to Serial driver")
Signed-off-by: NJohan Hovold <johan@kernel.org>
上级 736c0931
......@@ -408,14 +408,11 @@ static void xr_set_flow_mode(struct tty_struct *tty,
if (ret)
return;
/* Set GPIO mode for controlling the pins manually by default. */
gpio_mode &= ~XR21V141X_UART_MODE_GPIO_MASK;
if (C_CRTSCTS(tty)) {
dev_dbg(&port->dev, "Enabling hardware flow ctrl\n");
/*
* RTS/CTS is the default flow control mode, so set GPIO mode
* for controlling the pins manually by default.
*/
gpio_mode &= ~XR21V141X_UART_MODE_GPIO_MASK;
gpio_mode |= XR21V141X_UART_MODE_RTS_CTS;
flow = XR21V141X_UART_FLOW_MODE_HW;
} else if (I_IXON(tty)) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册