summaryrefslogtreecommitdiffstats
path: root/drivers/tty
diff options
context:
space:
mode:
authorErwan Le Ray <erwan.leray@st.com>2020-05-20 15:39:32 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-07-01 15:19:39 +0200
commit6fd9fffb6ff54fdb19b57ecb927fe15e99b0b24d (patch)
tree8a5df6dae3feb9766a4b9a3b6c51c32418c1a739 /drivers/tty
parentb2cc2b5111db43b35b5de7252127bbc8d6806e34 (diff)
downloadlinux-6fd9fffb6ff54fdb19b57ecb927fe15e99b0b24d.tar.bz2
serial: stm32: Use generic DT binding for announcing RTS/CTS lines
Add support of generic DT binding for annoucing RTS/CTS lines. The initial binding 'st,hw-flow-control' is not needed anymore since generic binding is available, but is kept for backward compatibility. Signed-off-by: Erwan Le Ray <erwan.leray@st.com> Link: https://lore.kernel.org/r/20200520133932.30441-3-erwan.leray@st.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty')
-rw-r--r--drivers/tty/serial/stm32-usart.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/tty/serial/stm32-usart.c b/drivers/tty/serial/stm32-usart.c
index 8602ff357321..d1c5e536a167 100644
--- a/drivers/tty/serial/stm32-usart.c
+++ b/drivers/tty/serial/stm32-usart.c
@@ -1033,8 +1033,9 @@ static struct stm32_port *stm32_of_get_stm32_port(struct platform_device *pdev)
if (WARN_ON(id >= STM32_MAX_PORTS))
return NULL;
- stm32_ports[id].hw_flow_control = of_property_read_bool(np,
- "st,hw-flow-ctrl");
+ stm32_ports[id].hw_flow_control =
+ of_property_read_bool (np, "st,hw-flow-ctrl") /*deprecated*/ ||
+ of_property_read_bool (np, "uart-has-rtscts");
stm32_ports[id].port.line = id;
stm32_ports[id].cr1_irq = USART_CR1_RXNEIE;
stm32_ports[id].cr3_irq = 0;