Messages in this thread | | | Date | Mon, 2 Jul 2018 05:56:23 -0700 | From | Tony Lindgren <> | Subject | Re: [PATCH v2 06/10] ARM: OMAP1: ams-delta FIQ: don't use static GPIO numbers |
| |
* Janusz Krzysztofik <jmkrzyszt@gmail.com> [180621 22:45]: > --- a/arch/arm/mach-omap1/board-ams-delta.c > +++ b/arch/arm/mach-omap1/board-ams-delta.c > @@ -580,6 +580,44 @@ static struct gpiod_hog ams_delta_gpio_hogs[] = { > {}, > }; > > +/* > + * Some drivers may not use GPIO lookup tables but need to be provided > + * with GPIO numbers. The same applies to GPIO based IRQ lines - some > + * drivers may even not use GPIO layer but expect just IRQ numbers. > + * We could either define GPIO lookup tables then use them on behalf > + * of those devices, or we can use GPIO driver level methods for > + * identification of GPIO and IRQ numbers. For the purpose of the latter, > + * defina a helper function which identifies GPIO chips by their labels. > + */ > +static int gpiochip_match_by_label(struct gpio_chip *chip, void *data) > +{ > + char *label = data; > + > + return !strcmp(label, chip->label); > +}
I left out the duplicate gpiochip_match_by_label() above as it's already there from an earlier "ARM: OMAP1: ams-delta: assign LED GPIO numbers from descriptors". The whole series is now pushed out to omap-for-v4.19/omap1 and I'll merge it into my for-next soon.
Thanks,
Tony
| |