Re: [PATCH] regulator: arizona-ldo1: Use correct device to get enable GPIO
From: Charles Keepax
Date: Tue Jun 19 2018 - 10:07:47 EST
On Tue, Jun 19, 2018 at 02:24:33PM +0200, Matthias Reichl wrote:
> On Tue, Jun 19, 2018 at 10:32:45AM +0100, Charles Keepax wrote:
> > + config.ena_gpiod = gpiod_get_optional(parent_dev, "wlf,ldoena",
> > + GPIOD_OUT_HIGH);
>
> The WM5102 datasheet lists LDOENA as an active-high input,
> so GPIOD_OUT_HIGH causes arizona-ldo1 to start up enabled.
> Not sure about the other devices from the Arizona family.
>
Yeah all active high.
> I did some tests monitoring ldoena and reset gpios with my scope:
>
> With commit e1739e86f0cb reverted ldoena changes from low to high
> about 1.6ms before reset changes from low to high.
>
> With your patch ldoena goes high about 11.5ms before reset goes high.
>
> With your patch and GPIOD_OUT_HIGH changed to GPIOD_OUT_LOW
> the delay is again about 1.6ms.
>
> So I guess it'd be better to adjust the comment and change
> to gpiod flag to GPIOD_OUT_LOW.
Yeah I am inclined to agree would be better to keep the behaviour
the same as it has always been given these parts are fairly
mature I will respin the patch to add that change too.
Thanks,
Charles