Return-Path: Date: Sun, 25 Feb 2018 16:15:05 +0100 From: Lukas Wunner To: Stefan Wahren Cc: Loic Poulain , =?iso-8859-1?Q?Fr=E9d=E9ric?= Danis , Marcel Holtmann , Johan Hedberg , Eric Anholt , Rob Herring , Mark Rutland , Phil Elwell , Florian Fainelli , linux-bluetooth@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rpi-kernel@lists.infradead.org, devicetree@vger.kernel.org Subject: Re: [PATCH 1/4] Bluetooth: hci_bcm: Make shutdown and device wake GPIO optional Message-ID: <20180225151505.GA17726@wunner.de> References: <1519567855-26105-1-git-send-email-stefan.wahren@i2se.com> <1519567855-26105-2-git-send-email-stefan.wahren@i2se.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii In-Reply-To: <1519567855-26105-2-git-send-email-stefan.wahren@i2se.com> List-ID: On Sun, Feb 25, 2018 at 03:10:52PM +0100, Stefan Wahren wrote: > 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. Okay when submitting 3e81a4ca51a1 I missed that gpiod_set_value() becomes a no-op if the gpio_desc is NULL, I thought it would oops. > - 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); The "device-wakeup" would still fit within 80 chars on the preceding line. Otherwise this is Reviewed-by: Lukas Wunner Thanks, Lukas > 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); >