Re: [PATCH 1/4] Bluetooth: hci_bcm: Make shutdown and device wake GPIO optional

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <lukas@xxxxxxxxx>

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);
>  
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux