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


Groups > linux.kernel > #1607236

[PATCH v4 1/6] pinctrl: samsung: Ensure that pad retention is disabled on driver init

From Marek Szyprowski <m.szyprowski@samsung.com>
Newsgroups linux.kernel
Subject [PATCH v4 1/6] pinctrl: samsung: Ensure that pad retention is disabled on driver init
Date 2017-03-23 09:10 +0100
Message-ID <to5YL-7Ts-47@gated-at.bofh.it> (permalink)
References <to5YK-7Ts-27@gated-at.bofh.it> <to5YL-7Ts-49@gated-at.bofh.it> <to5YK-7Ts-27@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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@samsung.com>
Reviewed-by: Krzysztof Kozlowski <krzk@kernel.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

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v4 0/6] Pad retentions support for Exynos5433 Marek Szyprowski <m.szyprowski@samsung.com> - 2017-03-23 09:10 +0100
  [PATCH v4 2/6] pinctrl: samsung: Add support for pad retention control  for Exynos5433 SoCs Marek Szyprowski <m.szyprowski@samsung.com> - 2017-03-23 09:10 +0100
    Re: [PATCH v4 2/6] pinctrl: samsung: Add support for pad retention  control for Exynos5433 SoCs Krzysztof Kozlowski <krzk@kernel.org> - 2017-03-23 20:20 +0100
  [PATCH v4 6/6] mfd: exynos-lpass: Add runtime PM support Marek Szyprowski <m.szyprowski@samsung.com> - 2017-03-23 09:10 +0100
  [PATCH v4 1/6] pinctrl: samsung: Ensure that pad retention is disabled  on driver init Marek Szyprowski <m.szyprowski@samsung.com> - 2017-03-23 09:10 +0100
    Re: [PATCH v4 1/6] pinctrl: samsung: Ensure that pad retention is  disabled on driver init Krzysztof Kozlowski <krzk@kernel.org> - 2017-03-23 20:20 +0100
  [PATCH v4 4/6] mfd: exynos-lpass: Add support for clocks Marek Szyprowski <m.szyprowski@samsung.com> - 2017-03-23 09:10 +0100
  [PATCH v4 3/6] mfd: exynos-lpass: Remove pad retention control Marek Szyprowski <m.szyprowski@samsung.com> - 2017-03-23 09:10 +0100

csiph-web