Merge tag 'drm-intel-next-fixes-2014-12-30' of git://anongit.freedesktop.org/drm...
[firefly-linux-kernel-4.4.55.git] / Documentation / gpio / consumer.txt
index 859918db36b8510c2a50aca58210957299fc662c..d85fbae451ea930ddd9729dda3b55c44e443814b 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