]> www.infradead.org Git - users/jedix/linux-maple.git/commit
gpiolib: introduce gpio_chip setters that return values
authorBartosz Golaszewski <bartosz.golaszewski@linaro.org>
Thu, 20 Feb 2025 09:57:02 +0000 (10:57 +0100)
committerBartosz Golaszewski <bartosz.golaszewski@linaro.org>
Wed, 26 Feb 2025 10:17:39 +0000 (11:17 +0100)
commit98ce1eb1fd87ea1b016e0913ef6836ab0139b5c4
tree20243ec2af2f9be11c916a8fba6343df5e412a65
parent9b407312755fd5db012413ca005f0f3a661db8dd
gpiolib: introduce gpio_chip setters that return values

Add new variants of the set() and set_multiple() callbacks that have
integer return values allowing to indicate failures to users of the GPIO
consumer API. Until we convert all GPIO providers treewide to using
them, they will live in parallel to the existing ones.

Make sure that providers cannot define both. Prefer the new ones and
only use the old ones as fallback.

Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
Link: https://lore.kernel.org/r/20250220-gpio-set-retval-v2-5-bc4cfd38dae3@linaro.org
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
drivers/gpio/gpiolib.c
include/linux/gpio/driver.h