diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2014-12-14 17:05:05 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-12-14 17:05:05 -0500 |
commit | 980f3c344ff1cb4a8be9a169c6bde2dc74ca6288 (patch) | |
tree | f7b22006dec2cebed697b0a2c6701ca16c58c7a2 /Documentation/gpio | |
parent | 7d22286ff757586f3cdbd70ded88b98250285ec5 (diff) | |
parent | 170680abd1eb98a9773ed068435fef9a6402a10f (diff) |
Merge tag 'gpio-v3.19-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio
Pull take two of the GPIO updates:
"Same stuff as last time, now with a fixup patch for the previous
compile error plus I ran a few extra rounds of compile-testing.
This is the bulk of GPIO changes for the v3.19 series:
- A new API that allows setting more than one GPIO at the time. This
is implemented for the new descriptor-based API only and makes it
possible to e.g. toggle a clock and data line at the same time, if
the hardware can do this with a single register write. Both
consumers and drivers need new calls, and the core will fall back
to driving individual lines where needed. Implemented for the
MPC8xxx driver initially
- Patched the mdio-mux-gpio and the serial mctrl driver that drives
modems to use the new multiple-setting API to set several signals
simultaneously
- Get rid of the global GPIO descriptor array, and instead allocate
descriptors dynamically for each GPIO on a certain GPIO chip. This
moves us closer to getting rid of the limitation of using the
global, static GPIO numberspace
- New driver and device tree bindings for 74xx ICs
- New driver and device tree bindings for the VF610 Vybrid
- Support the RCAR r8a7793 and r8a7794
- Guidelines for GPIO device tree bindings trying to get things a bit
more strict with the advent of combined device properties
- Suspend/resume support for the MVEBU driver
- A slew of minor fixes and improvements"
* tag 'gpio-v3.19-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio: (33 commits)
gpio: mcp23s08: fix up compilation error
gpio: pl061: document gpio-ranges property for bindings file
gpio: pl061: hook request if gpio-ranges avaiable
gpio: mcp23s08: Add option to configure IRQ output polarity as active high
gpio: fix deferred probe detection for legacy API
serial: mctrl_gpio: use gpiod_set_array function
mdio-mux-gpio: Use GPIO descriptor interface and new gpiod_set_array function
gpio: remove const modifier from gpiod_get_direction()
gpio: remove gpio_descs global array
gpio: mxs: implement get_direction callback
gpio: em: Use dynamic allocation of GPIOs
gpio: Check if base is positive before calling gpio_is_valid()
gpio: mcp23s08: Add simple IRQ support for SPI devices
gpio: mcp23s08: request a shared interrupt
gpio: mcp23s08: Do not free unrequested interrupt
gpio: rcar: Add r8a7793 and r8a7794 support
gpio-mpc8xxx: add mpc8xxx_gpio_set_multiple function
gpiolib: allow simultaneous setting of multiple GPIO outputs
gpio: mvebu: add suspend/resume support
gpio: gpio-davinci: remove duplicate check on resource
..
Diffstat (limited to 'Documentation/gpio')
-rw-r--r-- | Documentation/gpio/consumer.txt | 27 | ||||
-rw-r--r-- | Documentation/gpio/driver.txt | 4 |
2 files changed, 29 insertions, 2 deletions
diff --git a/Documentation/gpio/consumer.txt b/Documentation/gpio/consumer.txt index 859918db36b8..d85fbae451ea 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: | |||
199 | Note that these functions should only be used with great moderation ; a driver | 199 | Note that these functions should only be used with great moderation ; a driver |
200 | should not have to care about the physical line level. | 200 | should not have to care about the physical line level. |
201 | 201 | ||
202 | |||
203 | Set multiple GPIO outputs with a single function call | ||
204 | ----------------------------------------------------- | ||
205 | The 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 | |||
220 | The array can be an arbitrary set of GPIOs. The functions will try to set | ||
221 | GPIOs belonging to the same bank or chip simultaneously if supported by the | ||
222 | corresponding chip driver. In that case a significantly improved performance | ||
223 | can be expected. If simultaneous setting is not possible the GPIOs will be set | ||
224 | sequentially. | ||
225 | Note that for optimal performance GPIOs belonging to the same chip should be | ||
226 | contiguous within the array of descriptors. | ||
227 | |||
228 | |||
202 | GPIOs mapped to IRQs | 229 | GPIOs mapped to IRQs |
203 | -------------------- | 230 | -------------------- |
204 | GPIO lines can quite often be used as IRQs. You can get the IRQ number | 231 | GPIO lines can quite often be used as IRQs. You can get the IRQ number |
diff --git a/Documentation/gpio/driver.txt b/Documentation/gpio/driver.txt index 31e0b5db55d8..90d0f6aba7a6 100644 --- a/Documentation/gpio/driver.txt +++ b/Documentation/gpio/driver.txt | |||
@@ -158,12 +158,12 @@ Locking IRQ usage | |||
158 | Input GPIOs can be used as IRQ signals. When this happens, a driver is requested | 158 | Input GPIOs can be used as IRQ signals. When this happens, a driver is requested |
159 | to mark the GPIO as being used as an IRQ: | 159 | to mark the GPIO as being used as an IRQ: |
160 | 160 | ||
161 | int gpio_lock_as_irq(struct gpio_chip *chip, unsigned int offset) | 161 | int gpiochip_lock_as_irq(struct gpio_chip *chip, unsigned int offset) |
162 | 162 | ||
163 | This will prevent the use of non-irq related GPIO APIs until the GPIO IRQ lock | 163 | This will prevent the use of non-irq related GPIO APIs until the GPIO IRQ lock |
164 | is released: | 164 | is released: |
165 | 165 | ||
166 | void gpio_unlock_as_irq(struct gpio_chip *chip, unsigned int offset) | 166 | void gpiochip_unlock_as_irq(struct gpio_chip *chip, unsigned int offset) |
167 | 167 | ||
168 | When implementing an irqchip inside a GPIO driver, these two functions should | 168 | When implementing an irqchip inside a GPIO driver, these two functions should |
169 | typically be called in the .startup() and .shutdown() callbacks from the | 169 | typically be called in the .startup() and .shutdown() callbacks from the |