From patchwork Mon Jan 30 12:38:23 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 92856 Delivered-To: patch@linaro.org Received: by 10.140.20.99 with SMTP id 90csp1413532qgi; Mon, 30 Jan 2017 04:42:24 -0800 (PST) X-Received: by 10.98.13.203 with SMTP id 72mr22788493pfn.64.1485780144765; Mon, 30 Jan 2017 04:42:24 -0800 (PST) Return-Path: Received: from bombadil.infradead.org (bombadil.infradead.org. [65.50.211.133]) by mx.google.com with ESMTPS id t6si12533626pfi.59.2017.01.30.04.42.24 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 30 Jan 2017 04:42:24 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 65.50.211.133 as permitted sender) client-ip=65.50.211.133; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 65.50.211.133 as permitted sender) smtp.mailfrom=linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1cYBHq-0007vP-7x; Mon, 30 Jan 2017 12:42:22 +0000 Received: from mailout4.w1.samsung.com ([210.118.77.14]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1cYBEg-0004aa-Hs for linux-arm-kernel@lists.infradead.org; Mon, 30 Jan 2017 12:39:09 +0000 Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout4.w1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0OKL00588F4FA560@mailout4.w1.samsung.com> for linux-arm-kernel@lists.infradead.org; Mon, 30 Jan 2017 12:38:39 +0000 (GMT) Received: from eusmges1.samsung.com (unknown [203.254.199.239]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20170130123838eucas1p2767cad82712506cbfc998f5e680d504e~ejPbYOF2i2038020380eucas1p2w; Mon, 30 Jan 2017 12:38:38 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges1.samsung.com (EUCPMTA) with SMTP id FB.93.16908.1D33F885; Mon, 30 Jan 2017 12:38:41 +0000 (GMT) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20170130123838eucas1p12953af1e9af22e17ed9ca9c49dbd1e9d~ejPapzAGE2024520245eucas1p1k; Mon, 30 Jan 2017 12:38:38 +0000 (GMT) X-AuditID: cbfec7ef-f79d26d00000420c-d6-588f33d138c4 Received: from eusync3.samsung.com ( [203.254.199.213]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id 2F.C6.06687.1143F885; Mon, 30 Jan 2017 12:39:45 +0000 (GMT) Received: from AMDC2765.digital.local ([106.116.147.25]) by eusync3.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0OKL0038AF49F510@eusync3.samsung.com>; Mon, 30 Jan 2017 12:38:38 +0000 (GMT) From: Marek Szyprowski To: linux-gpio@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 2/7] pinctrl: samsung: Ensure that pad retention is disabled on driver init Date: Mon, 30 Jan 2017 13:38:23 +0100 Message-id: <1485779908-32147-3-git-send-email-m.szyprowski@samsung.com> X-Mailer: git-send-email 1.9.1 In-reply-to: <1485779908-32147-1-git-send-email-m.szyprowski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrAIsWRmVeSWpSXmKPExsWy7djPc7oXjfsjDOYuFbLYOGM9q8X58xvY Le5/PcpoMeXPciaLTY+vsVpsnv+H0eLyrjlsFjPO72OyWHvkLrvF4Tft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A+NMzi5GTg4J AROJ3bdXsEPYYhIX7q1n62Lk4hASWMIocfNRCzuE08QkcWXpIRaQKjYBQ4mut11gVSIC7YwS r29fYwJxmAW2MEl0bboINktYIEFi67tHYB0sAqoSr/cdZwOxeQU8JFZe2AG1T07i5LHJrCA2 p4CnxJanh5hBbCGgmvM3/rNMYORdwMiwilEktbQ4Nz232FCvODG3uDQvXS85P3cTIzD4tx37 uXkH46WNwYcYBTgYlXh4bwj3RQixJpYVV+YeYpTgYFYS4T2p2h8hxJuSWFmVWpQfX1Sak1p8 iNEU6KiJzFKiyfnAyMwriTc0MTS3NDQytrAwNzJSEuct+XAlXEggPbEkNTs1tSC1CKaPiYNT qoGx2c7+6YI5/gv+xZzIOf7/0t37JSuZG+pd+ATF7zJzvrqrX/qn+r7uFMGV7+riY9bO2vz0 IVNM58EAPfulE9jXxdhvslx96stdnVurjN7kK9eLXO9YFL295EjpvXczPqVf1Y2a3h+27eyF x3OUe02Ol014e7rDKnNBlOIN5xMaK6dsk/wbxsykocRSnJFoqMVcVJwIAAsK2rCUAgAA X-MTR: 20000000000000000@CPGS X-CMS-MailID: 20170130123838eucas1p12953af1e9af22e17ed9ca9c49dbd1e9d X-Msg-Generator: CA X-Sender-IP: 182.198.249.179 X-Local-Sender: =?utf-8?q?Marek_Szyprowski=1BSRPOL-Kernel_=28TP=29=1B?= =?utf-8?b?7IK87ISx7KCE7J6QG1NlbmlvciBTb2Z0d2FyZSBFbmdpbmVlcg==?= X-Global-Sender: =?utf-8?q?Marek_Szyprowski=1BSRPOL-Kernel_=28TP=29=1BSam?= =?utf-8?q?sung_Electronics=1BSenior_Software_Engineer?= X-Sender-Code: =?utf-8?q?C10=1BEHQ=1BC10CD02CD027392?= CMS-TYPE: 201P X-HopCount: 7 X-CMS-RootMailID: 20170130123838eucas1p12953af1e9af22e17ed9ca9c49dbd1e9d X-RootMTR: 20170130123838eucas1p12953af1e9af22e17ed9ca9c49dbd1e9d References: <1485779908-32147-1-git-send-email-m.szyprowski@samsung.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170130_043906_777602_7A5299A1 X-CRM114-Status: GOOD ( 13.35 ) X-Spam-Score: -10.1 (----------) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (-10.1 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [210.118.77.14 listed in wl.mailspike.net] -5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at http://www.dnswl.org/, high trust [210.118.77.14 listed in list.dnswl.org] -3.2 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.0 RCVD_IN_MSPIKE_WL Mailspike good senders X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Bartlomiej Zolnierkiewicz , Linus Walleij , Tomasz Figa , Krzysztof Kozlowski , Sylwester Nawrocki , Lee Jones , Marek Szyprowski MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org 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 Reviewed-by: Krzysztof Kozlowski --- drivers/pinctrl/samsung/pinctrl-exynos.c | 5 +++++ 1 file changed, 5 insertions(+) -- 1.9.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel diff --git a/drivers/pinctrl/samsung/pinctrl-exynos.c b/drivers/pinctrl/samsung/pinctrl-exynos.c index 63e51b56a22a..fa3802970570 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; }