From: Kendall Willis <k-willis@ti.com>
To: Markus Schneider-Pargmann <msp@baylibre.com>,
Marc Kleine-Budde <mkl@pengutronix.de>,
Vincent Mailhol <mailhol@kernel.org>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Chandrasekar Ramakrishnan <rcsekar@samsung.com>
Cc: <s-kochidanadu@ti.com>, <a-kaur@ti.com>, <s-tripathi1@ti.com>,
<vishalm@ti.com>, <k-willis@ti.com>, <linux-can@vger.kernel.org>,
<devicetree@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: [PATCH v2 2/2] can: m_can: set out-of-band wakeup if wakeup pinctrl exists
Date: Thu, 20 Aug 2026 16:39:41 -0500 [thread overview]
Message-ID: <20260820-temp-v2-2-dd3f8cacc15e@ti.com> (raw)
In-Reply-To: <20260820-temp-v2-0-dd3f8cacc15e@ti.com>
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 the
out-of-band wakeup flag if the CAN device may wakeup, has the
"out-band-wakeup" property in the device tree node, and has the "wakeup"
pinctrl state.
Signed-off-by: Kendall Willis <k-willis@ti.com>
---
drivers/net/can/m_can/m_can.c | 6 +++++-
1 file changed, 5 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..e745660fb3eb311de70635fcfc016a44e62d5602 100644
--- a/drivers/net/can/m_can/m_can.c
+++ b/drivers/net/can/m_can/m_can.c
@@ -2622,8 +2622,12 @@ 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)) {
+ if (device_property_read_bool(dev, "out-band-wakeup"))
+ device_set_out_band_wakeup(dev);
+ } else {
pinctrl_pm_select_sleep_state(dev);
+ }
return ret;
}
--
2.34.1
prev parent reply other threads:[~2026-08-20 21:40 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-20 21:39 [PATCH v2 0/2] can: m_can: support out-of-band wakeup capability Kendall Willis
2026-08-20 21:39 ` [PATCH v2 1/2] dt-bindings: can: m_can: add out band wakeup property Kendall Willis
2026-08-20 21:48 ` sashiko-bot
2026-08-21 15:55 ` Kendall Willis
2026-08-20 21:39 ` Kendall Willis [this message]
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=20260820-temp-v2-2-dd3f8cacc15e@ti.com \
--to=k-willis@ti.com \
--cc=a-kaur@ti.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=krzk+dt@kernel.org \
--cc=linux-can@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mailhol@kernel.org \
--cc=mkl@pengutronix.de \
--cc=msp@baylibre.com \
--cc=rcsekar@samsung.com \
--cc=robh@kernel.org \
--cc=s-kochidanadu@ti.com \
--cc=s-tripathi1@ti.com \
--cc=vishalm@ti.com \
/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.