summaryrefslogtreecommitdiffstats
path: root/drivers/gpio/gpio-max732x.c
diff options
context:
space:
mode:
authorGrygorii Strashko <grygorii.strashko@ti.com>2015-08-18 14:10:56 +0300
committerLinus Walleij <linus.walleij@linaro.org>2015-08-26 09:52:57 +0200
commit5d9452e7c52a106c9efdeb6c72fc73b184a6543f (patch)
tree0d08d160aa82706573c533c58bd80dcae0e6bbd4 /drivers/gpio/gpio-max732x.c
parent235f1eb1ab93a8e30a66c38949e6d2aeda136aec (diff)
downloadtalos-obmc-linux-5d9452e7c52a106c9efdeb6c72fc73b184a6543f.tar.gz
talos-obmc-linux-5d9452e7c52a106c9efdeb6c72fc73b184a6543f.zip
gpio: omap: fix clk_prepare/unprepare usage
As per CCF documentation (clk.txt) the clk_prepare/unprepare APIs are not allowed in atomic context. But now OMAP GPIO driver uses them while applying debounce settings and as part of PM runtime irqsafe operations: - omap_gpio_debounce() is holding the lock with IRQs off. + omap2_set_gpio_debounce() + clk_prepare_enable() + clk_prepare() this one might sleep. - pm_runtime_get_sync() is holding the lock with IRQs off + omap_gpio_runtime_suspend() + raw_spin_lock_irqsave() + omap_gpio_dbck_disable() + clk_disable_unprepare() Hence, fix it by moeving dbclk prepare/unprepare in OMAP GPIO omap_gpio_probe/omap_gpio_remove. Also, while here, ensure that debounce functionality is disabled if clk_get() failed, because otherwise kernel will carsh in omap2_set_gpio_debounce(). Reported-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Acked-by: Santosh Shilimkar <ssantosh@kernel.org> Tested-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/gpio/gpio-max732x.c')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud