[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-id: <1490256207-10061-2-git-send-email-m.szyprowski@samsung.com>
Date: Thu, 23 Mar 2017 09:03:22 +0100
From: Marek Szyprowski <m.szyprowski@...sung.com>
To: linux-gpio@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
linux-samsung-soc@...r.kernel.org, linux-kernel@...r.kernel.org
Cc: Marek Szyprowski <m.szyprowski@...sung.com>,
Sylwester Nawrocki <s.nawrocki@...sung.com>,
Krzysztof Kozlowski <krzk@...nel.org>,
Linus Walleij <linus.walleij@...aro.org>,
Tomasz Figa <tomasz.figa@...il.com>,
Lee Jones <lee.jones@...aro.org>,
Bartlomiej Zolnierkiewicz <b.zolnierkie@...sung.com>,
Chanwoo Choi <cw00.choi@...sung.com>
Subject: [PATCH v4 1/6] pinctrl: samsung: Ensure that pad retention is disabled
on driver init
When pin controller device is a part of power domain, there is no guarantee
that the power domain was not turned off and then on during boot process
before probing of the pin control driver. If it happened, then pin control
driver should ensure that pad retention is turned off during its probe call.
Signed-off-by: Marek Szyprowski <m.szyprowski@...sung.com>
Reviewed-by: Krzysztof Kozlowski <krzk@...nel.org>
---
drivers/pinctrl/samsung/pinctrl-exynos.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/pinctrl/samsung/pinctrl-exynos.c b/drivers/pinctrl/samsung/pinctrl-exynos.c
index f9b49967f512..fa8bdd9ae198 100644
--- a/drivers/pinctrl/samsung/pinctrl-exynos.c
+++ b/drivers/pinctrl/samsung/pinctrl-exynos.c
@@ -777,6 +777,7 @@ static void exynos_retention_disable(struct samsung_pinctrl_drv_data *drvdata)
{
struct samsung_retention_ctrl *ctrl;
struct regmap *pmu_regs;
+ int i;
ctrl = devm_kzalloc(drvdata->dev, sizeof(*ctrl), GFP_KERNEL);
if (!ctrl)
@@ -794,6 +795,10 @@ static void exynos_retention_disable(struct samsung_pinctrl_drv_data *drvdata)
ctrl->enable = exynos_retention_enable;
ctrl->disable = exynos_retention_disable;
+ /* Ensure that retention is disabled on driver init */
+ for (i = 0; i < ctrl->nr_regs; i++)
+ regmap_write(pmu_regs, ctrl->regs[i], ctrl->value);
+
return ctrl;
}
--
1.9.1
Powered by blists - more mailing lists