Skip to content
Commit 121dcb76 authored by Grygorii Strashko's avatar Grygorii Strashko Committed by Linus Walleij
Browse files

gpio: omap: rework omap_gpio_irq_startup to handle current pin state properly



The omap_gpio_irq_startup() can be called at time when:
- corresponding GPIO has been requested already and in this case
it has to be configured as input already. If not - return with -EINVAL
and do not try to re-configure it as it could be unsafe.
- corresponding GPIO is free: reconfigure GPIO as input.

In addition, call omap_enable_gpio_module directly as all needed
checks are already present inside it.

Signed-off-by: default avatarGrygorii Strashko <grygorii.strashko@linaro.org>
Tested-by: default avatarTony Lindgren <tony@atomide.com>
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent c3518172
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