]> asedeno.scripts.mit.edu Git - linux.git/commit
gpio: tag line labels used for interrupts
authorLinus Walleij <linus.walleij@linaro.org>
Sun, 13 Nov 2016 23:09:07 +0000 (00:09 +0100)
committerLinus Walleij <linus.walleij@linaro.org>
Tue, 15 Nov 2016 09:30:08 +0000 (10:30 +0100)
commit3940c34ac898b15afb72271394444199401bbe99
tree321a9d917d625d3e9ef310ee5ae92d95ab17c357
parentad17731d7bd1c379f83d4bde844169588441266f
gpio: tag line labels used for interrupts

When a GPIO line is marked as used for an interrupt, it is
helpful to set the label to "interrupt" so we know what is
going on when inspecting the lines.

If a GPIO is already properly named by gpiod_get*() we don't
need to do this. It only happens when a line is used from
the irqchip side of a GPIO driver without communicating
with the GPIO side, such as when gpiochip is used as interrupt
provider in the device tree.

If the line is still marked as used by "interrupt" when we
unmark it as used by an interrupt, also remove this label
from the descriptor.

Also shape up the code around unmarking IRQ lines.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/gpio/gpiolib.c