Re: [PATCH v2 3/4] gpio: gpio-rcar: Drop direct use of valid_mask

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Feb 28, 2025 at 1:36 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 should not be directly
> populated by the drivers. Hiding the valid_mask in struct gpio_device
> makes it clear it is not meant to be directly populated by drivers. This
> means drivers should not access it directly from the struct gpio_chip.
>
> The gpio-rcar checks the valid mask in set/get_multiple() operations.
> This is no longer needed [1]. Drop these checks.
>
> Additionally, the valid_mask is needed for enabling the GPIO inputs at
> probe time. Use the new valid_mask -getter function instead of accessing
> it directly from the struct gpio_chip.
>
> Signed-off-by: Matti Vaittinen <mazziesaccount@xxxxxxxxx>

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

Yours,
Linus Walleij





[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux