Re: [PATCH v4] gpio: mmio: handle "ngpios" properly in bgpio_init()

From: Linus Walleij
Date: Sun Jul 16 2023 - 03:42:58 EST


On Mon, Mar 6, 2023 at 10:12 PM Asmaa Mnebhi <asmaa@xxxxxxxxxx> wrote:

> bgpio_init() uses "sz" argument to populate ngpio, which is not
> accurate. Instead, read the "ngpios" property from the DT and if it
> doesn't exist, use the "sz" argument. With this change, drivers no
> longer need to overwrite the ngpio variable after calling bgpio_init().
>
> Signed-off-by: Asmaa Mnebhi <asmaa@xxxxxxxxxx>

Reviewed-by: Linus Walleij <linus.walleij@xxxxxxxxxx>

Yours,
Linus Walleij