]> www.infradead.org Git - users/jedix/linux-maple.git/commit
gpiolib: make value setters have return values
authorBartosz Golaszewski <bartosz.golaszewski@linaro.org>
Thu, 20 Feb 2025 09:56:59 +0000 (10:56 +0100)
committerBartosz Golaszewski <bartosz.golaszewski@linaro.org>
Wed, 26 Feb 2025 10:17:39 +0000 (11:17 +0100)
commit8ce258f62f90cb2d339cc39fa43e5634594a9dfb
tree0097852131964323c05d439333405f792db43440
parent129fdfe25ac513018d5fe85b0c493025193ef19f
gpiolib: make value setters have return values

Change the in-kernel consumer interface for GPIOs: make all variants of
value setters that don't have a return value, return a signed integer
instead. That will allow these routines to indicate failures to callers.

This doesn't change the implementation just yet, we'll do it in
subsequent commits.

We need to update the gpio-latch module as it passes the address of
value setters as a function pointer argument and thus cares about its
type.

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-2-bc4cfd38dae3@linaro.org
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
drivers/gpio/gpio-latch.c
drivers/gpio/gpiolib.c
include/linux/gpio.h
include/linux/gpio/consumer.h