* Patch "gpio: zynq: initialize clock even without CONFIG_PM" has been added to the 4.6-stable tree
@ 2016-06-22 5:22 gregkh
0 siblings, 0 replies; only message in thread
From: gregkh @ 2016-06-22 5:22 UTC (permalink / raw)
To: h.grohne, gregkh, linus.walleij; +Cc: stable, stable-commits
This is a note to let you know that I've just added the patch titled
gpio: zynq: initialize clock even without CONFIG_PM
to the 4.6-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
gpio-zynq-initialize-clock-even-without-config_pm.patch
and it can be found in the queue-4.6 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.
>From 0f84f29ff30bdb1bca23017b118b4ea3999cac32 Mon Sep 17 00:00:00 2001
From: Helmut Grohne <h.grohne@intenta.de>
Date: Fri, 3 Jun 2016 14:15:32 +0200
Subject: gpio: zynq: initialize clock even without CONFIG_PM
From: Helmut Grohne <h.grohne@intenta.de>
commit 0f84f29ff30bdb1bca23017b118b4ea3999cac32 upstream.
When the PM initialization was moved in the commit referenced below, the
code enabling the clock was removed from the probe function. On
CONFIG_PM=y kernels, this is not a problem as the pm resume hook enables
the clock, but when power management is disabled, all those pm_*
functions are noops and the clock is never enabled resulting in a
dysfunctional gpio controller.
Put the clock initialization back to support CONFIG_PM=n.
Signed-off-by: Helmut Grohne <h.grohne@intenta.de>
Fixes: 3773c195d387 ("gpio: zynq: Do PM initialization earlier to support gpio hogs")
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/gpio/gpio-zynq.c | 7 +++++++
1 file changed, 7 insertions(+)
--- a/drivers/gpio/gpio-zynq.c
+++ b/drivers/gpio/gpio-zynq.c
@@ -709,7 +709,13 @@ static int zynq_gpio_probe(struct platfo
dev_err(&pdev->dev, "input clock not found.\n");
return PTR_ERR(gpio->clk);
}
+ ret = clk_prepare_enable(gpio->clk);
+ if (ret) {
+ dev_err(&pdev->dev, "Unable to enable clock.\n");
+ return ret;
+ }
+ pm_runtime_set_active(&pdev->dev);
pm_runtime_enable(&pdev->dev);
ret = pm_runtime_get_sync(&pdev->dev);
if (ret < 0)
@@ -747,6 +753,7 @@ err_pm_put:
pm_runtime_put(&pdev->dev);
err_pm_dis:
pm_runtime_disable(&pdev->dev);
+ clk_disable_unprepare(gpio->clk);
return ret;
}
Patches currently in stable-queue which might be from h.grohne@intenta.de are
queue-4.6/gpio-zynq-fix-the-error-path.patch
queue-4.6/gpio-zynq-initialize-clock-even-without-config_pm.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2016-06-22 5:41 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-06-22 5:22 Patch "gpio: zynq: initialize clock even without CONFIG_PM" has been added to the 4.6-stable tree gregkh
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.