Linux-Media Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH 0/2] add generic DT binding for RTS/CTS
@ 2020-05-20 13:39 Erwan Le Ray
  2020-05-20 13:39 ` [PATCH 1/2] dt-bindings: serial: add generic DT binding for announcing RTS/CTS lines Erwan Le Ray
  2020-05-20 13:39 ` [PATCH 2/2] serial: stm32: Use " Erwan Le Ray
  0 siblings, 2 replies; 3+ messages in thread
From: Erwan Le Ray @ 2020-05-20 13:39 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Rob Herring, Mark Rutland, Maxime Coquelin,
	Alexandre Torgue, Sumit Semwal
  Cc: linux-serial, linux-stm32, linux-arm-kernel, linux-kernel,
	linux-media, dri-devel, linaro-mm-sig, Erwan Le Ray,
	Fabrice Gasnier

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.

Erwan Le Ray (2):
  dt-bindings: serial: add generic DT binding for announcing RTS/CTS
    lines
  serial: stm32: Use generic DT binding for announcing RTS/CTS lines

 Documentation/devicetree/bindings/serial/st,stm32-uart.yaml | 4 +++-
 drivers/tty/serial/stm32-usart.c                            | 5 +++--
 2 files changed, 6 insertions(+), 3 deletions(-)

-- 
2.17.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH 1/2] dt-bindings: serial: add generic DT binding for announcing RTS/CTS lines
  2020-05-20 13:39 [PATCH 0/2] add generic DT binding for RTS/CTS Erwan Le Ray
@ 2020-05-20 13:39 ` Erwan Le Ray
  2020-05-20 13:39 ` [PATCH 2/2] serial: stm32: Use " Erwan Le Ray
  1 sibling, 0 replies; 3+ messages in thread
From: Erwan Le Ray @ 2020-05-20 13:39 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Rob Herring, Mark Rutland, Maxime Coquelin,
	Alexandre Torgue, Sumit Semwal
  Cc: linux-serial, linux-stm32, linux-arm-kernel, linux-kernel,
	linux-media, dri-devel, linaro-mm-sig, Erwan Le Ray,
	Fabrice Gasnier

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>

diff --git a/Documentation/devicetree/bindings/serial/st,stm32-uart.yaml b/Documentation/devicetree/bindings/serial/st,stm32-uart.yaml
index 75b8521eb7cb..06d5f251ec88 100644
--- a/Documentation/devicetree/bindings/serial/st,stm32-uart.yaml
+++ b/Documentation/devicetree/bindings/serial/st,stm32-uart.yaml
@@ -35,9 +35,11 @@ properties:
     description: label associated with this uart
 
   st,hw-flow-ctrl:
-    description: enable hardware flow control
+    description: enable hardware flow control (deprecated)
     $ref: /schemas/types.yaml#/definitions/flag
 
+  uart-has-rtscts: true
+
   dmas:
     minItems: 1
     maxItems: 2
-- 
2.17.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH 2/2] serial: stm32: Use generic DT binding for announcing RTS/CTS lines
  2020-05-20 13:39 [PATCH 0/2] add generic DT binding for RTS/CTS Erwan Le Ray
  2020-05-20 13:39 ` [PATCH 1/2] dt-bindings: serial: add generic DT binding for announcing RTS/CTS lines Erwan Le Ray
@ 2020-05-20 13:39 ` Erwan Le Ray
  1 sibling, 0 replies; 3+ messages in thread
From: Erwan Le Ray @ 2020-05-20 13:39 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Rob Herring, Mark Rutland, Maxime Coquelin,
	Alexandre Torgue, Sumit Semwal
  Cc: linux-serial, linux-stm32, linux-arm-kernel, linux-kernel,
	linux-media, dri-devel, linaro-mm-sig, Erwan Le Ray,
	Fabrice Gasnier

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>

diff --git a/drivers/tty/serial/stm32-usart.c b/drivers/tty/serial/stm32-usart.c
index 17c2f3276888..9cfcf355567a 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;
-- 
2.17.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, back to index

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-20 13:39 [PATCH 0/2] add generic DT binding for RTS/CTS Erwan Le Ray
2020-05-20 13:39 ` [PATCH 1/2] dt-bindings: serial: add generic DT binding for announcing RTS/CTS lines Erwan Le Ray
2020-05-20 13:39 ` [PATCH 2/2] serial: stm32: Use " Erwan Le Ray

Linux-Media Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-media/0 linux-media/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-media linux-media/ https://lore.kernel.org/linux-media \
		linux-media@vger.kernel.org
	public-inbox-index linux-media

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-media


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git