]> asedeno.scripts.mit.edu Git - linux.git/commit
gpio: ep93xx: Do not pingpong irq numbers
authorLinus Walleij <linus.walleij@linaro.org>
Wed, 22 Aug 2018 20:41:07 +0000 (22:41 +0200)
committerLinus Walleij <linus.walleij@linaro.org>
Wed, 29 Aug 2018 07:08:54 +0000 (09:08 +0200)
commitfd935fc421e74b9777370a0175bc011b780173d3
tree9e5844495eab4eacb306c3d837064d541624f343
parent99399f40d896077ec175d42722d37e625056707e
gpio: ep93xx: Do not pingpong irq numbers

For setting debounce config we want to write an offset in
a per-gpiochip register, and we know which gpiochip we are
on. Instead of a roundtrip over the IRQ number, figure out
what port we are on for this GPIO chip, then index to the
right register and write the value.

This adds the ep93xx_gpio_port() that finds the port index
from a struct gpio_chip * that we can later exploit to
simplify more code.

Acked-by: Alexander Sverdlin <alexander.sverdlin@gmail.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/gpio/gpio-ep93xx.c