Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

serial: sirf: Use generic uart-has-rtscts DT property

Convert the SiRF UART driver from using the vendor-specific
"sirf,uart-has-rtscts" to the generic "uart-has-rtscts" DT property, as
documented by the Generic Serial DT Bindings.

The old vendor-specific property is still recognized by the driver for
backwards compatibility, but deprecated.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Geert Uytterhoeven and committed by
Greg Kroah-Hartman
7f60830a af99c187

+6 -5
+4 -4
Documentation/devicetree/bindings/serial/sirf-uart.txt
··· 9 9 - clocks : Should contain uart clock number 10 10 11 11 Optional properties: 12 - - sirf,uart-has-rtscts: we have hardware flow controller pins in hardware 13 - - rts-gpios: RTS pin for USP-based UART if sirf,uart-has-rtscts is true 14 - - cts-gpios: CTS pin for USP-based UART if sirf,uart-has-rtscts is true 12 + - uart-has-rtscts: we have hardware flow controller pins in hardware 13 + - rts-gpios: RTS pin for USP-based UART if uart-has-rtscts is true 14 + - cts-gpios: CTS pin for USP-based UART if uart-has-rtscts is true 15 15 16 16 Example: 17 17 ··· 28 28 29 29 usp@b0090000 { 30 30 compatible = "sirf,prima2-usp-uart"; 31 - sirf,uart-has-rtscts; 31 + uart-has-rtscts; 32 32 rts-gpios = <&gpio 15 0>; 33 33 cts-gpios = <&gpio 46 0>; 34 34 };
+2 -1
drivers/tty/serial/sirfsoc_uart.c
··· 1293 1293 sirfport->uart_reg = (struct sirfsoc_uart_register *)match->data; 1294 1294 1295 1295 sirfport->hw_flow_ctrl = 1296 - of_property_read_bool(np, "sirf,uart-has-rtscts"); 1296 + of_property_read_bool(np, "uart-has-rtscts") || 1297 + of_property_read_bool(np, "sirf,uart-has-rtscts") /* deprecated */; 1297 1298 if (of_device_is_compatible(np, "sirf,prima2-uart") || 1298 1299 of_device_is_compatible(np, "sirf,atlas7-uart")) 1299 1300 sirfport->uart_reg->uart_type = SIRF_REAL_UART;