Skip to content

Commit

Permalink
serial: 8250_uniphier: add auto-flow-control support
Browse files Browse the repository at this point in the history
Add selective auto-flow-control support for UniPhier serial driver.

Signed-off-by: Dai Okamura <okamura.dai@socionext.com>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Dai Okamura authored and Greg Kroah-Hartman committed Oct 2, 2018
1 parent aca70d1 commit aad2d49
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Documentation/devicetree/bindings/serial/uniphier-uart.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ Required properties:
- interrupts: a single interrupt specifier.
- clocks: phandle to the input clock.

Optional properties:
-auto-flow-control: enable automatic flow control support.

Example:
aliases {
serial0 = &serial0;
Expand Down
3 changes: 3 additions & 0 deletions drivers/tty/serial/8250/8250_uniphier.c
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,9 @@ static int uniphier_uart_probe(struct platform_device *pdev)
up.port.flags = UPF_FIXED_PORT | UPF_FIXED_TYPE;
up.capabilities = UART_CAP_FIFO;

if (of_property_read_bool(dev->of_node, "auto-flow-control"))
up.capabilities |= UART_CAP_AFE;

up.port.serial_in = uniphier_serial_in;
up.port.serial_out = uniphier_serial_out;
up.dl_read = uniphier_serial_dl_read;
Expand Down

0 comments on commit aad2d49

Please sign in to comment.