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 linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux