summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2025-02-12 13:49:09 +0300
committerAndy Shevchenko <andriy.shevchenko@linux.intel.com>2025-02-12 13:49:09 +0300
commit76256c6edf299a0ece0a1b7a85471184e73aa6c8 (patch)
treea23155b59f0e240fdc46143d1e85995bb5aa679c
parent2014c95afecee3e76ca4a56956a936e23283f05b (diff)
parent91931af18bd22437e08e2471f5484d6fbdd8ab93 (diff)
downloadlinux-76256c6edf299a0ece0a1b7a85471184e73aa6c8.tar.xz
Merge tag 'gpio-set-array-helper-v6.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux into auxdisplay
Add gpiod_multi_set_value_cansleep() to GPIO core which will be used in the followup changes. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
-rw-r--r--include/linux/gpio/consumer.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/linux/gpio/consumer.h b/include/linux/gpio/consumer.h
index db2dfbae8edb..5cbd4afd7862 100644
--- a/include/linux/gpio/consumer.h
+++ b/include/linux/gpio/consumer.h
@@ -3,6 +3,7 @@
#define __LINUX_GPIO_CONSUMER_H
#include <linux/bits.h>
+#include <linux/err.h>
#include <linux/types.h>
struct acpi_device;
@@ -655,4 +656,14 @@ static inline void gpiod_unexport(struct gpio_desc *desc)
#endif /* CONFIG_GPIOLIB && CONFIG_GPIO_SYSFS */
+static inline int gpiod_multi_set_value_cansleep(struct gpio_descs *descs,
+ unsigned long *value_bitmap)
+{
+ if (IS_ERR_OR_NULL(descs))
+ return PTR_ERR_OR_ZERO(descs);
+
+ return gpiod_set_array_value_cansleep(descs->ndescs, descs->desc,
+ descs->info, value_bitmap);
+}
+
#endif