Merge tag 'gpio-v3.19-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw...
[cascardo/linux.git] / Documentation / gpio / consumer.txt
index 859918d..d85fbae 100644 (file)
@@ -199,6 +199,33 @@ The active-low state of a GPIO can also be queried using the following call:
 Note that these functions should only be used with great moderation ; a driver
 should not have to care about the physical line level.
 
+
+Set multiple GPIO outputs with a single function call
+-----------------------------------------------------
+The following functions set the output values of an array of GPIOs:
+
+       void gpiod_set_array(unsigned int array_size,
+                            struct gpio_desc **desc_array,
+                            int *value_array)
+       void gpiod_set_raw_array(unsigned int array_size,
+                                struct gpio_desc **desc_array,
+                                int *value_array)
+       void gpiod_set_array_cansleep(unsigned int array_size,
+                                     struct gpio_desc **desc_array,
+                                     int *value_array)
+       void gpiod_set_raw_array_cansleep(unsigned int array_size,
+                                         struct gpio_desc **desc_array,
+                                         int *value_array)
+
+The array can be an arbitrary set of GPIOs. The functions will try to set
+GPIOs belonging to the same bank or chip simultaneously if supported by the
+corresponding chip driver. In that case a significantly improved performance
+can be expected. If simultaneous setting is not possible the GPIOs will be set
+sequentially.
+Note that for optimal performance GPIOs belonging to the same chip should be
+contiguous within the array of descriptors.
+
+
 GPIOs mapped to IRQs
 --------------------
 GPIO lines can quite often be used as IRQs. You can get the IRQ number