linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] soc/tegra: pmc: Add Tegra234 wake events
@ 2022-01-25  5:57 Kartik
  2022-02-25 13:09 ` Thierry Reding
  0 siblings, 1 reply; 2+ messages in thread
From: Kartik @ 2022-01-25  5:57 UTC (permalink / raw)
  To: thierry.reding, jonathanh, digetx, ulf.hansson,
	christophe.jaillet, kkartik, andriy.shevchenko, jckuo,
	caihuoqing, linux-tegra, linux-kernel

From: kartik <kkartik@nvidia.com>

Enable the Tegra RTC alarm and power key wake-ups for Tegra234

Signed-off-by: kartik <kkartik@nvidia.com>
---
 drivers/soc/tegra/pmc.c | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/drivers/soc/tegra/pmc.c b/drivers/soc/tegra/pmc.c
index 5aceacb..0edb7f8 100644
--- a/drivers/soc/tegra/pmc.c
+++ b/drivers/soc/tegra/pmc.c
@@ -3,7 +3,7 @@
  * drivers/soc/tegra/pmc.c
  *
  * Copyright (c) 2010 Google, Inc
- * Copyright (c) 2018-2020, NVIDIA CORPORATION. All rights reserved.
+ * Copyright (c) 2018-2022, NVIDIA CORPORATION. All rights reserved.
  *
  * Author:
  *	Colin Cross <ccross@google.com>
@@ -54,6 +54,7 @@
 #include <dt-bindings/pinctrl/pinctrl-tegra-io-pad.h>
 #include <dt-bindings/gpio/tegra186-gpio.h>
 #include <dt-bindings/gpio/tegra194-gpio.h>
+#include <dt-bindings/gpio/tegra234-gpio.h>
 #include <dt-bindings/soc/tegra-pmc.h>
 
 #define PMC_CNTRL			0x0
@@ -3788,6 +3789,11 @@ static const char * const tegra234_reset_sources[] = {
 	"FUSECRC",
 };
 
+static const struct tegra_wake_event tegra234_wake_events[] = {
+	TEGRA_WAKE_GPIO("power", 29, 1, TEGRA234_AON_GPIO(EE, 4)),
+	TEGRA_WAKE_IRQ("rtc", 73, 10),
+};
+
 static const struct tegra_pmc_soc tegra234_pmc_soc = {
 	.supports_core_domain = false,
 	.num_powergates = 0,
@@ -3812,8 +3818,8 @@ static const struct tegra_pmc_soc tegra234_pmc_soc = {
 	.num_reset_sources = ARRAY_SIZE(tegra234_reset_sources),
 	.reset_levels = tegra186_reset_levels,
 	.num_reset_levels = ARRAY_SIZE(tegra186_reset_levels),
-	.num_wake_events = 0,
-	.wake_events = NULL,
+	.num_wake_events = ARRAY_SIZE(tegra234_wake_events),
+	.wake_events = tegra234_wake_events,
 	.pmc_clks_data = NULL,
 	.num_pmc_clks = 0,
 	.has_blink_output = false,
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] soc/tegra: pmc: Add Tegra234 wake events
  2022-01-25  5:57 [PATCH] soc/tegra: pmc: Add Tegra234 wake events Kartik
@ 2022-02-25 13:09 ` Thierry Reding
  0 siblings, 0 replies; 2+ messages in thread
From: Thierry Reding @ 2022-02-25 13:09 UTC (permalink / raw)
  To: Kartik
  Cc: jonathanh, digetx, ulf.hansson, christophe.jaillet,
	andriy.shevchenko, jckuo, caihuoqing, linux-tegra, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 350 bytes --]

On Tue, Jan 25, 2022 at 11:27:42AM +0530, Kartik wrote:
> From: kartik <kkartik@nvidia.com>
> 
> Enable the Tegra RTC alarm and power key wake-ups for Tegra234
> 
> Signed-off-by: kartik <kkartik@nvidia.com>
> ---
>  drivers/soc/tegra/pmc.c | 12 +++++++++---
>  1 file changed, 9 insertions(+), 3 deletions(-)

Applied, thanks.

Thierry

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-02-25 13:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-25  5:57 [PATCH] soc/tegra: pmc: Add Tegra234 wake events Kartik
2022-02-25 13:09 ` Thierry Reding

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).