From patchwork Sun Feb 25 14:10:52 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Wahren X-Patchwork-Id: 10240917 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 510E3603B4 for ; Sun, 25 Feb 2018 14:13:44 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4249C28531 for ; Sun, 25 Feb 2018 14:13:44 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 356E129CEC; Sun, 25 Feb 2018 14:13:44 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id A7B1428531 for ; Sun, 25 Feb 2018 14:13:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=ciarq6AlHO4C+4wOOq2eW5mb8FkTkGiYmqfwGTvBSs4=; b=N+DnR8n52W4643WdDqQY/BMlNw lk5N+5k8PbOdBDsbHr4uMRHNv81fu3fZDcY3oxt7DQsPWvd9YHiph9OT/+18Zhq5nMv4Y80qdzSST QyEf2GhQ+Ef2Mkv9Q6ORe6sBtuLkSkWX2j8/ZHP3VGhIZRc6FZjuzyPUmOrgG2YXKqgpNhhVhyo0Z fksi2+yNp2U2m1DAeKTVX3Bl/U4yg6HE9tYFt2ZpZh8Z6oecvjoW0eQ+Qra1gX9waIBfMJoPY5Our Bv3dIa5/WuPEeQDFSCy4pGKoRbpyrR7wupkiQES7aFotTB7Exs2xpWesNKHyKL/LVYQFScjoTTH0a BnkdCqow==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.89 #1 (Red Hat Linux)) id 1epx3R-0004Lp-Im; Sun, 25 Feb 2018 14:13:29 +0000 Received: from mout.kundenserver.de ([212.227.17.24]) by bombadil.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1epx21-0003ds-U4; Sun, 25 Feb 2018 14:12:05 +0000 Received: from localhost.localdomain ([95.90.209.156]) by mrelayeu.kundenserver.de (mreue104 [212.227.15.183]) with ESMTPSA (Nemesis) id 0MUVcJ-1fG2lU0fNj-00RKwG; Sun, 25 Feb 2018 15:11:39 +0100 From: Stefan Wahren To: Loic Poulain , =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Danis?= , Marcel Holtmann , Johan Hedberg , Eric Anholt , Rob Herring , Mark Rutland Subject: [PATCH 1/4] Bluetooth: hci_bcm: Make shutdown and device wake GPIO optional Date: Sun, 25 Feb 2018 15:10:52 +0100 Message-Id: <1519567855-26105-2-git-send-email-stefan.wahren@i2se.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1519567855-26105-1-git-send-email-stefan.wahren@i2se.com> References: <1519567855-26105-1-git-send-email-stefan.wahren@i2se.com> X-Provags-ID: V03:K0:EjChyRaFxOQxpuOJAKiYhZtc186c9ronaAoHfGih/atBa1f6Gt+ d3WSGK/B8VyPklf/TRwCNuw3yg+5QaxBCakVIGITS5QzNwOmCrna8pHWz6yQJ0C0XwzNHc8 PPVFRYtuq7iWvHP34fFNtF45n+PKXFDlWloGlfa3eqBFUuQAhxkg7+EHht1QD591yuW/sBW ryI+vwpsXRZAHDq3ZpWfA== X-UI-Out-Filterresults: notjunk:1; V01:K0:QBCa4uyPkm0=:8sJ6bSqrFcOmYaeejZS9KB KYa5CExVgGtUoCJBS2VtTf4XFM4JNlH+k+iZpjZ/fl7PKQjkbYII27i65eDf+KJhJF9COHt2a 3qT/qrrRq40UahK2mXlJ2oljj+AhJW7NWadeKcBeFaPFc7j5fCd5tFLro/gWmJt/0g/kiaTkw jZ8PLoJjLV6e4HjzzQC9yjMuOCDSRlHO7GVb2syMIxe6QoTrjyuaduGYJlnUuSstybDHzhOGd HXfR/as6CRqZ7B/5T/hWsaqrl+apXzU1mmtJNJ7YhMVpGImYiIaryDMlDC9CLxvCRCWMqzxkw qROV1GuFcl3RpXAguItt3tmv7ew6sQ4DosGNJx+CPPrgG8qpcLj+0lGL7f1isuByjTTXQmtIx g45Z278VfsK969r4koY0RFdOpXSFktS2i5rOp3T/l3eNpUCwNBzGAfvbnW28Y9T/KMDu7HsFM IxpfN6SsA89L0hhG+1PijD5OFPUGBnnNEAOpw/iRGx6dE8OCU3zXmbDWB0IDcpjIrleOh3P8T 9ENP+71eyynPjunFOYpFIH85/Mbj7rKq3VglZPnVZFjLFBxwa+qonROQZ/WeOaciGzXJH+ZnB 5EjJ8GP4pHVxWdblJPDEObObU5AdYCBcvsvJQlG4OwdXeG6Mu7gK6JHsZOSSosicGkNDSsq9H Z5p0Dnk1qBfEw8nXuSHpz9JxtJ/qR6dYiC6dZ9DQmIUmKrSEvVUE4AoGgTqJuTGgKnO9vxpR+ SVNNx4MkPBPVk5d6rltF7y55X0qRbLUk2QReIg== X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180225_061202_301684_629BFBE0 X-CRM114-Status: UNSURE ( 8.31 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Stefan Wahren , devicetree@vger.kernel.org, Florian Fainelli , Phil Elwell , linux-bluetooth@vger.kernel.org, Lukas Wunner , linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP According to the devicetree binding the shutdown and device wake GPIOs are optional. Since commit 3e81a4ca51a1 ("Bluetooth: hci_bcm: Mandate presence of shutdown and device wake GPIO") this driver won't probe anymore on Raspberry Pi 3 and Zero W (no device wake GPIO connected). So fix this regression by reverting this commit partially. Cc: Lukas Wunner Fixes: 3e81a4ca51a1 ("Bluetooth: hci_bcm: Mandate presence of shutdown and device wake GPIO") Signed-off-by: Stefan Wahren --- drivers/bluetooth/hci_bcm.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/bluetooth/hci_bcm.c b/drivers/bluetooth/hci_bcm.c index 0438a64..f8728eb 100644 --- a/drivers/bluetooth/hci_bcm.c +++ b/drivers/bluetooth/hci_bcm.c @@ -922,12 +922,14 @@ static int bcm_get_resources(struct bcm_device *dev) dev->clk = devm_clk_get(dev->dev, NULL); - dev->device_wakeup = devm_gpiod_get(dev->dev, "device-wakeup", - GPIOD_OUT_LOW); + dev->device_wakeup = devm_gpiod_get_optional(dev->dev, + "device-wakeup", + GPIOD_OUT_LOW); if (IS_ERR(dev->device_wakeup)) return PTR_ERR(dev->device_wakeup); - dev->shutdown = devm_gpiod_get(dev->dev, "shutdown", GPIOD_OUT_LOW); + dev->shutdown = devm_gpiod_get_optional(dev->dev, "shutdown", + GPIOD_OUT_LOW); if (IS_ERR(dev->shutdown)) return PTR_ERR(dev->shutdown);