diff options
author | Sean Nyekjaer <sean@geanix.com> | 2019-04-09 11:39:48 +0300 |
---|---|---|
committer | Marc Kleine-Budde <mkl@pengutronix.de> | 2019-07-24 11:31:55 +0300 |
commit | 915f9666421cf65cc30668fd42760b6f78f9744d (patch) | |
tree | 21349ae3c9a274a72b9df9ffd789d9c93b65d3c9 /drivers | |
parent | 10e0c525fc41c1a80d33e3075d6f7f5902e74bbd (diff) | |
download | linux-915f9666421cf65cc30668fd42760b6f78f9744d.tar.xz |
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')
-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; } |