From: Rajendra Nayak <rnayak@ti.com>
To: Rajendra Nayak <rnayak@ti.com>
Cc: linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
tony@atomide.com, paul@pwsan.com, linux-gpio@vger.kernel.org,
Santosh Shilimkar <santosh.shilimkar@ti.com>,
Kevin Hilman <khilman@deeprootsystems.com>,
Linus Walleij <linus.walleij@linaro.org>,
gnurou@gmail.com
Subject: Re: [PATCH 1/2] gpio: omap: prepare and unprepare the debounce clock
Date: Thu, 8 May 2014 12:36:22 +0530 [thread overview]
Message-ID: <536B2CEE.4010809@ti.com> (raw)
In-Reply-To: <1398233465-8845-2-git-send-email-rnayak@ti.com>
On Wednesday 23 April 2014 11:41 AM, Rajendra Nayak wrote:
> Replace the clk_enable()s with a clk_prepare_enable() and
> the clk_disables()s with a clk_disable_unprepare()
>
> This never showed issues due to the OMAP platform code (hwmod)
> leaving these clocks in clk_prepare()ed state by default.
>
> Reported-by: Kishon Vijay Abraham I <kishon@ti.com>
> Signed-off-by: Rajendra Nayak <rnayak@ti.com>
> Cc: linux-gpio@vger.kernel.org
> Cc: Santosh Shilimkar <santosh.shilimkar@ti.com>
> Cc: Kevin Hilman <khilman@deeprootsystems.com>
Linus,
Do you mind picking this fix up via the GPIO tree? Alternatively you could
Ack this if you are fine and we can take both Patch 1/2 and Patch 2/2 from this
series via the OMAP tree.
Patch 2/2 has a dependency on Patch 1/2 and they need to go in in that order else
gpio would break. More discussions are here [1].
Let us know what you think. Thanks.
regards,
Rajendra
[1] http://www.mail-archive.com/linux-gpio@vger.kernel.org/msg02801.html
> ---
> drivers/gpio/gpio-omap.c | 10 +++++-----
> 1 file changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/gpio/gpio-omap.c b/drivers/gpio/gpio-omap.c
> index 19b886c..78bc5a4 100644
> --- a/drivers/gpio/gpio-omap.c
> +++ b/drivers/gpio/gpio-omap.c
> @@ -180,7 +180,7 @@ static inline void _gpio_rmw(void __iomem *base, u32 reg, u32 mask, bool set)
> static inline void _gpio_dbck_enable(struct gpio_bank *bank)
> {
> if (bank->dbck_enable_mask && !bank->dbck_enabled) {
> - clk_enable(bank->dbck);
> + clk_prepare_enable(bank->dbck);
> bank->dbck_enabled = true;
>
> writel_relaxed(bank->dbck_enable_mask,
> @@ -198,7 +198,7 @@ static inline void _gpio_dbck_disable(struct gpio_bank *bank)
> */
> writel_relaxed(0, bank->base + bank->regs->debounce_en);
>
> - clk_disable(bank->dbck);
> + clk_disable_unprepare(bank->dbck);
> bank->dbck_enabled = false;
> }
> }
> @@ -231,7 +231,7 @@ static void _set_gpio_debounce(struct gpio_bank *bank, unsigned gpio,
>
> l = GPIO_BIT(bank, gpio);
>
> - clk_enable(bank->dbck);
> + clk_prepare_enable(bank->dbck);
> reg = bank->base + bank->regs->debounce;
> writel_relaxed(debounce, reg);
>
> @@ -245,7 +245,7 @@ static void _set_gpio_debounce(struct gpio_bank *bank, unsigned gpio,
> bank->dbck_enable_mask = val;
>
> writel_relaxed(val, reg);
> - clk_disable(bank->dbck);
> + clk_disable_unprepare(bank->dbck);
> /*
> * Enable debounce clock per module.
> * This call is mandatory because in omap_gpio_request() when
> @@ -290,7 +290,7 @@ static void _clear_gpio_debounce(struct gpio_bank *bank, unsigned gpio)
> bank->context.debounce = 0;
> writel_relaxed(bank->context.debounce, bank->base +
> bank->regs->debounce);
> - clk_disable(bank->dbck);
> + clk_disable_unprepare(bank->dbck);
> bank->dbck_enabled = false;
> }
> }
>
WARNING: multiple messages have this Message-ID (diff)
From: rnayak@ti.com (Rajendra Nayak)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/2] gpio: omap: prepare and unprepare the debounce clock
Date: Thu, 8 May 2014 12:36:22 +0530 [thread overview]
Message-ID: <536B2CEE.4010809@ti.com> (raw)
In-Reply-To: <1398233465-8845-2-git-send-email-rnayak@ti.com>
On Wednesday 23 April 2014 11:41 AM, Rajendra Nayak wrote:
> Replace the clk_enable()s with a clk_prepare_enable() and
> the clk_disables()s with a clk_disable_unprepare()
>
> This never showed issues due to the OMAP platform code (hwmod)
> leaving these clocks in clk_prepare()ed state by default.
>
> Reported-by: Kishon Vijay Abraham I <kishon@ti.com>
> Signed-off-by: Rajendra Nayak <rnayak@ti.com>
> Cc: linux-gpio at vger.kernel.org
> Cc: Santosh Shilimkar <santosh.shilimkar@ti.com>
> Cc: Kevin Hilman <khilman@deeprootsystems.com>
Linus,
Do you mind picking this fix up via the GPIO tree? Alternatively you could
Ack this if you are fine and we can take both Patch 1/2 and Patch 2/2 from this
series via the OMAP tree.
Patch 2/2 has a dependency on Patch 1/2 and they need to go in in that order else
gpio would break. More discussions are here [1].
Let us know what you think. Thanks.
regards,
Rajendra
[1] http://www.mail-archive.com/linux-gpio at vger.kernel.org/msg02801.html
> ---
> drivers/gpio/gpio-omap.c | 10 +++++-----
> 1 file changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/gpio/gpio-omap.c b/drivers/gpio/gpio-omap.c
> index 19b886c..78bc5a4 100644
> --- a/drivers/gpio/gpio-omap.c
> +++ b/drivers/gpio/gpio-omap.c
> @@ -180,7 +180,7 @@ static inline void _gpio_rmw(void __iomem *base, u32 reg, u32 mask, bool set)
> static inline void _gpio_dbck_enable(struct gpio_bank *bank)
> {
> if (bank->dbck_enable_mask && !bank->dbck_enabled) {
> - clk_enable(bank->dbck);
> + clk_prepare_enable(bank->dbck);
> bank->dbck_enabled = true;
>
> writel_relaxed(bank->dbck_enable_mask,
> @@ -198,7 +198,7 @@ static inline void _gpio_dbck_disable(struct gpio_bank *bank)
> */
> writel_relaxed(0, bank->base + bank->regs->debounce_en);
>
> - clk_disable(bank->dbck);
> + clk_disable_unprepare(bank->dbck);
> bank->dbck_enabled = false;
> }
> }
> @@ -231,7 +231,7 @@ static void _set_gpio_debounce(struct gpio_bank *bank, unsigned gpio,
>
> l = GPIO_BIT(bank, gpio);
>
> - clk_enable(bank->dbck);
> + clk_prepare_enable(bank->dbck);
> reg = bank->base + bank->regs->debounce;
> writel_relaxed(debounce, reg);
>
> @@ -245,7 +245,7 @@ static void _set_gpio_debounce(struct gpio_bank *bank, unsigned gpio,
> bank->dbck_enable_mask = val;
>
> writel_relaxed(val, reg);
> - clk_disable(bank->dbck);
> + clk_disable_unprepare(bank->dbck);
> /*
> * Enable debounce clock per module.
> * This call is mandatory because in omap_gpio_request() when
> @@ -290,7 +290,7 @@ static void _clear_gpio_debounce(struct gpio_bank *bank, unsigned gpio)
> bank->context.debounce = 0;
> writel_relaxed(bank->context.debounce, bank->base +
> bank->regs->debounce);
> - clk_disable(bank->dbck);
> + clk_disable_unprepare(bank->dbck);
> bank->dbck_enabled = false;
> }
> }
>
next prev parent reply other threads:[~2014-05-08 7:08 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-23 6:11 [PATCH 0/2] OMAP2+: optional clock handling fixes Rajendra Nayak
2014-04-23 6:11 ` Rajendra Nayak
2014-04-23 6:11 ` [PATCH 1/2] gpio: omap: prepare and unprepare the debounce clock Rajendra Nayak
2014-04-23 6:11 ` Rajendra Nayak
2014-05-08 7:06 ` Rajendra Nayak [this message]
2014-05-08 7:06 ` Rajendra Nayak
2014-05-08 9:26 ` Javier Martinez Canillas
2014-05-08 9:26 ` Javier Martinez Canillas
2014-05-08 11:10 ` Rajendra Nayak
2014-05-08 11:10 ` Rajendra Nayak
2014-05-08 12:04 ` Javier Martinez Canillas
2014-05-08 12:04 ` Javier Martinez Canillas
2014-05-08 12:06 ` Rajendra Nayak
2014-05-08 12:06 ` Rajendra Nayak
2014-05-13 9:24 ` Linus Walleij
2014-05-13 9:24 ` Linus Walleij
2014-05-08 14:40 ` Santosh Shilimkar
2014-05-08 14:40 ` Santosh Shilimkar
2014-05-08 14:45 ` Santosh Shilimkar
2014-05-08 14:45 ` Santosh Shilimkar
2014-04-23 6:11 ` [PATCH 2/2] ARM: OMAP2+: hwmod: Don't leave the optional clocks in clk_prepare()ed state Rajendra Nayak
2014-04-23 6:11 ` Rajendra Nayak
2014-05-08 0:08 ` [PATCH 0/2] OMAP2+: optional clock handling fixes Paul Walmsley
2014-05-08 0:08 ` Paul Walmsley
2014-05-08 6:59 ` Rajendra Nayak
2014-05-08 6:59 ` Rajendra Nayak
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=536B2CEE.4010809@ti.com \
--to=rnayak@ti.com \
--cc=gnurou@gmail.com \
--cc=khilman@deeprootsystems.com \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=paul@pwsan.com \
--cc=santosh.shilimkar@ti.com \
--cc=tony@atomide.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.