Re: [PATCH RFC 2/2] gpiolib: check the 'ngpios' property in core gpiolib code
From: Linus Walleij
Date: Thu Nov 11 2021 - 15:32:00 EST
On Thu, Nov 11, 2021 at 9:25 PM Bartosz Golaszewski <brgl@xxxxxxxx> wrote:
> Several drivers read the 'ngpios' device property on their own, but
> since it's defined as a standard GPIO property in the device tree bindings
> anyway, it's a good candidate for generalization. If the driver didn't
> set its gc->ngpio, try to read the 'ngpios' property from the GPIO
> device's firmware node before bailing out.
>
> Signed-off-by: Bartosz Golaszewski <brgl@xxxxxxxx>
> Suggested-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>
Nice!
Reviewed-by: Linus Walleij <linus.walleij@xxxxxxxxxx>
Yours,
Linus Walleij