From patchwork Tue Apr 9 08:39:48 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Nyekjaer X-Patchwork-Id: 1082032 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming-netdev@ozlabs.org Delivered-To: patchwork-incoming-netdev@ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=netdev-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=quarantine dis=none) header.from=geanix.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=geanix.com header.i=@geanix.com header.b="PlFcKYCv"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 44dgvL12YGz9sNd for ; Tue, 9 Apr 2019 18:49:17 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726511AbfDIItP (ORCPT ); Tue, 9 Apr 2019 04:49:15 -0400 Received: from first.geanix.com ([116.203.34.67]:42852 "EHLO first.geanix.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726091AbfDIItP (ORCPT ); Tue, 9 Apr 2019 04:49:15 -0400 Received: from zen.localdomain (unknown [85.184.147.232]) by first.geanix.com (Postfix) with ESMTPSA id 61A61300053; Tue, 9 Apr 2019 08:39:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=geanix.com; s=first; t=1554799184; bh=ZHFdkfTKL+FPuMQEPIQvqoPliNBgQ+p8YoNC4C2QD+k=; h=From:To:Cc:Subject:Date; b=PlFcKYCvZRI5fICHH+lf6+veYJmDYX5v5LK7ueKO2EjX9RyXbbOPd1WGfGc2j3VIK Upj08MN0yv1UnPP/FFULVAEgYcpjoXXLv7Bk0V1laDuvIy21YhlR7086JaQyzA+KhV AObpocmp/WYcnxHBJelaCQzDhnReCFQ+1T6K+4Sv5dCfJTSDMWHiSTOhHVMabCfaxM 8Mgn0cbN15c7qgStbKbiZtLlvJhRDZRnKTCIKT+CLQJE6xNVAySsjgjgt5vrpmlK/3 b+79GUUlrCk+lZFAaj5mYcmLggYBVeOKIk7nd7H8+iYPrPcUBEM0kmeAc643UQsPfq c4J19/Y1JgT4A== From: Sean Nyekjaer To: netdev@vger.kernel.org, linux-can@vger.kernel.org, mkl@pengutronix.de, robh+dt@kernel.org Cc: Sean Nyekjaer , devicetree@vger.kernel.org Subject: [PATCH 1/2] can: flexcan: add support for DT property 'wakeup-source' Date: Tue, 9 Apr 2019 10:39:48 +0200 Message-Id: <20190409083949.27917-1-sean@geanix.com> X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, UNPARSEABLE_RELAY, URIBL_BLOCKED autolearn=disabled version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on 3e0c63300934 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org 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 --- 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; } From patchwork Tue Apr 9 08:39:49 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Nyekjaer X-Patchwork-Id: 1082033 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming-netdev@ozlabs.org Delivered-To: patchwork-incoming-netdev@ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=netdev-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=quarantine dis=none) header.from=geanix.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=geanix.com header.i=@geanix.com header.b="OxEkLxry"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 44dgvN35JJz9sRV for ; Tue, 9 Apr 2019 18:49:20 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726461AbfDIItP (ORCPT ); Tue, 9 Apr 2019 04:49:15 -0400 Received: from first.geanix.com ([116.203.34.67]:42848 "EHLO first.geanix.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726035AbfDIItP (ORCPT ); Tue, 9 Apr 2019 04:49:15 -0400 X-Greylist: delayed 543 seconds by postgrey-1.27 at vger.kernel.org; Tue, 09 Apr 2019 04:49:14 EDT Received: from zen.localdomain (unknown [85.184.147.232]) by first.geanix.com (Postfix) with ESMTPSA id 2C2AB300071; Tue, 9 Apr 2019 08:39:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=geanix.com; s=first; t=1554799185; bh=z/QVm6iVbtu9GNWP8qiuj4XJh+zTCGtyEgVeSfwH7T0=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=OxEkLxryVHOxoufeCk2wHQg4O5CRxwocgagyMj3jFxCY25TUBDUh0BYQ3WNDq385J w0bjTbrs8TXLE7uJlj7TbkV0tO4UnLv0J0YZNsgqyRosZQZHDfTQINGd6ToE8FfHuv HMJCPgunGc/EmhIolkpJHb5cDKRt8JiNXJSt8oQ7YOQZnafXjNQN4FPUEWzGaiBnrX zaUDZw5ZRmFB5st/FCwQGSEfW+GoI3wITCLl4v0f+btZhBTwjMzpo95EBlTu+l/g5Z 5e7VGamSeUPYHAGTTPk2YKfI8EZ8DDykeTpA3hcakUO9xk1aDdTC4cwlG5P5FDlbsP hUyYss1FEKBtg== From: Sean Nyekjaer To: netdev@vger.kernel.org, linux-can@vger.kernel.org, mkl@pengutronix.de, robh+dt@kernel.org Cc: Sean Nyekjaer , devicetree@vger.kernel.org Subject: [PATCH 2/2] dt-bindings: can: flexcan: add can wakeup property Date: Tue, 9 Apr 2019 10:39:49 +0200 Message-Id: <20190409083949.27917-2-sean@geanix.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190409083949.27917-1-sean@geanix.com> References: <20190409083949.27917-1-sean@geanix.com> MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, UNPARSEABLE_RELAY, URIBL_BLOCKED autolearn=disabled version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on 3e0c63300934 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org add wakeup-source boolean property. Signed-off-by: Sean Nyekjaer Reviewed-by: Rob Herring --- Documentation/devicetree/bindings/net/can/fsl-flexcan.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/devicetree/bindings/net/can/fsl-flexcan.txt b/Documentation/devicetree/bindings/net/can/fsl-flexcan.txt index bc77477c6878..17453be840d8 100644 --- a/Documentation/devicetree/bindings/net/can/fsl-flexcan.txt +++ b/Documentation/devicetree/bindings/net/can/fsl-flexcan.txt @@ -32,6 +32,8 @@ Optional properties: ack_gpr is the gpr register offset of CAN stop acknowledge. ack_bit is the bit offset of CAN stop acknowledge. +- wakeup-source: enable CAN remote wakeup + Example: can@1c000 {