Skip to contentSkip to conversation

thunderbolt: Use wake on connect and disconnect over suspend

PATCH Applied Mario Limonciello 2 participants 2 messages Apr 10, 2025 – Apr 11, 2025

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 thunderbolt: Use wake on connect and disconnect over suspend

From: Mario Limonciello <[email protected]>

Wake on connect is useful for being able to wake up a suspended laptop without opening the lid by plugging into a dock.

Add the default policy to the USB4 router when wakeup is enabled for the router. Behavior for individual ports can be controlled by port wakeup settings.

---
 drivers/thunderbolt/switch.c | 1 +
 1 file changed, 1 insertion(+)
drivers/thunderbolt/switch.c +1 -0
index 6a2116cbb06f9..28febb95f8fa1 100644
@@ -3599,6 +3599,7 @@ void tb_switch_suspend(struct tb_switch *sw, bool runtime)
 		flags |= TB_WAKE_ON_USB4;
 		flags |= TB_WAKE_ON_USB3 | TB_WAKE_ON_PCIE | TB_WAKE_ON_DP;
 	} else if (device_may_wakeup(&sw->dev)) {
+		flags |= TB_WAKE_ON_CONNECT | TB_WAKE_ON_DISCONNECT;
 		flags |= TB_WAKE_ON_USB4 | TB_WAKE_ON_USB3 | TB_WAKE_ON_PCIE;
 	}
 
Signature · 1 line
2.43.0
#1 lore raw
Quoted 9 lines · Mario Limonciello

From: Mario Limonciello <[email protected]>

Wake on connect is useful for being able to wake up a suspended laptop without opening the lid by plugging into a dock.

Add the default policy to the USB4 router when wakeup is enabled for the router. Behavior for individual ports can be controlled by port wakeup settings.

Quoted 7 lines

Applied to thunderbolt.git/next, thanks!