All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stephen Boyd <swboyd@chromium.org>
To: Akash Asthana <akashast@codeaurora.org>, gregkh@linuxfoundation.org
Cc: linux-arm-msm@vger.kernel.org, linux-serial@vger.kernel.org,
	mgautam@codeaurora.org, msavaliy@codeaurora.org,
	Akash Asthana <akashast@codeaurora.org>
Subject: Re: [PATCH v5 2/3] tty: serial: qcom_geni_serial: Wakeup over UART RX
Date: Thu, 14 Nov 2019 09:40:44 -0800	[thread overview]
Message-ID: <5dcd919d.1c69fb81.1c304.2dc5@mx.google.com> (raw)
In-Reply-To: <1573642136-30488-1-git-send-email-akashast@codeaurora.org>

Quoting Akash Asthana (2019-11-13 02:48:56)
> Add system wakeup capability over UART RX line for wakeup capable UART.
> When system is suspended, RX line act as an interrupt to wakeup system
> for any communication requests from peer.

How does the RX line get remuxed as a GPIO interrupt here? Is that
through some pinctrl magic in DT or just via enabling/disabling the
interrupt?

> 
> diff --git a/drivers/tty/serial/qcom_geni_serial.c b/drivers/tty/serial/qcom_geni_serial.c
> index 634054a..56dad67 100644
> --- a/drivers/tty/serial/qcom_geni_serial.c
> +++ b/drivers/tty/serial/qcom_geni_serial.c
> @@ -1321,6 +1327,23 @@ static int qcom_geni_serial_probe(struct platform_device *pdev)
>                 return ret;
>         }
>  
> +       if (port->wakeup_irq > 0) {
> +               /*
> +                * Set pm_runtime status as ACTIVE so that wakeup_irq gets
> +                * enabled/disabled from dev_pm_arm_wake_irq  during  system
> +                * suspend/resume respectively.
> +                */
> +               pm_runtime_set_active(&pdev->dev);

We can always set this device as active regardless of wakeup interrupt,
right? Can we move this call outside of this if?

> +               device_init_wakeup(&pdev->dev, true);
> +               ret = dev_pm_set_dedicated_wake_irq(&pdev->dev,
> +                                               port->wakeup_irq);
> +               if (ret) {
> +                       device_init_wakeup(&pdev->dev, false);
> +                       uart_remove_one_port(drv, uport);
> +                       return ret;
> +               }
> +       }
> +
>         return ret;
>  }
>  

  reply	other threads:[~2019-11-14 17:40 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-13 10:48 Akash Asthana
2019-11-14 17:40 ` Stephen Boyd [this message]
2019-11-15 10:00   ` Akash Asthana
2019-11-15 19:41     ` Stephen Boyd
2019-11-22  6:46       ` Akash Asthana
     [not found]       ` <0101016e91dcbb45-f54cf6e5-8ace-457a-96cc-edec41305719-000000@us-west-2.amazonses.com>
2019-11-22 18:24         ` Stephen Boyd

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5dcd919d.1c69fb81.1c304.2dc5@mx.google.com \
    --to=swboyd@chromium.org \
    --cc=akashast@codeaurora.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=mgautam@codeaurora.org \
    --cc=msavaliy@codeaurora.org \
    --subject='Re: [PATCH v5 2/3] tty: serial: qcom_geni_serial: Wakeup over UART RX' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.