Messages in this thread | | | From | Janusz Krzysztofik <> | Subject | Re: [PATCH v7] regulator: fixed: Convert to use GPIO descriptor only | Date | Mon, 10 Sep 2018 19:01:31 +0200 |
| |
Hi Linus,
On Thursday, September 6, 2018 2:24:36 PM CEST Linus Walleij wrote: > As we augmented the regulator core to accept a GPIO descriptor instead > of a GPIO number, we can augment the fixed GPIO regulator to look up > and pass that descriptor directly from device tree or board GPIO > descriptor look up tables. > > Some boards just auto-enumerate their fixed regulator platform devices > and I have assumed they get names like "fixed-regulator.0" but it's > pretty hard to guess this. I need some testing from board maintainers to > be sure. Other boards are straight forward, using just plain > "fixed-regulator" (ID -1) or "fixed-regulator.1" hammering down the > device ID. > > It seems the da9055 and da9211 has never got around to actually passing > any enable gpio into its platform data (not the in-tree code anyway) so we > can just decide to simply pass a descriptor instead. > > The fixed GPIO-controlled regulator in mach-pxa/ezx.c was confusingly named > "*_dummy_supply_device" while it is a very real device backed by a GPIO > line. There is nothing dummy about it at all, so I renamed it with the > infix *_regulator_* as part of this patch set. > > Intel MID portions tested by Andy. > > Cc: Janusz Krzysztofik <jmkrzyszt@gmail.com> # OMAP1 > Cc: Alexander Shiyan <shc_work@mail.ru> # i.MX boards user > Cc: Haojian Zhuang <haojian.zhuang@gmail.com> # MMP2 maintainer > Cc: Aaro Koskinen <aaro.koskinen@iki.fi> # OMAP1 maintainer > Cc: Mike Rapoport <rppt@linux.vnet.ibm.com> # EM-X270 maintainer > Cc: Robert Jarzmik <robert.jarzmik@free.fr> # EZX maintainer > Cc: Philipp Zabel <philipp.zabel@gmail.com> # Magician maintainer > Cc: Daniel Mack <zonque@gmail.com> # Raumfeld maintainer > Cc: Marc Zyngier <marc.zyngier@arm.com> # Zeus maintainer > Cc: Jacopo Mondi <jacopo@jmondi.org> # SH Ecovec24 > Cc: Geert Uytterhoeven <geert+renesas@glider.be> # SuperH pinctrl/GPIO maintainer > Cc: Russell King <rmk+kernel@armlinux.org.uk> # SA1100 > Tested-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> # Check the x86 BCM stuff > Acked-by: Tony Lindgren <tony@atomide.com> # OMAP1,2,3 maintainer > Signed-off-by: Linus Walleij <linus.walleij@linaro.org> > --- > ChangeLog v6->v7: > - As the autobuilder churned along, after 24+ hours it was testing > SH and found a bug in the ecovec24 boardfile. It does test a > SH arch byt default, sh7763rdp_defconfig, sadly not this one. > So it discovers more obscure boards in later testing. > - Shaked out this bug too and re-pushed and posted. > ChangeLog v5->v6: > - New code appeared in the OMAP1 AMS delta board that added a > new user of the removed .gpio member. The build robot was first > happy, then came back later and was not happy. > - Fixed up the offending .gpio, now rebuilt for this OMAP1 > board specifically to make sure it really really work now. > ChangeLog v4->v5: > - Rebased on v4.19-rc1 > - Put the OMAP1 AMD delta GPIO table addition in the *TOP* > of the ams_delta_gpio_tables[] so Janusz can add any > new addtions on the *BOTTOM* > - Hopefully we can merge this now. > ChangeLog v3->v4: > - Rebase and adapt the OMAP1 changes for the GPIO descriptor > look-up tables deployed by Janusz. > - Add two calls to add the GPIO descriptor tables properly on > the Super-H Ecovec24 board as pointed out by Geert. > - Go over all patches to board files and make sure we pass > a NULL descriptor instead of an "enable" descriptor. The code > is looking for unnamed GPIOs as the device tree also just pass > gpio[s] = <&foo> so board files also need to use anonymous > GPIOs. > - Fold in an EZX fix from Arnd Bergmann. > - Add Andy's Tested-by tag. > - Send this patch *ALONE* as I realized I need to take smaller > steps so things do not blow up left and right. > ChangeLog v2->v3: > - Resending. > ChangeLog v1->v2: > - Rebase the patch on mainline with Blackfin gone and other changes. > - Fix up the new users that appeared in sa1100 > - Drop some suplus comments in x86. > --- > arch/arm/mach-imx/mach-mx21ads.c | 12 ++++++- > arch/arm/mach-imx/mach-mx27ads.c | 12 ++++++- > arch/arm/mach-mmp/brownstone.c | 12 ++++++- > arch/arm/mach-omap1/board-ams-delta.c | 12 +++++-- > arch/arm/mach-omap2/pdata-quirks.c | 16 ++++++++- > arch/arm/mach-pxa/em-x270.c | 1 - > arch/arm/mach-pxa/ezx.c | 33 ++++++++++++------- > arch/arm/mach-pxa/magician.c | 2 +- > arch/arm/mach-pxa/raumfeld.c | 12 +++++-- > arch/arm/mach-pxa/zeus.c | 23 +++++++++++-- > arch/arm/mach-s3c64xx/mach-crag6410.c | 1 - > arch/arm/mach-s3c64xx/mach-smdk6410.c | 1 - > arch/arm/mach-sa1100/assabet.c | 21 ++++++++---- > arch/arm/mach-sa1100/generic.c | 5 +-- > arch/arm/mach-sa1100/generic.h | 3 +- > arch/arm/mach-sa1100/shannon.c | 4 +-- > arch/sh/boards/mach-ecovec24/setup.c | 27 +++++++++++++-- > .../intel-mid/device_libs/platform_bcm43xx.c | 17 ++++++++-- > drivers/regulator/fixed-helper.c | 1 - > drivers/regulator/fixed.c | 33 +++++++++---------- > include/linux/regulator/fixed.h | 3 -- > 21 files changed, 188 insertions(+), 63 deletions(-)
For arch/arm/mach-omap1/board-ams-delta.c: Reviewed-by: Janusz Krzysztofik <jmkrzyszt@gmail.com>
Thanks, Janusz
| |