Re: [PATCH 05/21] regulator: arizona-ldo1: Look up a descriptor and pass to the core
On Thu, Apr 19, 2018 at 03:43:22PM +0200, Linus Walleij wrote: > On Tue, Feb 13, 2018 at 12:06 PM, Charles Keepax >wrote: > > 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: patc...@opensource.cirrus.com > >> Cc: Richard Fitzgerald > >> Signed-off-by: Linus Walleij > >> --- > > 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. > > Actually not, because I fixed that in the special quirk patch > 6a537d48461d > "gpio: of: Support regulator nonstandard GPIO properties" > as mentioned in the commit message. (Will clarify.) Apologies my bad should have spotted that in the commit message. Thanks, Charles
Re: [PATCH 05/21] regulator: arizona-ldo1: Look up a descriptor and pass to the core
On Thu, Apr 19, 2018 at 03:43:22PM +0200, Linus Walleij wrote: > On Tue, Feb 13, 2018 at 12:06 PM, Charles Keepax > wrote: > > 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: patc...@opensource.cirrus.com > >> Cc: Richard Fitzgerald > >> Signed-off-by: Linus Walleij > >> --- > > 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. > > Actually not, because I fixed that in the special quirk patch > 6a537d48461d > "gpio: of: Support regulator nonstandard GPIO properties" > as mentioned in the commit message. (Will clarify.) Apologies my bad should have spotted that in the commit message. Thanks, Charles
Re: [PATCH 05/21] regulator: arizona-ldo1: Look up a descriptor and pass to the core
On Tue, Feb 13, 2018 at 12:06 PM, Charles Keepaxwrote: > 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: patc...@opensource.cirrus.com >> Cc: Richard Fitzgerald >> Signed-off-by: Linus Walleij >> --- >> drivers/regulator/arizona-ldo1.c | 19 ++- >> include/linux/regulator/arizona-ldo1.h | 3 --- >> 2 files changed, 6 insertions(+), 16 deletions(-) >> > > Does this patch not also need to update the hookups in > arch/arm/mach-s3c64xx/mach-crag6410-module.c? There is > wm5102_reva_pdata and wm5102_pdata both of which use the ldoena > you are removing here? OK fixed this! > 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. Actually not, because I fixed that in the special quirk patch 6a537d48461d "gpio: of: Support regulator nonstandard GPIO properties" as mentioned in the commit message. (Will clarify.) Yours, Linus Walleij
Re: [PATCH 05/21] regulator: arizona-ldo1: Look up a descriptor and pass to the core
On Tue, Feb 13, 2018 at 12:06 PM, Charles Keepax wrote: > 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: patc...@opensource.cirrus.com >> Cc: Richard Fitzgerald >> Signed-off-by: Linus Walleij >> --- >> drivers/regulator/arizona-ldo1.c | 19 ++- >> include/linux/regulator/arizona-ldo1.h | 3 --- >> 2 files changed, 6 insertions(+), 16 deletions(-) >> > > Does this patch not also need to update the hookups in > arch/arm/mach-s3c64xx/mach-crag6410-module.c? There is > wm5102_reva_pdata and wm5102_pdata both of which use the ldoena > you are removing here? OK fixed this! > 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. Actually not, because I fixed that in the special quirk patch 6a537d48461d "gpio: of: Support regulator nonstandard GPIO properties" as mentioned in the commit message. (Will clarify.) Yours, Linus Walleij
Re: [PATCH 05/21] regulator: arizona-ldo1: Look up a descriptor and pass to the core
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: patc...@opensource.cirrus.com > Cc: Richard Fitzgerald> Signed-off-by: Linus Walleij > --- > - config.ena_gpio = pdata->ldoena; > + /* We assume that high output = regulator off */ > + config.ena_gpiod = devm_gpiod_get_optional(>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
Re: [PATCH 05/21] regulator: arizona-ldo1: Look up a descriptor and pass to the core
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: patc...@opensource.cirrus.com > Cc: Richard Fitzgerald > Signed-off-by: Linus Walleij > --- > - config.ena_gpio = pdata->ldoena; > + /* We assume that high output = regulator off */ > + config.ena_gpiod = devm_gpiod_get_optional(>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
Re: [PATCH 05/21] regulator: arizona-ldo1: Look up a descriptor and pass to the core
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: patc...@opensource.cirrus.com > Cc: Richard Fitzgerald> Signed-off-by: Linus Walleij > --- > drivers/regulator/arizona-ldo1.c | 19 ++- > include/linux/regulator/arizona-ldo1.h | 3 --- > 2 files changed, 6 insertions(+), 16 deletions(-) > Does this patch not also need to update the hookups in arch/arm/mach-s3c64xx/mach-crag6410-module.c? There is wm5102_reva_pdata and wm5102_pdata both of which use the ldoena you are removing here? Thanks, Charles
Re: [PATCH 05/21] regulator: arizona-ldo1: Look up a descriptor and pass to the core
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: patc...@opensource.cirrus.com > Cc: Richard Fitzgerald > Signed-off-by: Linus Walleij > --- > drivers/regulator/arizona-ldo1.c | 19 ++- > include/linux/regulator/arizona-ldo1.h | 3 --- > 2 files changed, 6 insertions(+), 16 deletions(-) > Does this patch not also need to update the hookups in arch/arm/mach-s3c64xx/mach-crag6410-module.c? There is wm5102_reva_pdata and wm5102_pdata both of which use the ldoena you are removing here? Thanks, Charles