]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
gpiolib: update kerneldocs for value setters
authorBartosz Golaszewski <bartosz.golaszewski@linaro.org>
Thu, 27 Feb 2025 08:37:48 +0000 (09:37 +0100)
committerBartosz Golaszewski <bartosz.golaszewski@linaro.org>
Mon, 3 Mar 2025 08:34:35 +0000 (09:34 +0100)
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>
drivers/gpio/gpiolib.c

index ec2217a30db37d92d53edf3428db2ea92074b616..8724c7d8459e9073882e323bba0dad4c72703882 100644 (file)
@@ -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)
 {