aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/gpio/consumer.txt
diff options
context:
space:
mode:
Diffstat (limited to 'Documentation/gpio/consumer.txt')
-rw-r--r--Documentation/gpio/consumer.txt27
1 files changed, 27 insertions, 0 deletions
diff --git a/Documentation/gpio/consumer.txt b/Documentation/gpio/consumer.txt
index 6ce544191ca6..c67f806401a5 100644
--- a/Documentation/gpio/consumer.txt
+++ b/Documentation/gpio/consumer.txt
@@ -199,6 +199,33 @@ The active-low state of a GPIO can also be queried using the following call:
199Note that these functions should only be used with great moderation ; a driver 199Note that these functions should only be used with great moderation ; a driver
200should not have to care about the physical line level. 200should not have to care about the physical line level.
201 201
202
203Set multiple GPIO outputs with a single function call
204-----------------------------------------------------
205The following functions set the output values of an array of GPIOs:
206
207 void gpiod_set_array(unsigned int array_size,
208 struct gpio_desc **desc_array,
209 int *value_array)
210 void gpiod_set_raw_array(unsigned int array_size,
211 struct gpio_desc **desc_array,
212 int *value_array)
213 void gpiod_set_array_cansleep(unsigned int array_size,
214 struct gpio_desc **desc_array,
215 int *value_array)
216 void gpiod_set_raw_array_cansleep(unsigned int array_size,
217 struct gpio_desc **desc_array,
218 int *value_array)
219
220The array can be an arbitrary set of GPIOs. The functions will try to set
221GPIOs belonging to the same bank or chip simultaneously if supported by the
222corresponding chip driver. In that case a significantly improved performance
223can be expected. If simultaneous setting is not possible the GPIOs will be set
224sequentially.
225Note that for optimal performance GPIOs belonging to the same chip should be
226contiguous within the array of descriptors.
227
228
202GPIOs mapped to IRQs 229GPIOs mapped to IRQs
203-------------------- 230--------------------
204GPIO lines can quite often be used as IRQs. You can get the IRQ number 231GPIO lines can quite often be used as IRQs. You can get the IRQ number