Re: [PATCH v2 2/4] gpio: Add a valid_mask getter

From: Linus Walleij
Date: Tue Mar 04 2025 - 02:57:13 EST


On Fri, Feb 28, 2025 at 1:35 PM Matti Vaittinen
<mazziesaccount@xxxxxxxxx> wrote:

> The valid_mask member of the struct gpio_chip is unconditionally written
> by the GPIO core at driver registration. It shouldn't be directly
> populated by drivers. This can be prevented by moving it from the struct
> gpio_chip to struct gpio_device, which is internal to the GPIO core.
>
> As a preparatory step, provide a getter function which can be used by
> those drivers which need the valid_mask information.
>
> Signed-off-by: Matti Vaittinen <mazziesaccount@xxxxxxxxx>

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

Yours,
Linus Walleij