All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thierry Reding <thierry.reding@gmail.com>
To: Linus Walleij <linus.walleij@linaro.org>,
	Thierry Reding <thierry.reding@gmail.com>
Cc: Thomas Gleixner <tglx@linutronix.de>,
	devicetree@vger.kernel.org, linux-tegra@vger.kernel.org,
	linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 5/9] soc/tegra: pmc: Add initial Tegra194 wake events
Date: Fri, 21 Sep 2018 12:25:42 +0200	[thread overview]
Message-ID: <20180921102546.12745-6-thierry.reding@gmail.com> (raw)
In-Reply-To: <20180921102546.12745-1-thierry.reding@gmail.com>

From: Thierry Reding <treding@nvidia.com>

Tegra194 supports 96 wake events in total. Many of them are never used,
so only the most common ones (RTC alarm and power key) are currently
defined.

Signed-off-by: Thierry Reding <treding@nvidia.com>
---
 drivers/soc/tegra/pmc.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/soc/tegra/pmc.c b/drivers/soc/tegra/pmc.c
index 42e7deb6de74..efe990985fe6 100644
--- a/drivers/soc/tegra/pmc.c
+++ b/drivers/soc/tegra/pmc.c
@@ -54,6 +54,7 @@
 #include <dt-bindings/interrupt-controller/arm-gic.h>
 #include <dt-bindings/pinctrl/pinctrl-tegra-io-pad.h>
 #include <dt-bindings/gpio/tegra186-gpio.h>
+#include <dt-bindings/gpio/tegra194-gpio.h>
 
 #define PMC_CNTRL			0x0
 #define  PMC_CNTRL_INTR_POLARITY	BIT(17) /* inverts INTR polarity */
@@ -2426,6 +2427,11 @@ static const struct tegra_io_pad_soc tegra194_io_pads[] = {
 	{ .id = TEGRA_IO_PAD_AUDIO_HV, .dpd = 61, .voltage = UINT_MAX },
 };
 
+static const struct tegra_wake_event tegra194_wake_events[] = {
+	TEGRA_WAKE_GPIO("power", 29, 1, TEGRA194_AON_GPIO(EE, 4)),
+	TEGRA_WAKE_IRQ("rtc", 73, 10),
+};
+
 static const struct tegra_pmc_soc tegra194_pmc_soc = {
 	.num_powergates = 0,
 	.powergates = NULL,
@@ -2438,6 +2444,8 @@ static const struct tegra_pmc_soc tegra194_pmc_soc = {
 	.regs = &tegra186_pmc_regs,
 	.init = NULL,
 	.setup_irq_polarity = tegra186_pmc_setup_irq_polarity,
+	.num_wake_events = ARRAY_SIZE(tegra194_wake_events),
+	.wake_events = tegra194_wake_events,
 };
 
 static const struct of_device_id tegra_pmc_match[] = {
-- 
2.19.0

  parent reply	other threads:[~2018-09-21 10:25 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-21 10:25 [PATCH 0/9] Implement wake event support on Tegra186 and later Thierry Reding
2018-09-21 10:25 ` [PATCH 1/9] dt-bindings: tegra186-pmc: Add interrupt controller properties Thierry Reding
2018-10-15 14:47   ` Rob Herring
2018-10-15 14:47     ` Rob Herring
2018-09-21 10:25 ` [PATCH 2/9] soc/tegra: pmc: Add Tegra194 support Thierry Reding
2018-09-21 10:25 ` [PATCH 3/9] soc/tegra: pmc: Add wake event support Thierry Reding
2018-09-21 10:35   ` Mikko Perttunen
2018-09-21 10:25 ` [PATCH 4/9] soc/tegra: pmc: Add initial Tegra186 wake events Thierry Reding
2018-09-21 10:25 ` Thierry Reding [this message]
2018-09-21 10:25 ` [PATCH 6/9] gpio: Add support for hierarchical IRQ domains Thierry Reding
2018-09-25  8:11   ` Linus Walleij
2018-09-25  8:11     ` Linus Walleij
2018-09-25  9:33     ` Thierry Reding
2018-09-25  9:33       ` Thierry Reding
2018-09-25 10:33       ` Linus Walleij
2018-09-25 10:33         ` Linus Walleij
2018-09-25 11:17         ` Thierry Reding
2018-09-25 11:17           ` Thierry Reding
2018-10-03  7:52           ` Linus Walleij
2018-10-03  7:52             ` Linus Walleij
2018-09-21 10:25 ` [PATCH 7/9] dt-bindings: tegra186-gpio: Add wakeup parent support Thierry Reding
2018-09-21 10:37   ` Mikko Perttunen
2018-10-15 14:46   ` Rob Herring
2018-11-28 10:44     ` Thierry Reding
2018-09-21 10:25 ` [PATCH 8/9] gpio: tegra186: Rename flow variable to type Thierry Reding
2018-09-21 10:25 ` [PATCH 9/9] gpio: tegra186: Implement wake event support Thierry Reding
2018-09-25  8:48 ` [PATCH 0/9] Implement wake event support on Tegra186 and later Linus Walleij
2018-09-25  8:48   ` Linus Walleij
2018-09-25  9:57   ` Thierry Reding
2018-09-25  9:57     ` Thierry Reding
2018-09-25 17:16     ` Lina Iyer
2018-09-25 17:16       ` Lina Iyer
2018-09-25 17:16       ` Lina Iyer
2018-10-08  7:14       ` Stephen Boyd
2018-10-08  7:14         ` Stephen Boyd
2018-10-09 12:58         ` Marc Zyngier
2018-10-09 12:58           ` Marc Zyngier

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=20180921102546.12745-6-thierry.reding@gmail.com \
    --to=thierry.reding@gmail.com \
    --cc=devicetree@vger.kernel.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=tglx@linutronix.de \
    /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 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.