aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/can/flexcan.c
diff options
context:
space:
mode:
authorSean Nyekjaer <sean@geanix.com>2019-04-09 10:39:48 +0200
committerMarc Kleine-Budde <mkl@pengutronix.de>2019-07-24 10:31:55 +0200
commit915f9666421cf65cc30668fd42760b6f78f9744d (patch)
tree21349ae3c9a274a72b9df9ffd789d9c93b65d3c9 /drivers/net/can/flexcan.c
parentdt-bindings: can: flexcan: add can wakeup property (diff)
downloadlinux-dev-915f9666421cf65cc30668fd42760b6f78f9744d.tar.xz
linux-dev-915f9666421cf65cc30668fd42760b6f78f9744d.zip
can: flexcan: add support for DT property 'wakeup-source'
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> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Diffstat (limited to 'drivers/net/can/flexcan.c')
-rw-r--r--drivers/net/can/flexcan.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/can/flexcan.c b/drivers/net/can/flexcan.c
index bcc39512f342..09d8e623dcf6 100644
--- a/drivers/net/can/flexcan.c
+++ b/drivers/net/can/flexcan.c
@@ -1473,6 +1473,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;
}