Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1213639 > unrolled thread

Re: [PATCH 5/7] gpio: omap: fix clk_prepare/unprepare usage

Started byLinus Walleij <linus.walleij@linaro.org>
First post2015-08-26 10:00 +0200
Last post2015-08-26 10:00 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH 5/7] gpio: omap: fix clk_prepare/unprepare usage Linus Walleij <linus.walleij@linaro.org> - 2015-08-26 10:00 +0200

#1213639 — Re: [PATCH 5/7] gpio: omap: fix clk_prepare/unprepare usage

FromLinus Walleij <linus.walleij@linaro.org>
Date2015-08-26 10:00 +0200
SubjectRe: [PATCH 5/7] gpio: omap: fix clk_prepare/unprepare usage
Message-ID<q1DMK-7Vl-21@gated-at.bofh.it>
On Tue, Aug 18, 2015 at 1:10 PM, Grygorii Strashko
<grygorii.strashko@ti.com> wrote:

> 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>
> Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>

Patch applied.

Yours,
Linus Walleij
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web