diff options
| author | Bartosz Golaszewski <bartosz.golaszewski@linaro.org> | 2025-02-27 09:37:48 +0100 |
|---|---|---|
| committer | Bartosz Golaszewski <bartosz.golaszewski@linaro.org> | 2025-03-03 09:34:35 +0100 |
| commit | 9778568dede2166c7bd124d473f9ec365f782935 (patch) | |
| tree | 3e1cb0d3b1c9cc9a77e3afb847f2526cf0458064 | |
| parent | 6224e7fc1ce75edcd03b56a2e0fd4c1765d5888e (diff) | |
gpiolib: update kerneldocs for value setters
Value setters now return int and can indicate failure. Update the
kerneldocs.
Link: https://lore.kernel.org/r/20250227083748.22400-2-brgl@bgdev.pl
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
| -rw-r--r-- | drivers/gpio/gpiolib.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c index ec2217a30db3..8724c7d8459e 100644 --- a/drivers/gpio/gpiolib.c +++ b/drivers/gpio/gpiolib.c @@ -3761,6 +3761,9 @@ int gpiod_set_array_value_complex(bool raw, bool can_sleep, * * This function can be called from contexts where we cannot sleep, and will * complain if the GPIO chip functions potentially sleep. + * + * Returns: + * 0 on success, negative error number on failure. */ int gpiod_set_raw_value(struct gpio_desc *desc, int value) { @@ -3779,6 +3782,9 @@ EXPORT_SYMBOL_GPL(gpiod_set_raw_value); * This sets the value of a GPIO line backing a descriptor, applying * different semantic quirks like active low and open drain/source * handling. + * + * Returns: + * 0 on success, negative error number on failure. */ static int gpiod_set_value_nocheck(struct gpio_desc *desc, int value) { @@ -3803,6 +3809,9 @@ static int gpiod_set_value_nocheck(struct gpio_desc *desc, int value) * * This function can be called from contexts where we cannot sleep, and will * complain if the GPIO chip functions potentially sleep. + * + * Returns: + * 0 on success, negative error number on failure. */ int gpiod_set_value(struct gpio_desc *desc, int value) { @@ -4227,6 +4236,9 @@ EXPORT_SYMBOL_GPL(gpiod_get_array_value_cansleep); * regard for its ACTIVE_LOW status. * * This function is to be called from contexts that can sleep. + * + * Returns: + * 0 on success, negative error number on failure. */ int gpiod_set_raw_value_cansleep(struct gpio_desc *desc, int value) { @@ -4245,6 +4257,9 @@ EXPORT_SYMBOL_GPL(gpiod_set_raw_value_cansleep); * account * * This function is to be called from contexts that can sleep. + * + * Returns: + * 0 on success, negative error number on failure. */ int gpiod_set_value_cansleep(struct gpio_desc *desc, int value) { |
