Skip to content

Commit 76256c6

Browse files
committed
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>
2 parents 2014c95 + 91931af commit 76256c6

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

include/linux/gpio/consumer.h

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
#define __LINUX_GPIO_CONSUMER_H
44

55
#include <linux/bits.h>
6+
#include <linux/err.h>
67
#include <linux/types.h>
78

89
struct acpi_device;
@@ -655,4 +656,14 @@ static inline void gpiod_unexport(struct gpio_desc *desc)
655656

656657
#endif /* CONFIG_GPIOLIB && CONFIG_GPIO_SYSFS */
657658

659+
static inline int gpiod_multi_set_value_cansleep(struct gpio_descs *descs,
660+
unsigned long *value_bitmap)
661+
{
662+
if (IS_ERR_OR_NULL(descs))
663+
return PTR_ERR_OR_ZERO(descs);
664+
665+
return gpiod_set_array_value_cansleep(descs->ndescs, descs->desc,
666+
descs->info, value_bitmap);
667+
}
668+
658669
#endif

0 commit comments

Comments
 (0)