From patchwork Mon Dec 9 16:32:44 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marc Kleine-Budde X-Patchwork-Id: 181065 Delivered-To: patch@linaro.org Received: by 2002:a92:3001:0:0:0:0:0 with SMTP id x1csp4580683ile; Mon, 9 Dec 2019 08:33:41 -0800 (PST) X-Google-Smtp-Source: APXvYqxIlEm7IDdX32cUhQwqUORIBHYMgcYBrxfjY6eP1C1fC8opeBN6KjzbD2JQcgR73+IiyqiL X-Received: by 2002:a54:4805:: with SMTP id j5mr20165923oij.165.1575909221595; Mon, 09 Dec 2019 08:33:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575909221; cv=none; d=google.com; s=arc-20160816; b=d/WHN5bU9w9xE2/m27F99unZnBw2nnlYVU3X0aevYK1LX6drbL4tC456l8dpiL1EFG lD4aYkwENDMpLoE95R4xUuaCEjj5ls8XY+Lw/PNTHkMwZDJYg4o4cGZZZzZW2MMKel67 kqbq7VxWFtT2XXvYeeLypJEeFC64Sem87b0aU9/pgzj1yFL6RhOeb/7G5b4rlhx6a69b FR/G8EvTUumgNkv7RvlvroKXbmH8ZWTDOq6LYLleAGrkSq0d0O6jRFcWd6VCMRx1ne67 46ZlCCM9MW57r4ShDsBNEltppguWdtIO/dYW3Ua041tJzyvSE/tfrAOa9/bZ/CdvCk5B wXpw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=Y2ksDLSi3ZLACoMbVYIwAjnyeOQVr+kEkOV0CVkF4Ck=; b=CkXuC5XnQ4B4N9q9vJHtODCxdw/JRksNRQrOf0q2FxfF+qqO5iMVDYbeG42UwnjXZh /4iyE6cKSw0D6zPPJ3IBmB31iQRBNstiYTo3r0VrgtRpX8SWum5R43cbNzTHOCy32DrI u+rkLSZ4103ufKgYfNoBOFMiwH/9+V3yeu3NILXFGx+Ww4YzSs0pjn8jw2zqiilDjjIH PeldD/niPbu7d+fW1qpd4+gyoVBGnjt5/tYF7dcL5mvqiJWlN0ijSamvTNIhzSKxgjg3 8lC3BQFrFHLZiplYipIAfJvw8U5aol/iygPvk+J+G+N+xmDwZlkXxjnIxi7klqe34ucF mmUg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of netdev-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=netdev-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p16si63593oto.287.2019.12.09.08.33.41; Mon, 09 Dec 2019 08:33:41 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of netdev-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of netdev-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=netdev-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726532AbfLIQdk (ORCPT + 9 others); Mon, 9 Dec 2019 11:33:40 -0500 Received: from metis.ext.pengutronix.de ([85.220.165.71]:45809 "EHLO metis.ext.pengutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726783AbfLIQdE (ORCPT ); Mon, 9 Dec 2019 11:33:04 -0500 Received: from heimdall.vpn.pengutronix.de ([2001:67c:670:205:1d::14] helo=blackshift.org) by metis.ext.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1ieLy0-0001up-2S; Mon, 09 Dec 2019 17:33:00 +0100 From: Marc Kleine-Budde To: netdev@vger.kernel.org Cc: davem@davemloft.net, linux-can@vger.kernel.org, kernel@pengutronix.de, Dan Murphy , Marc Kleine-Budde Subject: [PATCH 01/13] MAINTAINERS: Add myself as a maintainer for MMIO m_can Date: Mon, 9 Dec 2019 17:32:44 +0100 Message-Id: <20191209163256.12000-2-mkl@pengutronix.de> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191209163256.12000-1-mkl@pengutronix.de> References: <20191209163256.12000-1-mkl@pengutronix.de> MIME-Version: 1.0 X-SA-Exim-Connect-IP: 2001:67c:670:205:1d::14 X-SA-Exim-Mail-From: mkl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: netdev@vger.kernel.org Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Dan Murphy Since I refactored the code to create a m_can framework and we have a MMIO MCAN IP as well add myself to help maintain the code. Signed-off-by: Dan Murphy Signed-off-by: Marc Kleine-Budde --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) -- 2.24.0 diff --git a/MAINTAINERS b/MAINTAINERS index ecc354f4b692..1d50632f7662 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -10095,6 +10095,7 @@ S: Maintained F: drivers/media/radio/radio-maxiradio* MCAN MMIO DEVICE DRIVER +M: Dan Murphy M: Sriram Dash L: linux-can@vger.kernel.org S: Maintained From patchwork Mon Dec 9 16:32:45 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marc Kleine-Budde X-Patchwork-Id: 181066 Delivered-To: patch@linaro.org Received: by 2002:a92:3001:0:0:0:0:0 with SMTP id x1csp4580813ile; Mon, 9 Dec 2019 08:33:46 -0800 (PST) X-Google-Smtp-Source: APXvYqw2YL1zN7wlW3dulMJ4jRJZ4k8SL1am7b/M6AOQgApS66HZtqiChRiSTgdFQ0JX88/la3wu X-Received: by 2002:a9d:6a98:: with SMTP id l24mr22362903otq.160.1575909226372; Mon, 09 Dec 2019 08:33:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575909226; cv=none; d=google.com; s=arc-20160816; b=LxSd8oQqEfJjk+4OlXFDhyx1OkkjQTwE7/yjNkc2vS1mHRupWqdX1a2To5M9sSedQc 9UQndIFNwkeQOrjLyHRqqul9w5/F9DJIWif0lsnW+6NcjnqS10Kf675FDXLtpy6l/CeE Sz5qLNvD8VByXyc346q8xXG0VLX5oD0e8Pewj3XnSlZUaftt8q3qGNhnQPs7Xl3YbDei WvLIC9D7MxgenjH0WIhhpq0+tjOkTLtfgD1tieQHuD4TFsg5V85VsHKFsyCpbT8fn362 cF38b2UWcoIBP8/wo7K/uOVOVL9+BpDkto1QiJolZW+VnRNpNTLwQPHwk5rNurvN7XbT 1TXQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=sCBuk/Ocqo1NFy4CtRymosRRCjLkwljEczWlO9o0hLE=; b=o3f5YH3k1r0I6RNet8NKLrbiLu0bHoHMvpVDonVdKz3osJK3uSEiN0FitoEe3CqbjC 60T099F7wsedLTd/8nt/aCkPc/VRw7SaEdZX/66sVtUOoD1zI+stdSwGypoCAJ2u8kA+ 4KzGl98zmRI+Q56SGEcXf7d8/5S01Q68TZaataksZ51mPbO1BBLHE69Pnrql/SVmqViL EG4EI89nXCjqX6b+zMLOOdJAkSD7t2Fm3jR5m/zv5BmB+LJJl+txMvEWToqFf6iyUfHU zxlOqSBWopEudWw72NIh6+YAlKa4+LhGZ0PdKkl9lh7z3Z3eVo1dX3c1oqtvNYAwijbe +Ohg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of netdev-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=netdev-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p16si63593oto.287.2019.12.09.08.33.46; Mon, 09 Dec 2019 08:33:46 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of netdev-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of netdev-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=netdev-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726687AbfLIQdD (ORCPT + 9 others); Mon, 9 Dec 2019 11:33:03 -0500 Received: from metis.ext.pengutronix.de ([85.220.165.71]:36403 "EHLO metis.ext.pengutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726342AbfLIQdB (ORCPT ); Mon, 9 Dec 2019 11:33:01 -0500 Received: from heimdall.vpn.pengutronix.de ([2001:67c:670:205:1d::14] helo=blackshift.org) by metis.ext.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1ieLy0-0001up-Dk; Mon, 09 Dec 2019 17:33:00 +0100 From: Marc Kleine-Budde To: netdev@vger.kernel.org Cc: davem@davemloft.net, linux-can@vger.kernel.org, kernel@pengutronix.de, Dan Murphy , Marc Kleine-Budde Subject: [PATCH 02/13] MAINTAINERS: Add myself as a maintainer for TCAN4x5x Date: Mon, 9 Dec 2019 17:32:45 +0100 Message-Id: <20191209163256.12000-3-mkl@pengutronix.de> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191209163256.12000-1-mkl@pengutronix.de> References: <20191209163256.12000-1-mkl@pengutronix.de> MIME-Version: 1.0 X-SA-Exim-Connect-IP: 2001:67c:670:205:1d::14 X-SA-Exim-Mail-From: mkl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: netdev@vger.kernel.org Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Dan Murphy Adding myself to support the TI TCAN4X5X SPI CAN device. Signed-off-by: Dan Murphy Signed-off-by: Marc Kleine-Budde --- MAINTAINERS | 7 +++++++ 1 file changed, 7 insertions(+) -- 2.24.0 diff --git a/MAINTAINERS b/MAINTAINERS index 1d50632f7662..cdeabd4ee1a6 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -16498,6 +16498,13 @@ L: alsa-devel@alsa-project.org (moderated for non-subscribers) S: Odd Fixes F: sound/soc/codecs/tas571x* +TI TCAN4X5X DEVICE DRIVER +M: Dan Murphy +L: linux-can@vger.kernel.org +S: Maintained +F: Documentation/devicetree/bindings/net/can/tcan4x5x.txt +F: drivers/net/can/m_can/tcan4x5x.c + TI TRF7970A NFC DRIVER M: Mark Greer L: linux-wireless@vger.kernel.org From patchwork Mon Dec 9 16:32:54 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marc Kleine-Budde X-Patchwork-Id: 181063 Delivered-To: patch@linaro.org Received: by 2002:a92:3001:0:0:0:0:0 with SMTP id x1csp4580167ile; Mon, 9 Dec 2019 08:33:16 -0800 (PST) X-Google-Smtp-Source: APXvYqwKyVnMszpx3fLulW5uwo5Tu3n+ClTQWlnkhWKUY41Zkh23sqDf/ILKhpVITLzDTUg/b3gJ X-Received: by 2002:a9d:708a:: with SMTP id l10mr5664265otj.263.1575909196050; Mon, 09 Dec 2019 08:33:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575909196; cv=none; d=google.com; s=arc-20160816; b=cWWC07mO3+qzhc3SpOk7oHDK452venT8v1TXRa8uiqHmoVmzXyvR8TjP+cl0PB7x3q Rg67oeEVOZVEg6FUhnIQVCilb0NAzxGKkVNvvbfyYTUK5ms4HuoCA8co4QedYEVo3zTd j9qa1elqQGfWEDACtZXqnPPUEJx1lGZC51rkytfhsyQRzjgYqqP06INpGaceGmtNz8m+ thI3AGMXHny5O9OsjzznKiqJnO9R2U0KC25EJNwWVjKiIFN6pfj9frGP4+t3EQR/p9M8 ba5Axvy0PtyARYMNAoFaxaOCcgp/8QNRlsxd7J4xQwM5ffTGiFlD4FLbhKh1b2WNGksR wxmQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=7csu5wdzEzZU3PK0hDUnSQ6QFu42oZpQrZ5CmTEWxcM=; b=NiACiByqIBhEWmMUkwy7iNJgXcNhLhNC/8O+yuym+wP6G38YK32UxIJYqz0ygUDMB4 XJRip4yd01wkYM3PIrq15mGzu7F7jA2q1O2sMKFmv7Aew0+ZthwK/5/+IX6P/Se87j7V N2Tt0ZPam1O7vxsGxySK/Y77IxKOW70ExOJZjC03ScnDU1AFi14aYZcRfC/OA3NJXlcH EzwQdcgFUv42XpY1qWGNQkYpZ9eIyXqrvhvQ+pDEjVNbPBYAl77tQGB2V2LZdeGRJNWU 2gSyuToxx25EKvDv5Fu/VSo6VNjeA34rcuoUvS5+xOxiqCSg6RMpMgdDpjirba373tyU aW3w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of netdev-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=netdev-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l16si82851otr.106.2019.12.09.08.33.15; Mon, 09 Dec 2019 08:33:16 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of netdev-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of netdev-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=netdev-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726956AbfLIQdK (ORCPT + 9 others); Mon, 9 Dec 2019 11:33:10 -0500 Received: from metis.ext.pengutronix.de ([85.220.165.71]:38007 "EHLO metis.ext.pengutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726903AbfLIQdG (ORCPT ); Mon, 9 Dec 2019 11:33:06 -0500 Received: from heimdall.vpn.pengutronix.de ([2001:67c:670:205:1d::14] helo=blackshift.org) by metis.ext.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1ieLy4-0001up-TJ; Mon, 09 Dec 2019 17:33:04 +0100 From: Marc Kleine-Budde To: netdev@vger.kernel.org Cc: davem@davemloft.net, linux-can@vger.kernel.org, kernel@pengutronix.de, Dan Murphy , Rob Herring , Sean Nyekjaer , Marc Kleine-Budde Subject: [PATCH 11/13] dt-bindings: tcan4x5x: Make wake-gpio an optional gpio Date: Mon, 9 Dec 2019 17:32:54 +0100 Message-Id: <20191209163256.12000-12-mkl@pengutronix.de> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191209163256.12000-1-mkl@pengutronix.de> References: <20191209163256.12000-1-mkl@pengutronix.de> MIME-Version: 1.0 X-SA-Exim-Connect-IP: 2001:67c:670:205:1d::14 X-SA-Exim-Mail-From: mkl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: netdev@vger.kernel.org Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Dan Murphy The wake-up of the device can be configured as an optional feature of the device. Move the wake-up gpio from a requried property to an optional property. Signed-off-by: Dan Murphy Cc: Rob Herring Reviewed-by: Sean Nyekjaer Tested-by: Sean Nyekjaer Signed-off-by: Marc Kleine-Budde --- Documentation/devicetree/bindings/net/can/tcan4x5x.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.24.0 diff --git a/Documentation/devicetree/bindings/net/can/tcan4x5x.txt b/Documentation/devicetree/bindings/net/can/tcan4x5x.txt index e8aa21d9174e..6bdcc3f84bd3 100644 --- a/Documentation/devicetree/bindings/net/can/tcan4x5x.txt +++ b/Documentation/devicetree/bindings/net/can/tcan4x5x.txt @@ -10,7 +10,6 @@ Required properties: - #size-cells: 0 - spi-max-frequency: Maximum frequency of the SPI bus the chip can operate at should be less than or equal to 18 MHz. - - device-wake-gpios: Wake up GPIO to wake up the TCAN device. - interrupt-parent: the phandle to the interrupt controller which provides the interrupt. - interrupts: interrupt specification for data-ready. @@ -23,6 +22,7 @@ Optional properties: reset. - device-state-gpios: Input GPIO that indicates if the device is in a sleep state or if the device is active. + - device-wake-gpios: Wake up GPIO to wake up the TCAN device. Example: tcan4x5x: tcan4x5x@0 { From patchwork Mon Dec 9 16:32:55 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marc Kleine-Budde X-Patchwork-Id: 181064 Delivered-To: patch@linaro.org Received: by 2002:a92:3001:0:0:0:0:0 with SMTP id x1csp4580414ile; Mon, 9 Dec 2019 08:33:28 -0800 (PST) X-Google-Smtp-Source: APXvYqyRyxTMbumAqCcUKNkA7g+1BtGrKmzAd0katEacwSS86AI0rFXjxX/1bfnBwAa8GDLrf9gu X-Received: by 2002:aca:c645:: with SMTP id w66mr24209690oif.43.1575909208235; Mon, 09 Dec 2019 08:33:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575909208; cv=none; d=google.com; s=arc-20160816; b=zoxogxr0d/7zORHMzebCTkZT3fj1taY9sMP0dskv08Wu/RjWUfbpbUL+9LBOOuM4pV mghprgw83wiXp0tKhH1BmHXNWoiWAZlDzHmwtIs2a1lSA9w66HT12PF5kh11UrlGDmXp gBoSFVAVLJ3llxnVMaFoa498pbNJmoz5+Kfy8P2Uzw1jvK9iUxdyPE3caWtBn+biDiEi xVNlKf7NoaXEyrCpbY6SJzxb/IOadPSaFSF06Kryz6VNIJWgB5R4O1Kg3AGRmCIK0oW1 m4vhNTm9pg1w0cQd5mCw/ASA/5o+kft9DEp1J6v/IvTSx9dmoMoFjtMjbd1ULxYwTO3d peKw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=WIzUa1cez/FaWXscvjqExXu9ZKHKjfsWk1u1X/fG2ho=; b=C31MZkKEq30IKK0ogxPbXQSyGuCbnxyAAu3IHIIcawjPZYdGFs4BypKOqEAUwuc83L +Mv2lHUU+0iurN99PackvZMNJblXaj9cC9sYi+TMrh0EohyEwDlGnikdlvHAidI9qcMF BjTHoeFxYHZ8Ev5Z/Wp82VwM+vHNL2v+fOc1xPN2uuZ1/Wr0wzPgb2lL1H6toqZdJxoA qrjl7MBOA418t/Q95qHsh7G6zK2Ml5mVyLzXRALbj3v0ZxakkAms3Wo1cFDHycFFYoU7 GF8/9bw97HyPzWglp8/KEMOUUUECec1DKlw9vdSMEy7PrVw0Csd84b9MbYyryo2Ybe16 AOFQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of netdev-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=netdev-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l62si160842oif.20.2019.12.09.08.33.28; Mon, 09 Dec 2019 08:33:28 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of netdev-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of netdev-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=netdev-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726999AbfLIQdU (ORCPT + 9 others); Mon, 9 Dec 2019 11:33:20 -0500 Received: from metis.ext.pengutronix.de ([85.220.165.71]:56519 "EHLO metis.ext.pengutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726911AbfLIQdH (ORCPT ); Mon, 9 Dec 2019 11:33:07 -0500 Received: from heimdall.vpn.pengutronix.de ([2001:67c:670:205:1d::14] helo=blackshift.org) by metis.ext.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1ieLy5-0001up-Al; Mon, 09 Dec 2019 17:33:05 +0100 From: Marc Kleine-Budde To: netdev@vger.kernel.org Cc: davem@davemloft.net, linux-can@vger.kernel.org, kernel@pengutronix.de, Dan Murphy , Sean Nyekjaer , Marc Kleine-Budde Subject: [PATCH 12/13] can: tcan45x: Make wake-up GPIO an optional GPIO Date: Mon, 9 Dec 2019 17:32:55 +0100 Message-Id: <20191209163256.12000-13-mkl@pengutronix.de> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191209163256.12000-1-mkl@pengutronix.de> References: <20191209163256.12000-1-mkl@pengutronix.de> MIME-Version: 1.0 X-SA-Exim-Connect-IP: 2001:67c:670:205:1d::14 X-SA-Exim-Mail-From: mkl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: netdev@vger.kernel.org Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Dan Murphy The device has the ability to disable the wake-up pin option. The wake-up pin can be either force to GND or Vsup and does not have to be tied to a GPIO. In order for the device to not use the wake-up feature write the register to disable the WAKE_CONFIG option. Signed-off-by: Dan Murphy Cc: Sean Nyekjaer Reviewed-by: Sean Nyekjaer Signed-off-by: Marc Kleine-Budde --- drivers/net/can/m_can/tcan4x5x.c | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) -- 2.24.0 diff --git a/drivers/net/can/m_can/tcan4x5x.c b/drivers/net/can/m_can/tcan4x5x.c index d5d4bfa9c8fd..4e1789ea2bc3 100644 --- a/drivers/net/can/m_can/tcan4x5x.c +++ b/drivers/net/can/m_can/tcan4x5x.c @@ -101,6 +101,8 @@ #define TCAN4X5X_MODE_STANDBY BIT(6) #define TCAN4X5X_MODE_NORMAL BIT(7) +#define TCAN4X5X_DISABLE_WAKE_MSK (BIT(31) | BIT(30)) + #define TCAN4X5X_SW_RESET BIT(2) #define TCAN4X5X_MCAN_CONFIGURED BIT(5) @@ -338,6 +340,14 @@ static int tcan4x5x_init(struct m_can_classdev *cdev) return ret; } +static int tcan4x5x_disable_wake(struct m_can_classdev *cdev) +{ + struct tcan4x5x_priv *tcan4x5x = cdev->device_data; + + return regmap_update_bits(tcan4x5x->regmap, TCAN4X5X_CONFIG, + TCAN4X5X_DISABLE_WAKE_MSK, 0x00); +} + static int tcan4x5x_parse_config(struct m_can_classdev *cdev) { struct tcan4x5x_priv *tcan4x5x = cdev->device_data; @@ -345,8 +355,10 @@ static int tcan4x5x_parse_config(struct m_can_classdev *cdev) tcan4x5x->device_wake_gpio = devm_gpiod_get(cdev->dev, "device-wake", GPIOD_OUT_HIGH); if (IS_ERR(tcan4x5x->device_wake_gpio)) { - dev_err(cdev->dev, "device-wake gpio not defined\n"); - return -EINVAL; + if (PTR_ERR(tcan4x5x->power) == -EPROBE_DEFER) + return -EPROBE_DEFER; + + tcan4x5x_disable_wake(cdev); } tcan4x5x->reset_gpio = devm_gpiod_get_optional(cdev->dev, "reset", @@ -430,10 +442,6 @@ static int tcan4x5x_can_probe(struct spi_device *spi) spi_set_drvdata(spi, priv); - ret = tcan4x5x_parse_config(mcan_class); - if (ret) - goto out_clk; - /* Configure the SPI bus */ spi->bits_per_word = 32; ret = spi_setup(spi); @@ -443,6 +451,10 @@ static int tcan4x5x_can_probe(struct spi_device *spi) priv->regmap = devm_regmap_init(&spi->dev, &tcan4x5x_bus, &spi->dev, &tcan4x5x_regmap); + ret = tcan4x5x_parse_config(mcan_class); + if (ret) + goto out_clk; + tcan4x5x_power_enable(priv->power, 1); ret = m_can_class_register(mcan_class);