Received: by 10.192.165.156 with SMTP id m28csp65880imm; Tue, 10 Apr 2018 16:31:47 -0700 (PDT) X-Google-Smtp-Source: AIpwx49hIy+elUUpIz0UDmjuafYUYV64vkpXzbZyYvobaPgH1UCJXVJ0Z5fX7sCINsFevwNbqJdc X-Received: by 2002:a17:902:2d01:: with SMTP id o1-v6mr2400261plb.309.1523403107448; Tue, 10 Apr 2018 16:31:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523403107; cv=none; d=google.com; s=arc-20160816; b=xdXMR50qIMjru6j5WmuYxSMQoy7PKEFDZfhVMfYNb3jUBSyTBU6yYFx8vtdUxRvnZx AiBM02dJd2yjL2dZkQo3nGvdyTme1iNla9iPhvjf5+5SCM107p1Ojc6z15mdF5zVozve j6+XSsQubJaO3CEX0JJ193UXt2SV81j+39k50nxhqZhSjBX3YId+mJ4+SPmvZiXdZHJc 54KKK9jBu2KVCqinYE59IopQeaelnVsn0V6o1qZ2oZ6CX+5MbH+ujFEExlKn1VwHPuG7 SnVDsn6stdna1h2xcRvZftxo5G8ZiKo6tWiWNFth/o9GKKe7a7ZJKiMOQn7wEe3jszMY v8Ew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=YpRmibwjH0mT8G77tgp2F45z8xCETfvwjVgyPS8byiA=; b=fV1wBdqTGQbL28RlhV4FBiBn3BDsfBFxV2B4RvnVL6+3ooAeQN1cDRMfnOut7XDkZd QeUJh8TNNP8mIhLn1YXtoSJNQKbWmFtw8flvBHhcMtU1FlyDdUWSoB8yRof37xCVs4o/ rqfocH/IN2RPhlQhNuL2Xj1eOM33A+xf0TsEu+BvCmkX/5+RN0MsCxhq+69KDhZ/N70N r6I+ysUjrnnXli8mbFvvdFqotFlgyf5At7JCRPKw7EQyo4RKdMkKvBZpH4DXoFD/g7N1 VsTNbzL8t7rVsN/0I69h9POE2jd4/x6VGbMlfBL58X1CtCXNEOUPK9w+4X0VamiFqqxW j0Cw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-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 h4-v6si3558200pln.744.2018.04.10.16.31.10; Tue, 10 Apr 2018 16:31:47 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-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 linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754385AbeDJW3t (ORCPT + 99 others); Tue, 10 Apr 2018 18:29:49 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:39716 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752920AbeDJW3r (ORCPT ); Tue, 10 Apr 2018 18:29:47 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 1716CDB8; Tue, 10 Apr 2018 22:29:46 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Stefan Wahren , Lukas Wunner , Marcel Holtmann Subject: [PATCH 4.15 089/168] Bluetooth: hci_bcm: Make shutdown and device wake GPIO optional Date: Wed, 11 Apr 2018 00:23:51 +0200 Message-Id: <20180410212804.054618580@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180410212800.144079021@linuxfoundation.org> References: <20180410212800.144079021@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.15-stable review patch. If anyone has any objections, please let me know. ------------------ From: Stefan Wahren commit ab2f336cb7e629de74d8af06bcaf6b15e4230e19 upstream. 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. Fixes: 3e81a4ca51a1 ("Bluetooth: hci_bcm: Mandate presence of shutdown and device wake GPIO") Signed-off-by: Stefan Wahren Reviewed-by: Lukas Wunner Signed-off-by: Marcel Holtmann Signed-off-by: Greg Kroah-Hartman --- drivers/bluetooth/hci_bcm.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) --- a/drivers/bluetooth/hci_bcm.c +++ b/drivers/bluetooth/hci_bcm.c @@ -775,12 +775,13 @@ static int bcm_get_resources(struct bcm_ 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);