Re: [PATCH 10/19 v3] regulator: s2mps11: Pass descriptor instead of GPIO number

2018-05-30 Thread Mark Brown
On Wed, May 30, 2018 at 03:44:08PM +0200, Bartlomiej Zolnierkiewicz wrote: > The similar issue with shared GPIOs seems to be present in commit > c89c00e2b8f0 ("regulator: max77686: Pass descriptor instead of GPIO > number") and Midas board (arch/arm/boot/dts/exynos4412-midas.dtsi). > I don't have

Re: [PATCH 10/19 v3] regulator: s2mps11: Pass descriptor instead of GPIO number

2018-05-30 Thread Mark Brown
On Wed, May 30, 2018 at 03:44:08PM +0200, Bartlomiej Zolnierkiewicz wrote: > The similar issue with shared GPIOs seems to be present in commit > c89c00e2b8f0 ("regulator: max77686: Pass descriptor instead of GPIO > number") and Midas board (arch/arm/boot/dts/exynos4412-midas.dtsi). > I don't have

Re: [PATCH 10/19 v3] regulator: s2mps11: Pass descriptor instead of GPIO number

2018-05-30 Thread Bartlomiej Zolnierkiewicz
On Monday, May 28, 2018 01:29:07 PM Bartlomiej Zolnierkiewicz wrote: > > Hi Linus, > > On Monday, May 28, 2018 10:41:31 AM Linus Walleij wrote: > > On Sat, May 26, 2018 at 12:02 PM, Mark Brown wrote: > > > On Mon, May 14, 2018 at 10:06:31AM +0200, Linus Walleij wrote: > > >> Instead of passing

Re: [PATCH 10/19 v3] regulator: s2mps11: Pass descriptor instead of GPIO number

2018-05-30 Thread Bartlomiej Zolnierkiewicz
On Monday, May 28, 2018 01:29:07 PM Bartlomiej Zolnierkiewicz wrote: > > Hi Linus, > > On Monday, May 28, 2018 10:41:31 AM Linus Walleij wrote: > > On Sat, May 26, 2018 at 12:02 PM, Mark Brown wrote: > > > On Mon, May 14, 2018 at 10:06:31AM +0200, Linus Walleij wrote: > > >> Instead of passing

Re: [PATCH 10/19 v3] regulator: s2mps11: Pass descriptor instead of GPIO number

