public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] can: m_can: set out-of-band wakeup if wakeup pinctrl exists
@ 2026-02-13 18:08 Kendall Willis
  2026-02-17 21:08 ` Marc Kleine-Budde
  2026-02-18 10:51 ` Markus Schneider-Pargmann
  0 siblings, 2 replies; 6+ messages in thread
From: Kendall Willis @ 2026-02-13 18:08 UTC (permalink / raw)
  To: Markus Schneider-Pargmann, Marc Kleine-Budde, Vincent Mailhol
  Cc: sebin.francis, d-gole, vishalm, linux-can, linux-kernel,
	Kendall Willis

In TI AM62X, AM62A, and AM62P SoCs, the m_can pins can act as a wakeup
source in the deepest low power states. However, the m_can pins are a part
of the MCU domain which is OFF in deeper low power states. Since the m_can
pins continue to be ON even if the MCU domain is turned off, set
out-of-band wakeup for CAN device if `wakeup` pinctrl state exists and
device may wakeup.

Signed-off-by: Kendall Willis <k-willis@ti.com>
---
Tested on CAN IO wakeup from DeepSleep low power mode on AM62P EVM.
---
 drivers/net/can/m_can/m_can.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/net/can/m_can/m_can.c b/drivers/net/can/m_can/m_can.c
index eb856547ae7df27a844b236a0c1d4498cbb8b60f..8b277f5e208ffa634439b9ea8495ed56f12cfccb 100644
--- a/drivers/net/can/m_can/m_can.c
+++ b/drivers/net/can/m_can/m_can.c
@@ -2622,7 +2622,9 @@ int m_can_class_suspend(struct device *dev)
 		cdev->can.state = CAN_STATE_SLEEPING;
 	}
 
-	if (!m_can_class_wakeup_pinctrl_enabled(cdev))
+	if (m_can_class_wakeup_pinctrl_enabled(cdev))
+		device_set_out_band_wakeup(dev);
+	else
 		pinctrl_pm_select_sleep_state(dev);
 
 	return ret;

---
base-commit: af98e93c5c39e6d0b87b42f0a32dd3066f795718
change-id: 20260213-mcan-out-of-band-bae2065f0bf5

Best regards,
-- 
Kendall Willis <k-willis@ti.com>


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

end of thread, other threads:[~2026-02-26 16:39 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-13 18:08 [PATCH] can: m_can: set out-of-band wakeup if wakeup pinctrl exists Kendall Willis
2026-02-17 21:08 ` Marc Kleine-Budde
2026-02-18 10:57   ` Markus Schneider-Pargmann
2026-02-18 10:51 ` Markus Schneider-Pargmann
2026-02-19 20:31   ` Kendall Willis
2026-02-26 16:39     ` Markus Schneider-Pargmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox