From: Sean Nyekjaer Date: Tue, 9 Apr 2019 08:39:48 +0000 (+0200) Subject: can: flexcan: add support for DT property 'wakeup-source' X-Git-Tag: v5.4-rc1~131^2~372^2~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=915f9666421cf65cc30668fd42760b6f78f9744d;p=thirdparty%2Fkernel%2Flinux.git 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 Signed-off-by: Marc Kleine-Budde --- diff --git a/drivers/net/can/flexcan.c b/drivers/net/can/flexcan.c index bcc39512f3422..09d8e623dcf63 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; }