2018-05-30 Thread Linus Walleij
On Mon, May 28, 2018 at 2:26 PM, Andy Shevchenko wrote: > On Mon, May 28, 2018 at 2:29 PM, Bartlomiej Zolnierkiewicz > wrote: > >> - s2mps11->ext_control_gpiod = devm_kmalloc(>dev, >> + s2mps11->ext_control_gpiod = devm_kzalloc(>dev, >>

Re: [PATCH 10/19 v3] regulator: s2mps11: Pass descriptor instead of GPIO number

2018-05-30 Thread Linus Walleij
On Mon, May 28, 2018 at 2:26 PM, Andy Shevchenko wrote: > On Mon, May 28, 2018 at 2:29 PM, Bartlomiej Zolnierkiewicz > wrote: > >> - s2mps11->ext_control_gpiod = devm_kmalloc(>dev, >> + s2mps11->ext_control_gpiod = devm_kzalloc(>dev, >>

Re: [PATCH 10/19 v3] regulator: s2mps11: Pass descriptor instead of GPIO number

2018-05-29 Thread Mark Brown
On Mon, May 28, 2018 at 01:29:07PM +0200, Bartlomiej Zolnierkiewicz wrote: > I've also tested the new code (with fixup) on Artik5 board (which > actually uses GPIO properties) and discovered the other problem, > the GPIO core code doesn't handle shared GPIOs which are used by > many platforms.

Re: [PATCH 10/19 v3] regulator: s2mps11: Pass descriptor instead of GPIO number

2018-05-29 Thread Mark Brown
On Mon, May 28, 2018 at 01:29:07PM +0200, Bartlomiej Zolnierkiewicz wrote: > I've also tested the new code (with fixup) on Artik5 board (which > actually uses GPIO properties) and discovered the other problem, > the GPIO core code doesn't handle shared GPIOs which are used by > many platforms.

Re: [PATCH 10/19 v3] regulator: s2mps11: Pass descriptor instead of GPIO number

2018-05-28 Thread Andy Shevchenko
On Mon, May 28, 2018 at 2:29 PM, Bartlomiej Zolnierkiewicz wrote: > - s2mps11->ext_control_gpiod = devm_kmalloc(>dev, > + s2mps11->ext_control_gpiod = devm_kzalloc(>dev, > sizeof(*s2mps11->ext_control_gpiod) * rdev_num, >

Re: [PATCH 10/19 v3] regulator: s2mps11: Pass descriptor instead of GPIO number

2018-05-28 Thread Andy Shevchenko
On Mon, May 28, 2018 at 2:29 PM, Bartlomiej Zolnierkiewicz wrote: > - s2mps11->ext_control_gpiod = devm_kmalloc(>dev, > + s2mps11->ext_control_gpiod = devm_kzalloc(>dev, > sizeof(*s2mps11->ext_control_gpiod) * rdev_num, > GFP_KERNEL);

Re: [PATCH 10/19 v3] regulator: s2mps11: Pass descriptor instead of GPIO number

2018-05-28 Thread Bartlomiej Zolnierkiewicz
Hi Linus, On Monday, May 28, 2018 10:41:31 AM Linus Walleij wrote: > On Sat, May 26, 2018 at 12:02 PM, Mark Brown wrote: > > On Mon, May 14, 2018 at 10:06:31AM +0200, Linus Walleij wrote: > >> Instead of passing a global GPIO number for the enable GPIO, pass > >> a

Re: [PATCH 10/19 v3] regulator: s2mps11: Pass descriptor instead of GPIO number

2018-05-28 Thread Bartlomiej Zolnierkiewicz
Hi Linus, On Monday, May 28, 2018 10:41:31 AM Linus Walleij wrote: > On Sat, May 26, 2018 at 12:02 PM, Mark Brown wrote: > > On Mon, May 14, 2018 at 10:06:31AM +0200, Linus Walleij wrote: > >> Instead of passing a global GPIO number for the enable GPIO, pass > >> a descriptor looked up with the

Re: [PATCH 10/19 v3] regulator: s2mps11: Pass descriptor instead of GPIO number

2018-05-28 Thread Linus Walleij
On Sat, May 26, 2018 at 12:02 PM, Mark Brown wrote: > On Mon, May 14, 2018 at 10:06:31AM +0200, Linus Walleij wrote: >> Instead of passing a global GPIO number for the enable GPIO, pass >> a descriptor looked up with the standard devm_gpiod_get_optional() >> call. >> >> This

Re: [PATCH 10/19 v3] regulator: s2mps11: Pass descriptor instead of GPIO number

2018-05-28 Thread Linus Walleij
On Sat, May 26, 2018 at 12:02 PM, Mark Brown wrote: > On Mon, May 14, 2018 at 10:06:31AM +0200, Linus Walleij wrote: >> Instead of passing a global GPIO number for the enable GPIO, pass >> a descriptor looked up with the standard devm_gpiod_get_optional() >> call. >> >> This regulator supports

Re: [PATCH 10/19 v3] regulator: s2mps11: Pass descriptor instead of GPIO number

2018-05-26 Thread Mark Brown
On Mon, May 14, 2018 at 10:06:31AM +0200, Linus Walleij wrote: > Instead of passing a global GPIO number for the enable GPIO, pass > a descriptor looked up with the standard devm_gpiod_get_optional() > call. > > This regulator supports passing platform data, but enable/sleep > regulators are

Re: [PATCH 10/19 v3] regulator: s2mps11: Pass descriptor instead of GPIO number

2018-05-26 Thread Mark Brown
On Mon, May 14, 2018 at 10:06:31AM +0200, Linus Walleij wrote: > Instead of passing a global GPIO number for the enable GPIO, pass > a descriptor looked up with the standard devm_gpiod_get_optional() > call. > > This regulator supports passing platform data, but enable/sleep > regulators are

Re: [PATCH 10/19 v3] regulator: s2mps11: Pass descriptor instead of GPIO number

2018-05-14 Thread Krzysztof Kozlowski
On Mon, May 14, 2018 at 10:06 AM, Linus Walleij wrote: > Instead of passing a global GPIO number for the enable GPIO, pass > a descriptor looked up with the standard devm_gpiod_get_optional() > call. > > This regulator supports passing platform data, but enable/sleep >

Re: [PATCH 10/19 v3] regulator: s2mps11: Pass descriptor instead of GPIO number

2018-05-14 Thread Krzysztof Kozlowski
On Mon, May 14, 2018 at 10:06 AM, Linus Walleij wrote: > Instead of passing a global GPIO number for the enable GPIO, pass > a descriptor looked up with the standard devm_gpiod_get_optional() > call. > > This regulator supports passing platform data, but enable/sleep > regulators are looked up

[PATCH 10/19 v3] regulator: s2mps11: Pass descriptor instead of GPIO number

2018-05-14 Thread Linus Walleij
Instead of passing a global GPIO number for the enable GPIO, pass a descriptor looked up with the standard devm_gpiod_get_optional() call. This regulator supports passing platform data, but enable/sleep regulators are looked up from the device tree exclusively, so we can need not touch other

[PATCH 10/19 v3] regulator: s2mps11: Pass descriptor instead of GPIO number

2018-05-14 Thread Linus Walleij
Instead of passing a global GPIO number for the enable GPIO, pass a descriptor looked up with the standard devm_gpiod_get_optional() call. This regulator supports passing platform data, but enable/sleep regulators are looked up from the device tree exclusively, so we can need not touch other