]> www.infradead.org Git - users/jedix/linux-maple.git/commit
gpio: Add a valid_mask getter
authorMatti Vaittinen <mazziesaccount@gmail.com>
Wed, 5 Mar 2025 13:13:00 +0000 (15:13 +0200)
committerBartosz Golaszewski <bartosz.golaszewski@linaro.org>
Wed, 5 Mar 2025 13:36:04 +0000 (14:36 +0100)
commitf636d4f60ac477187a466a573f947731fa762059
tree6c46162efdca8688a6e0a18b6c87a630949dfa8d
parenta501624864f3fd9ab785f1f674f48dca535b198c
gpio: Add a valid_mask getter

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@gmail.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/026f9d78502eca883bfe3faeb684e23d5d6c5e84.1741180097.git.mazziesaccount@gmail.com
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
drivers/gpio/gpiolib.c
include/linux/gpio/driver.h