Skip to contentSkip to conversation

soc/tegra: pmc: Add SD wake event for Tegra234

PATCH In review Petlozu Pravareshwar 2 participants 5 messages Feb 16, 2024 Tegra architecture support

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 soc/tegra: pmc: Add SD wake event for Tegra234

From: Prathamesh Shete <[email protected]>

Add SD wake event for Tegra234 so that system can be woken up from suspend when SD card hot-plug/unplug event is detected.

---
 drivers/soc/tegra/pmc.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/soc/tegra/pmc.c +2 -1
index 6dfcc7f50ece..dc4eab3191c2 100644
@@ -3,7 +3,7 @@
  * drivers/soc/tegra/pmc.c
  *
  * Copyright (c) 2010 Google, Inc
- * Copyright (c) 2018-2023, NVIDIA CORPORATION. All rights reserved.
+ * Copyright (c) 2018-2024, NVIDIA CORPORATION. All rights reserved.
  *
  * Author:
  *	Colin Cross <[email protected]>
@@ -4199,6 +4199,7 @@ static const struct tegra_wake_event tegra234_wake_events[] = {
 	TEGRA_WAKE_IRQ("pmu", 24, 209),
 	TEGRA_WAKE_GPIO("power", 29, 1, TEGRA234_AON_GPIO(EE, 4)),
 	TEGRA_WAKE_GPIO("mgbe", 56, 0, TEGRA234_MAIN_GPIO(Y, 3)),
+	TEGRA_WAKE_GPIO("sd_wake", 8, 0, TEGRA234_MAIN_GPIO(G, 7)),
 	TEGRA_WAKE_IRQ("rtc", 73, 10),
 	TEGRA_WAKE_IRQ("sw-wake", SW_WAKE_ID, 179),
 };
Signature · 1 line
2.43.0
#1 lore raw
Quoted 25 lines · Petlozu Pravareshwar

From: Prathamesh Shete <[email protected]>

Add SD wake event for Tegra234 so that system can be woken up from suspend when SD card hot-plug/unplug event is detected.

---
 drivers/soc/tegra/pmc.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/soc/tegra/pmc.c +1 -1
index 6dfcc7f50ece..dc4eab3191c2 100644
@@ -3,7 +3,7 @@
  * drivers/soc/tegra/pmc.c
  *
  * Copyright (c) 2010 Google, Inc
- * Copyright (c) 2018-2023, NVIDIA CORPORATION. All rights reserved.
+ * Copyright (c) 2018-2024, NVIDIA CORPORATION. All rights reserved.
  *
  * Author:
  *	Colin Cross <[email protected]>

drivers/soc/tegra/pmc.c static const struct tegra_wake_event tegra234_wake_events[] = { · line 4202

Quoted 4 lines
drivers/soc/tegra/pmc.c +1 -0
@@ -4199,6 +4199,7 @@ static const struct tegra_wake_event tegra234_wake_events[] = {
 	TEGRA_WAKE_IRQ("pmu", 24, 209),
 	TEGRA_WAKE_GPIO("power", 29, 1, TEGRA234_AON_GPIO(EE, 4)),
 	TEGRA_WAKE_GPIO("mgbe", 56, 0, TEGRA234_MAIN_GPIO(Y, 3)),
+	TEGRA_WAKE_GPIO("sd_wake", 8, 0, TEGRA234_MAIN_GPIO(G, 7)),

I'd prefer to stick with - instead of _ in these names, like we do with sw-wake. No need to resend, I can make that change when applying, provided you don't have any objections.

Thierry

Quoted 3 lines
drivers/soc/tegra/pmc.c +0 -0
 	TEGRA_WAKE_IRQ("rtc", 73, 10),
 	TEGRA_WAKE_IRQ("sw-wake", SW_WAKE_ID, 179),
 };
#2 lore raw
Quoted 27 lines · Petlozu Pravareshwar

drivers/soc/tegra/pmc.c static const struct tegra_wake_event

Quoted 25 lines

From: Prathamesh Shete <[email protected]>

Add SD wake event for Tegra234 so that system can be woken up from suspend when SD card hot-plug/unplug event is detected.

---
 drivers/soc/tegra/pmc.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/soc/tegra/pmc.c index renamed from drivers/soc/tegra/pmc.c +0 -0

6dfcc7f50ece..dc4eab3191c2 100644

drivers/soc/tegra/pmc.c +1 -1
@@ -3,7 +3,7 @@
  * drivers/soc/tegra/pmc.c
  *
  * Copyright (c) 2010 Google, Inc
- * Copyright (c) 2018-2023, NVIDIA CORPORATION. All rights reserved.
+ * Copyright (c) 2018-2024, NVIDIA CORPORATION. All rights reserved.
  *
  * Author:
  *	Colin Cross <[email protected]>
@@ -4199,6 +4199,7 @@ static const struct tegra_wake_event

tegra234_wake_events[] = {

Quoted 9 lines

drivers/soc/tegra/pmc.c static const struct tegra_wake_event tegra234_wake_events[] = { · line 4202

Quoted 4 lines
drivers/soc/tegra/pmc.c +1 -0
 	TEGRA_WAKE_IRQ("pmu", 24, 209),
 	TEGRA_WAKE_GPIO("power", 29, 1, TEGRA234_AON_GPIO(EE, 4)),
 	TEGRA_WAKE_GPIO("mgbe", 56, 0, TEGRA234_MAIN_GPIO(Y, 3)),
+	TEGRA_WAKE_GPIO("sd_wake", 8, 0, TEGRA234_MAIN_GPIO(G, 7)),

I'd prefer to stick with - instead of _ in these names, like we do with sw-wake. No need to resend, I can make that change when applying, provided you don't have any objections.

Yes, let's stick with - only instead of _ in the names for consistency. Thanks.

Quoted 4 lines

Thierry

Quoted 2 lines
drivers/soc/tegra/pmc.c +0 -0
 	TEGRA_WAKE_IRQ("rtc", 73, 10),
 	TEGRA_WAKE_IRQ("sw-wake", SW_WAKE_ID, 179),  };
#3 lore raw
In reply to Petlozu Pravareshwar
Quoted 25 lines · Petlozu Pravareshwar

From: Prathamesh Shete <[email protected]>

Add SD wake event for Tegra234 so that system can be woken up from suspend when SD card hot-plug/unplug event is detected.

---
 drivers/soc/tegra/pmc.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/soc/tegra/pmc.c +1 -1
index 6dfcc7f50ece..dc4eab3191c2 100644
@@ -3,7 +3,7 @@
  * drivers/soc/tegra/pmc.c
  *
  * Copyright (c) 2010 Google, Inc
- * Copyright (c) 2018-2023, NVIDIA CORPORATION. All rights reserved.
+ * Copyright (c) 2018-2024, NVIDIA CORPORATION. All rights reserved.
  *
  * Author:
  *	Colin Cross <[email protected]>

drivers/soc/tegra/pmc.c static const struct tegra_wake_event tegra234_wake_events[] = { · line 4202

Quoted 4 lines
drivers/soc/tegra/pmc.c +1 -0
@@ -4199,6 +4199,7 @@ static const struct tegra_wake_event tegra234_wake_events[] = {
 	TEGRA_WAKE_IRQ("pmu", 24, 209),
 	TEGRA_WAKE_GPIO("power", 29, 1, TEGRA234_AON_GPIO(EE, 4)),
 	TEGRA_WAKE_GPIO("mgbe", 56, 0, TEGRA234_MAIN_GPIO(Y, 3)),
+	TEGRA_WAKE_GPIO("sd_wake", 8, 0, TEGRA234_MAIN_GPIO(G, 7)),

These are also meant to be ordered by wake ID, so I've moved this up to where it belongs.

Thierry

#4 lore raw
Quoted 35 lines · Petlozu Pravareshwar

drivers/soc/tegra/pmc.c static const struct tegra_wake_event

Quoted 25 lines

From: Prathamesh Shete <[email protected]>

Add SD wake event for Tegra234 so that system can be woken up from suspend when SD card hot-plug/unplug event is detected.

---
 drivers/soc/tegra/pmc.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/soc/tegra/pmc.c index renamed from drivers/soc/tegra/pmc.c +0 -0

6dfcc7f50ece..dc4eab3191c2 100644

drivers/soc/tegra/pmc.c +1 -1
@@ -3,7 +3,7 @@
  * drivers/soc/tegra/pmc.c
  *
  * Copyright (c) 2010 Google, Inc
- * Copyright (c) 2018-2023, NVIDIA CORPORATION. All rights reserved.
+ * Copyright (c) 2018-2024, NVIDIA CORPORATION. All rights reserved.
  *
  * Author:
  *	Colin Cross <[email protected]>
@@ -4199,6 +4199,7 @@ static const struct tegra_wake_event

tegra234_wake_events[] = {

drivers/soc/tegra/pmc.c static const struct tegra_wake_event tegra234_wake_events[] = { · line 4202

Quoted 4 lines
drivers/soc/tegra/pmc.c +1 -0
 	TEGRA_WAKE_IRQ("pmu", 24, 209),
 	TEGRA_WAKE_GPIO("power", 29, 1, TEGRA234_AON_GPIO(EE, 4)),
 	TEGRA_WAKE_GPIO("mgbe", 56, 0, TEGRA234_MAIN_GPIO(Y, 3)),
+	TEGRA_WAKE_GPIO("sd_wake", 8, 0, TEGRA234_MAIN_GPIO(G, 7)),

These are also meant to be ordered by wake ID, so I've moved this up to where it belongs.

Quoted 1 line

Thierry

Got it. Thanks for taking care of this.