From: Linus Walleij <linus.walleij@linaro.org>
To: ilina@codeaurora.org, Hans Verkuil <hverkuil@xs4all.nl>,
Hans Verkuil <hans.verkuil@cisco.com>
Cc: Marc Zyngier <marc.zyngier@arm.com>,
Bjorn Andersson <bjorn.andersson@linaro.org>,
Stephen Boyd <sboyd@kernel.org>,
evgreen@chromium.org, rplsssn@codeaurora.org,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
linux-arm-msm@vger.kernel.org,
Rajendra Nayak <rnayak@codeaurora.org>,
"open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS"
<devicetree@vger.kernel.org>, Andy Gross <andy.gross@linaro.org>,
Doug Anderson <dianders@chromium.org>
Subject: Re: [PATCH v2 1/5] drivers: pinctrl: qcom: add wakeup capability to GPIO
Date: Sun, 26 Aug 2018 16:33:15 +0200 [thread overview]
Message-ID: <CACRpkdb+Opdn1eWZSRydS1Bafpqwcg83xEcT-YJC6D-kSSi1ew@mail.gmail.com> (raw)
In-Reply-To: <20180817163849.30750-2-ilina@codeaurora.org>
On Fri, Aug 17, 2018 at 6:39 PM Lina Iyer <ilina@codeaurora.org> wrote:
> QCOM SoC's that have Power Domain Controller (PDC) chip in the always-on
> domain can wakeup the SoC, when interrupts and GPIOs are routed to the
> its interrupt controller. Only select GPIOs that are deemed wakeup
> capable are routed to specific PDC pins. During low power state, the
> pinmux interrupt controller may be non-functional but the PDC would be.
> The PDC can detect the wakeup GPIO is triggered and bring the TLMM to an
> operational state.
>
> Interrupts that are level triggered will be detected at the TLMM when
> the controller becomes operational. Edge interrupts however need to be
> replayed again.
>
> Request the corresponding PDC IRQ, when the GPIO is requested as an IRQ,
> but keep it disabled. During suspend, we can enable the PDC IRQ instead
> of the GPIO IRQ, which may or not be detected.
>
> Signed-off-by: Lina Iyer <ilina@codeaurora.org>
> ---
> Changes in v1:
> - Trigger GPIO in h/w from PDC IRQ handler
> - Avoid big tables for GPIO-PDC map, pick from DT instead
> - Use handler_data
Just for the record this is an impressive and much needed patch
set, no other SoC developer has yet taken on the task of making this
work so I very much appreciate that Qualcomm show the way.
> +static int msm_gpio_pdc_pin_request(struct irq_data *d)
> +static int msm_gpio_pdc_pin_release(struct irq_data *d)
> +static int msm_gpio_irq_reqres(struct irq_data *d)
> +{
(...)
> + if (gpiochip_lock_as_irq(gc, irqd_to_hwirq(d))) {
(...)
> +static void msm_gpio_irq_relres(struct irq_data *d)
> +{
> + gpiochip_unlock_as_irq(gc, irqd_to_hwirq(d));
> +}
FYI Hans Verkuil is working on a patch set that moves the
lock/unlock as IRQ call to the irqchip request() and release()
functions so we can switch a GPIO irqchip line from IRQ
mode to say output at runtime without too much trouble.
(CEC needs this.)
I suspect that will make your work easier?
Hans can you include Lina in the loop for your patches
so she can take that into accoun because I think we might
need that as a base for this.
Yours,
Linus Walleij
next prev parent reply other threads:[~2018-08-26 14:33 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-17 16:38 [PATCH v2 0/5] Wakeup GPIO support for SDM845 SoC Lina Iyer
2018-08-17 16:38 ` [PATCH v2 1/5] drivers: pinctrl: qcom: add wakeup capability to GPIO Lina Iyer
2018-08-21 6:08 ` Bjorn Andersson
2018-08-27 16:51 ` Lina Iyer
2018-08-26 14:33 ` Linus Walleij [this message]
2018-08-27 16:56 ` Lina Iyer
2018-08-28 0:26 ` Bjorn Andersson
2018-08-28 1:46 ` Lina Iyer
2018-08-28 3:20 ` Bjorn Andersson
2018-08-17 16:38 ` [PATCH v2 2/5] dt-bindings: pinctrl: add wakeup capable GPIOs for SDM845 Lina Iyer
2018-08-17 16:38 ` [PATCH v2 3/5] drivers: pinctrl: msm: enable PDC interrupt only during suspend Lina Iyer
2018-08-17 16:38 ` [PATCH v2 4/5] drivers: pinctrl: qcom: sdm845: support GPIO wakeup from suspend Lina Iyer
2018-08-17 16:38 ` [PATCH v2 5/5] arm64: dts: qcom: add wake up interrupts for GPIOs for SDM845 Lina Iyer
2018-08-17 19:31 ` [PATCH v2 0/5] Wakeup GPIO support for SDM845 SoC Lina Iyer
-- strict thread matches above, loose matches on Subject: below --
2018-08-24 20:01 Lina Iyer
2018-08-24 20:01 ` [PATCH v2 1/5] drivers: pinctrl: qcom: add wakeup capability to GPIO Lina Iyer
2018-08-27 22:35 ` Matthias Kaehlcke
2018-09-04 17:51 ` Lina Iyer
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=CACRpkdb+Opdn1eWZSRydS1Bafpqwcg83xEcT-YJC6D-kSSi1ew@mail.gmail.com \
--to=linus.walleij@linaro.org \
--cc=andy.gross@linaro.org \
--cc=bjorn.andersson@linaro.org \
--cc=devicetree@vger.kernel.org \
--cc=dianders@chromium.org \
--cc=evgreen@chromium.org \
--cc=hans.verkuil@cisco.com \
--cc=hverkuil@xs4all.nl \
--cc=ilina@codeaurora.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=marc.zyngier@arm.com \
--cc=rnayak@codeaurora.org \
--cc=rplsssn@codeaurora.org \
--cc=sboyd@kernel.org \
/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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).