Commit 9778568d authored by Bartosz Golaszewski's avatar Bartosz Golaszewski
Browse files

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: default avatarBartosz Golaszewski <bartosz.golaszewski@linaro.org>
parent 6224e7fc
Loading
Loading
Loading
Loading
+15 −0
Original line number Diff line number Diff line
@@ -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)
{