diff options
author | Sean Nyekjaer <sean@geanix.com> | 2019-04-09 10:39:48 +0200 |
---|---|---|
committer | Marc Kleine-Budde <mkl@pengutronix.de> | 2019-07-24 10:31:55 +0200 |
commit | 915f9666421cf65cc30668fd42760b6f78f9744d (patch) | |
tree | 21349ae3c9a274a72b9df9ffd789d9c93b65d3c9 /drivers/net/can/flexcan.c | |
parent | dt-bindings: can: flexcan: add can wakeup property (diff) | |
download | linux-915f9666421cf65cc30668fd42760b6f78f9744d.tar.xz linux-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 '')
-rw-r--r-- | drivers/net/can/flexcan.c | 3 |
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; } |