devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] can: flexcan: add support for DT property 'wakeup-source'
@ 2019-04-09  8:39 Sean Nyekjaer
  2019-04-09  8:39 ` [PATCH 2/2] dt-bindings: can: flexcan: add can wakeup property Sean Nyekjaer
  2019-06-08 17:36 ` [PATCH 1/2] can: flexcan: add support for DT property 'wakeup-source' Sean Nyekjaer
  0 siblings, 2 replies; 5+ messages in thread
From: Sean Nyekjaer @ 2019-04-09  8:39 UTC (permalink / raw)
  To: netdev, linux-can, mkl, robh+dt; +Cc: Sean Nyekjaer, devicetree

The flexcan controller can be forced as a wakeup source by
stating that explicitly in the device's .dts file using the
"wakeup-source" boolean property.

Signed-off-by: Sean Nyekjaer <sean@geanix.com>
---
 drivers/net/can/flexcan.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/net/can/flexcan.c b/drivers/net/can/flexcan.c
index c46e6ce22701..df3d2abd98e4 100644
--- a/drivers/net/can/flexcan.c
+++ b/drivers/net/can/flexcan.c
@@ -1373,6 +1373,9 @@ static int flexcan_setup_stop_mode(struct platform_device *pdev)
 
 	device_set_wakeup_capable(&pdev->dev, true);
 
+	if (of_property_read_bool(np, "wakeup-source"))
+		device_set_wakeup_enable(&pdev->dev, true);
+
 	return 0;
 }
 
-- 
2.21.0

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

end of thread, other threads:[~2019-08-20  9:10 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-04-09  8:39 [PATCH 1/2] can: flexcan: add support for DT property 'wakeup-source' Sean Nyekjaer
2019-04-09  8:39 ` [PATCH 2/2] dt-bindings: can: flexcan: add can wakeup property Sean Nyekjaer
2019-04-29 17:39   ` Rob Herring
2019-08-20  9:10     ` Sean Nyekjaer
2019-06-08 17:36 ` [PATCH 1/2] can: flexcan: add support for DT property 'wakeup-source' Sean Nyekjaer

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