Re: [PATCH 05/21] regulator: arizona-ldo1: Look up a descriptor and pass to the core

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

 



On Mon, Feb 12, 2018 at 02:17:01PM +0100, Linus Walleij wrote:
> Instead of passing a global GPIO number, pass a descriptor looked
> up with the standard devm_gpiod_get_optional() call.
> 
> We have augmented the GPIO core to look up the regulator special
> GPIO "wlf,ldoena" in a separate patch.
> 
> Cc: patches@xxxxxxxxxxxxxxxxxxxxx
> Cc: Richard Fitzgerald <rf@xxxxxxxxxxxxxxxxxxxxx>
> Signed-off-by: Linus Walleij <linus.walleij@xxxxxxxxxx>
> ---
> -	config.ena_gpio = pdata->ldoena;
> +	/* We assume that high output = regulator off */
> +	config.ena_gpiod = devm_gpiod_get_optional(&pdev->dev, "wlf,ldoena",
> +						   GPIOD_OUT_HIGH);
> +	if (IS_ERR(config.ena_gpiod))
> +		return PTR_ERR(config.ena_gpiod);

Also looking at this more you will need to you
devm_gpio_get_from_of_node here since the device tree binding is
for wlf,ldoena not wlf,ldoena-gpio. So this patch currently
breaks the binding.

Thanks,
Charles
--
To unsubscribe from this list: send the line "unsubscribe linux-gpio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux