From patchwork Thu Jan 19 13:48:40 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 91891 Delivered-To: patch@linaro.org Received: by 10.182.3.34 with SMTP id 2csp278229obz; Thu, 19 Jan 2017 05:49:49 -0800 (PST) X-Received: by 10.200.46.162 with SMTP id h31mr7520265qta.164.1484833789653; Thu, 19 Jan 2017 05:49:49 -0800 (PST) Return-Path: Received: from bombadil.infradead.org ([65.50.211.133]) by mx.google.com with ESMTPS id t14si2651463qkl.52.2017.01.19.05.49.49 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 19 Jan 2017 05:49:49 -0800 (PST) Received-SPF: neutral (google.com: 65.50.211.133 is neither permitted nor denied by best guess record for domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org) client-ip=65.50.211.133; Authentication-Results: mx.google.com; spf=neutral (google.com: 65.50.211.133 is neither permitted nor denied by best guess record for domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org) 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 1cUD63-0004sv-Sa; Thu, 19 Jan 2017 13:49:47 +0000 Received: from mailout2.w1.samsung.com ([210.118.77.12]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1cUD5o-0004TL-EW for linux-arm-kernel@lists.infradead.org; Thu, 19 Jan 2017 13:49:34 +0000 Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout2.w1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0OK100FS151RCF70@mailout2.w1.samsung.com> for linux-arm-kernel@lists.infradead.org; Thu, 19 Jan 2017 13:49:03 +0000 (GMT) Received: from eusmges2.samsung.com (unknown [203.254.199.241]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20170119134903eucas1p237a2556ed1803a78f1f7ff1df161f4c6~bMGwadkm91687616876eucas1p2n; Thu, 19 Jan 2017 13:49:03 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges2.samsung.com (EUCPMTA) with SMTP id 2E.88.30614.EC3C0885; Thu, 19 Jan 2017 13:49:02 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20170119134902eucas1p24c04dc33bab06bd3d564f6aec2180b3b~bMGvzsfmW0531805318eucas1p2Q; Thu, 19 Jan 2017 13:49:02 +0000 (GMT) X-AuditID: cbfec7f1-f793f6d000007796-71-5880c3ceb2ea Received: from eusync1.samsung.com ( [203.254.199.211]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id DD.10.10233.9C3C0885; Thu, 19 Jan 2017 13:48:57 +0000 (GMT) Received: from AMDC2765.digital.local ([106.116.147.25]) by eusync1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0OK100BYG51LGB30@eusync1.samsung.com>; Thu, 19 Jan 2017 13:49:02 +0000 (GMT) From: Marek Szyprowski To: linux-gpio@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-pm@vger.kernel.org, linux-samsung-soc@vger.kernel.org Subject: [PATCH v3 00/13] Move pad retention control to Exynos pin controller driver Date: Thu, 19 Jan 2017 14:48:40 +0100 Message-id: <1484833733-16082-1-git-send-email-m.szyprowski@samsung.com> X-Mailer: git-send-email 1.9.1 X-Brightmail-Tracker: H4sIAAAAAAAAAzWRf0gTYRjHfXfb7TaaHNPqYZbEIKhEUws5SqJI6kDRCqwVRJ15THGbslNR qVxm5hZpqOWyQJPcYGDmpsPSlU7TStm0nBA2Mewv00QXgTIs3el/ny/P5/nB+xKYfFyoIHJ1 haxex2iUuFToHF71xnoGDap451os1WnuEFFe72sx1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+241M0gVm4ChRNfbLrAqEYFmRomGJb1g DrPABCaJmZ8awGYJC4RJ9J75yg5iswioSuzeuowVxOYV8JBY+KmTDWKfnMTJY5NZJzByL2Bk WMUoklpanJueW2ykV5yYW1yal66XnJ+7iREYxNuO/dyyg7HrXfAhRgEORiUe3o6i+ggh1sSy 4srcQ4wSHMxKIrw2exsihHhTEiurUovy44tKc1KLDzGaAi2fyCwlmpwPjLC8knhDE0NzS0Mj YwsLcyMjJXHeqR+uhAsJpCeWpGanphakFsH0MXFwSjUwdnK/XCq8J0Pkx2N/zpM1l2XbX/sv Y7Ssf3760Bum+a8fuUnxSd7b9GuTNMMRc9Ppgn9sn0//e8zLhvPWlbye2P21lV8f1AVnr+dZ nxpQOWHttuX5Wnkf68WVdd7tM927hud+1A4Wc8dvixw2VRe9LGLz2GXbbOrfWuvLzzvnQMaG qvS/99g4lFiKMxINtZiLihMBJzyPQ3gCAAA= X-MTR: 20000000000000000@CPGS X-CMS-MailID: 20170119134902eucas1p24c04dc33bab06bd3d564f6aec2180b3b X-Msg-Generator: CA X-Sender-IP: 182.198.249.180 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: 20170119134902eucas1p24c04dc33bab06bd3d564f6aec2180b3b X-RootMTR: 20170119134902eucas1p24c04dc33bab06bd3d564f6aec2180b3b References: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170119_054932_648863_18E33E3D X-CRM114-Status: GOOD ( 21.93 ) 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 ---- ---------------------- -------------------------------------------------- -5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at http://www.dnswl.org/, high trust [210.118.77.12 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [210.118.77.12 listed in wl.mailspike.net] -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 , Marek Szyprowski MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org Hello, This patchset is a follow-up of my work on adding runtime PM support to Exynos pin controller driver: http://www.spinics.net/lists/arm-kernel/msg550161.html Runtime PM support itself needs a bit more discussion, so lets first focus on the prerequisites. In case of Exynos pin controller driver it is a pad retention control. In current code it was handled by machine and PMU code and had no relation to what pin controller driver does. This patch series moves pad retention control to pin controller driver. While implementing it, I also did a little cleanup of both Exynos PMU and pin controller drivers. Exynos PMU driver now provides a convenient function to get PMU regmap from other Exynos drivers. Patch #1 provides a new interface to get Exynos PMU regmap, which is used by the patch #11. Patches 2-10 are additional cleanups to the code I was modyfying. Patches 10-12 implements the move of the retention control and patch #13 is another cleanup, which is possible after removing dependency to platform PM code. Patches are based on linux-next from 2017.01.19 with Exynos4415 support removal patch applied: https://lkml.org/lkml/2017/1/14/137 Changelog: v3: - fixed return value from exynos_get_pmu_regmap stub (pointed by Tomasz Figa) - removed unnecessary regmap include in pmu.h - fixed comments in retention control structure description - simplified exynos_retention_disable function by moving samsung_retention_ctrl structure to separate variable - collected Acks v2: https://www.spinics.net/lists/arm-kernel/msg555048.html - reworked exynos_get_pmu_regmap() function and moved to Exynos PMU driver, now it doesn't depend on driver probe order thus doesn't need to defer probing of pinctrl driver if PMU has not yet been probed - collected Acks, minor fixes according to review comments v1: https://www.spinics.net/lists/arm-kernel/msg554487.html - removed the need to add PMU phandles to all pin controller nodes, so old DTBs are properly supported. This has been achieved by getting PMU regmap from the "exynos-pmu" device of fixed name. - more cleanup in Exynos pin controller driver: added missing entries in DT documentation, removed "memory allocation failed" messages and added initconst annotations. - added support for s5pv210. - reworked retention control code to be simpler and ready for adding Exynos5433 support. v0: http://www.spinics.net/lists/arm-kernel/msg550161.html - initial version - part of "Runtime PM for Exynos pin controller driver" patchset Patch summary: Marek Szyprowski (13): soc: samsung: pmu: Provide global function to get PMU regmap soc: samsung: pmu: Use of_device_get_match_data helper soc: samsung: pmu: Remove messages for failed memory allocation pinctrl: samsung: Document Exynos3250 SoC support pinctrl: samsung: Remove messages for failed memory allocation pinctrl: samsung: Fix samsung_pinctrl_create_functions return value pinctrl: samsung: Add missing initconst annotation pinctrl: samsung: Remove dead code pinctrl: samsung: Use generic of_device_get_match_data helper pinctrl: samsung: Add infrastructure for pin-bank retention control pinctrl: samsung: Move retention control from mach-exynos to the pinctrl driver pinctrl: samsung: Move retention control from mach-s5pv210 to the pinctrl driver pinctrl: samsung: Replace syscore ops with standard platform device pm_ops .../bindings/pinctrl/samsung-pinctrl.txt | 1 + arch/arm/mach-exynos/suspend.c | 64 ------ arch/arm/mach-s5pv210/pm.c | 7 - arch/arm/mach-s5pv210/regs-clock.h | 4 - drivers/pinctrl/samsung/pinctrl-exynos.c | 231 +++++++++++++++++++-- drivers/pinctrl/samsung/pinctrl-s3c64xx.c | 12 +- drivers/pinctrl/samsung/pinctrl-samsung.c | 123 ++++------- drivers/pinctrl/samsung/pinctrl-samsung.h | 42 ++++ drivers/soc/samsung/exynos-pmu.c | 22 +- include/linux/soc/samsung/exynos-pmu.h | 10 + 10 files changed, 322 insertions(+), 194 deletions(-) -- 1.9.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel