Skip to content

Commit

Permalink
gpio/driver.rst: document gpiochip_disable/enable_irq()
Browse files Browse the repository at this point in the history
Document these new functions.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
  • Loading branch information
Hans Verkuil authored and Linus Walleij committed Sep 10, 2018
1 parent 461c1a7 commit 4f8183a
Showing 1 changed file with 22 additions and 1 deletion.
23 changes: 22 additions & 1 deletion Documentation/driver-api/gpio/driver.rst
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,28 @@ When implementing an irqchip inside a GPIO driver, these two functions should
typically be called in the .startup() and .shutdown() callbacks from the
irqchip.

When using the gpiolib irqchip helpers, these callback are automatically
When using the gpiolib irqchip helpers, these callbacks are automatically
assigned.


Disabling and enabling IRQs
---------------------------
When a GPIO is used as an IRQ signal, then gpiolib also needs to know if
the IRQ is enabled or disabled. In order to inform gpiolib about this,
a driver should call::

void gpiochip_disable_irq(struct gpio_chip *chip, unsigned int offset)

This allows drivers to drive the GPIO as an output while the IRQ is
disabled. When the IRQ is enabled again, a driver should call::

void gpiochip_enable_irq(struct gpio_chip *chip, unsigned int offset)

When implementing an irqchip inside a GPIO driver, these two functions should
typically be called in the .irq_disable() and .irq_enable() callbacks from the
irqchip.

When using the gpiolib irqchip helpers, these callbacks are automatically
assigned.

Real-Time compliance for GPIO IRQ chips
Expand Down

0 comments on commit 4f8183a

Please sign in to comment.