Re: [PATCH] tty: serial: qcom_geni_serial: Add support for flow control

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Jul 13, 2018 at 3:17 PM Karthikeyan Ramasubramanian
<kramasub@xxxxxxxxxxxxxx> wrote:
>
> From: Girish Mahadevan <girishm@xxxxxxxxxxxxxx>
>
> Add support for flow control functionality in the GENI serial driver
> and also support for non-console higher baud rate(upto 4Mbps) usecases.
>
> Signed-off-by: Girish Mahadevan <girishm@xxxxxxxxxxxxxx>
> Signed-off-by: Mohammed Khajapasha <mkhaja@xxxxxxxxxxxxxx>
> Signed-off-by: Karthikeyan Ramasubramanian <kramasub@xxxxxxxxxxxxxx>
> ---
>  .../devicetree/bindings/soc/qcom/qcom,geni-se.txt  |   2 +-
>  drivers/tty/serial/qcom_geni_serial.c              | 261 ++++++++++++++++++---
>  2 files changed, 231 insertions(+), 32 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/soc/qcom/qcom,geni-se.txt b/Documentation/devicetree/bindings/soc/qcom/qcom,geni-se.txt
> index d330c73..a9eeca2 100644
> --- a/Documentation/devicetree/bindings/soc/qcom/qcom,geni-se.txt
> +++ b/Documentation/devicetree/bindings/soc/qcom/qcom,geni-se.txt
> @@ -46,7 +46,7 @@ Child nodes should conform to I2C bus binding as described in i2c.txt.
>  Qualcomm Technologies Inc. GENI Serial Engine based UART Controller
>
>  Required properties:
> -- compatible:          Must be "qcom,geni-debug-uart".
> +- compatible:          Must be "qcom,geni-debug-uart" or "qcom,geni-uart".
>  - reg:                         Must contain UART register location and length.
>  - interrupts:          Must contain UART core interrupts.
>  - clock-names:         Must contain "se".
> diff --git a/drivers/tty/serial/qcom_geni_serial.c b/drivers/tty/serial/qcom_geni_serial.c
> index c62e17c..29ec343 100644
> --- a/drivers/tty/serial/qcom_geni_serial.c
> +++ b/drivers/tty/serial/qcom_geni_serial.c
...
> @@ -1154,7 +1332,17 @@ static int __maybe_unused qcom_geni_serial_sys_suspend_noirq(struct device *dev)
>         struct qcom_geni_serial_port *port = dev_get_drvdata(dev);
>         struct uart_port *uport = &port->uport;
>
> -       uart_suspend_port(uport->private_data, uport);
> +       if (uart_console(uport)) {
> +               uart_suspend_port(uport->private_data, uport);
> +       } else {
> +               struct uart_state *state = uport->state;
> +               /*
> +                * If the port is open, deny system suspend.
> +                */
> +               if (state->pm_state == UART_PM_STATE_ON)
> +                       return -EBUSY;

Why is this needed? Isn't it still possible to suspend with an open
UART? I don't see any other UARTs doing this.



[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux PPP]     [Linux FS]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Linmodem]     [Device Mapper]     [Linux Kernel for ARM]

  Powered by Linux