Re: [PATCH] staging: greybus: arche-apb-ctrl.c: Switch to the gpio descriptor interface

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

 



On Sun, Nov 11, 2018 at 11:14:14AM +0530, Nishad Kamdar wrote:
> Use the gpiod interface instead of the deprecated old non-descriptor
> interface.
> 
> Signed-off-by: Nishad Kamdar <nishadkamdar@xxxxxxxxx>
> ---
>  drivers/staging/greybus/arche-apb-ctrl.c | 158 ++++++++++-------------
>  1 file changed, 65 insertions(+), 93 deletions(-)

> -	apb->pwrdn_gpio = of_get_named_gpio(np, "pwr-down-gpios", 0);
> -	if (apb->pwrdn_gpio < 0)
> -		dev_warn(dev, "failed to get power down gpio\n");
> +	apb->pwrdn = devm_gpiod_get(dev, "gb,pwr-down-gpios", GPIOD_OUT_LOW);
> +	if (IF_ERR(apb->pwrdn)) {

Looks like you didn't even compile test this one. :(

> +		ret = PTR_ERR(apb->pwrdn);
> +		dev_warn(dev, "Failed requesting power down GPIO: %d\n", ret);
> +		return ret;
> +	}

Johan
_______________________________________________
greybus-dev mailing list
greybus-dev@xxxxxxxxxxxxxxxx
https://lists.linaro.org/mailman/listinfo/greybus-dev




[Index of Archives]     [Asterisk App Development]     [PJ SIP]     [Gnu Gatekeeper]     [IETF Sipping]     [Info Cyrus]     [ALSA User]     [Fedora Linux Users]     [Linux SCTP]     [DCCP]     [Gimp]     [Yosemite News]     [Deep Creek Hot Springs]     [Yosemite Campsites]     [ISDN Cause Codes]     [Asterisk Books]

  Powered by Linux