Commit 4f8183ae authored by Hans Verkuil's avatar Hans Verkuil Committed by Linus Walleij

gpio/driver.rst: document gpiochip_disable/enable_irq()

Document these new functions.
Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent 461c1a7d
...@@ -374,7 +374,28 @@ When implementing an irqchip inside a GPIO driver, these two functions should ...@@ -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 typically be called in the .startup() and .shutdown() callbacks from the
irqchip. 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. assigned.
Real-Time compliance for GPIO IRQ chips Real-Time compliance for GPIO IRQ chips
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment