From patchwork Wed Jan 25 11:50:25 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 92432 Delivered-To: patch@linaro.org Received: by 10.140.20.99 with SMTP id 90csp2170110qgi; Wed, 25 Jan 2017 03:51:13 -0800 (PST) X-Received: by 10.84.217.202 with SMTP id d10mr2973832plj.53.1485345073818; Wed, 25 Jan 2017 03:51:13 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g1si1319721pld.330.2017.01.25.03.51.13; Wed, 25 Jan 2017 03:51:13 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-gpio-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-gpio-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-gpio-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751386AbdAYLvM (ORCPT + 4 others); Wed, 25 Jan 2017 06:51:12 -0500 Received: from mailout4.w1.samsung.com ([210.118.77.14]:12782 "EHLO mailout4.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751396AbdAYLvG (ORCPT ); Wed, 25 Jan 2017 06:51:06 -0500 Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout4.w1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0OKC003AK3L3B410@mailout4.w1.samsung.com>; Wed, 25 Jan 2017 11:51:03 +0000 (GMT) Received: from eusmges2.samsung.com (unknown [203.254.199.241]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20170125115102eucas1p21a74f53870fd28647439a5edd16a82d7~dAXcMz6y91528915289eucas1p2V; Wed, 25 Jan 2017 11:51:02 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges2.samsung.com (EUCPMTA) with SMTP id 4D.72.30614.62198885; Wed, 25 Jan 2017 11:51:02 +0000 (GMT) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20170125115102eucas1p187f817f967c18a640098cf29268238d2~dAXbg13ks1561715617eucas1p1O; Wed, 25 Jan 2017 11:51:02 +0000 (GMT) X-AuditID: cbfec7f1-f793f6d000007796-c2-588891264c5b Received: from eusync3.samsung.com ( [203.254.199.213]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id 9D.1F.06687.56198885; Wed, 25 Jan 2017 11:52:05 +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 <0OKC00H7J3KW4970@eusync3.samsung.com>; Wed, 25 Jan 2017 11:51:01 +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 Cc: Marek Szyprowski , Sylwester Nawrocki , Krzysztof Kozlowski , Linus Walleij , Tomasz Figa , Lee Jones , Bartlomiej Zolnierkiewicz Subject: [PATCH 1/7] soc: samsung: pmu: Add dummy support for Exynos5433 SoC Date: Wed, 25 Jan 2017 12:50:25 +0100 Message-id: <1485345031-2948-2-git-send-email-m.szyprowski@samsung.com> X-Mailer: git-send-email 1.9.1 In-reply-to: <1485345031-2948-1-git-send-email-m.szyprowski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrAIsWRmVeSWpSXmKPExsWy7djPc7pqEzsiDNac1bTYOGM9q8X58xvY Le5/PcpoMeXPciaLTY+vsVpsnv+H0eLyrjlsFjPO72OyWHvkLrvF4TftrBardv1hdOD22Dnr LrvHplWdbB53ru1h89i8pN6jb8sqRo/Pm+QC2KK4bFJSczLLUov07RK4Mrbv+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6auY4JwmpgkptybClbFJmAo0fW2C6xKRKCd UeL17WtgVcwCW5gkujZdBJsrLOAjMfFcK5DNwcEioCqxslcPJMwr4C5x79FNJoh1chInj01m BSnhFPCQOPLGBCQsBFQyp7mXeQIj7wJGhlWMIqmlxbnpucWGesWJucWleel6yfm5mxiBwb/t 2M/NOxgvbQw+xCjAwajEwzshqT1CiDWxrLgy9xCjBAezkgivQ0tHhBBvSmJlVWpRfnxRaU5q 8SFGU6CTJjJLiSbnAyMzryTe0MTQ3NLQyNjCwtzISEmct+TDlXAhgfTEktTs1NSC1CKYPiYO TqkGRkVfpQ/G+grndj7Q++3zSfrDk3V5ugeEpqtF8tX8Pdv0ztdg+jOmNO+exQuqzD8f8nrh 8tQriv/T9nlH11+W3eeWcepX3z77kOA7zw/vu20icNjug9TRsPBzahrl31aaX6xTZF1/z2Xz bVOOk9sjWFjEflU3TnDZxZY1Z0apWJnriZdWNXZxIkosxRmJhlrMRcWJAElAVWKUAgAA X-MTR: 20000000000000000@CPGS X-CMS-MailID: 20170125115102eucas1p187f817f967c18a640098cf29268238d2 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: 20170125115102eucas1p187f817f967c18a640098cf29268238d2 X-RootMTR: 20170125115102eucas1p187f817f967c18a640098cf29268238d2 References: <1485345031-2948-1-git-send-email-m.szyprowski@samsung.com> Sender: linux-gpio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org Add compatible for Exynos5433 SoC, so the driver will bind and let other drivers to use PMU regmap. Signed-off-by: Marek Szyprowski --- drivers/soc/samsung/exynos-pmu.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-gpio" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/soc/samsung/exynos-pmu.c b/drivers/soc/samsung/exynos-pmu.c index 813df6e7292d..effb8a8a78c6 100644 --- a/drivers/soc/samsung/exynos-pmu.c +++ b/drivers/soc/samsung/exynos-pmu.c @@ -90,6 +90,8 @@ void exynos_sys_powerdown_conf(enum sys_powerdown mode) }, { .compatible = "samsung,exynos5420-pmu", .data = &exynos5420_pmu_data, + }, { + .compatible = "samsung,exynos5433-pmu", }, { /*sentinel*/ }, }; @@ -122,7 +124,7 @@ static int exynos_pmu_probe(struct platform_device *pdev) pmu_context->dev = dev; pmu_context->pmu_data = of_device_get_match_data(dev); - if (pmu_context->pmu_data->pmu_init) + if (pmu_context->pmu_data && pmu_context->pmu_data->pmu_init) pmu_context->pmu_data->pmu_init(); platform_set_drvdata(pdev, pmu_context); From patchwork Wed Jan 25 11:50:26 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 92430 Delivered-To: patch@linaro.org Received: by 10.140.20.99 with SMTP id 90csp2170076qgi; Wed, 25 Jan 2017 03:51:09 -0800 (PST) X-Received: by 10.99.152.65 with SMTP id l1mr17953327pgo.28.1485345069031; Wed, 25 Jan 2017 03:51:09 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g1si1319721pld.330.2017.01.25.03.51.08; Wed, 25 Jan 2017 03:51:09 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-samsung-soc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-samsung-soc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-samsung-soc-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751421AbdAYLvH (ORCPT + 4 others); Wed, 25 Jan 2017 06:51:07 -0500 Received: from mailout1.w1.samsung.com ([210.118.77.11]:50191 "EHLO mailout1.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751386AbdAYLvG (ORCPT ); Wed, 25 Jan 2017 06:51:06 -0500 Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout1.w1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0OKC00DCI3L3WO10@mailout1.w1.samsung.com>; Wed, 25 Jan 2017 11:51:03 +0000 (GMT) Received: from eusmges1.samsung.com (unknown [203.254.199.239]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20170125115103eucas1p2670672e1e6f4bbf5fdea15a589704596~dAXcpwxJp1534515345eucas1p2V; Wed, 25 Jan 2017 11:51:03 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges1.samsung.com (EUCPMTA) with SMTP id 2C.BF.16908.92198885; Wed, 25 Jan 2017 11:51:05 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20170125115102eucas1p180bbbdbcc09381051ab86bed6cfad5d0~dAXb9VYIy0874808748eucas1p1D; Wed, 25 Jan 2017 11:51:02 +0000 (GMT) X-AuditID: cbfec7ef-f79d26d00000420c-ee-58889129d1ec Received: from eusync3.samsung.com ( [203.254.199.213]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id 85.8E.10233.32198885; Wed, 25 Jan 2017 11:50:59 +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 <0OKC00H7J3KW4970@eusync3.samsung.com>; Wed, 25 Jan 2017 11:51:02 +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 Cc: Marek Szyprowski , Sylwester Nawrocki , Krzysztof Kozlowski , Linus Walleij , Tomasz Figa , Lee Jones , Bartlomiej Zolnierkiewicz Subject: [PATCH 2/7] pinctrl: samsung: Ensure that pad retention is disabled on driver init Date: Wed, 25 Jan 2017 12:50:26 +0100 Message-id: <1485345031-2948-3-git-send-email-m.szyprowski@samsung.com> X-Mailer: git-send-email 1.9.1 In-reply-to: <1485345031-2948-1-git-send-email-m.szyprowski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrHIsWRmVeSWpSXmKPExsWy7djPc7qaEzsiDD7MN7TYOGM9q8X58xvY Le5/PcpoMeXPciaLTY+vsVpsnv+H0eLyrjlsFjPO72OyWHvkLrvF4TftrBardv1hdOD22Dnr LrvHplWdbB53ru1h89i8pN6jb8sqRo/Pm+QC2KK4bFJSczLLUov07RK4MpqefmMuOMhVcWv6 DKYGxlccXYycHBICJhLHV71igrDFJC7cW8/WxcjFISSwjFFi0u1djBDOZ0aJpsUvmWA6Lvz/ yAJXtej3A6iWBiaJDft2sIFUsQkYSnS97QJLiAi0M0rc7etgAnGYBTYxSbQtOcHcxcjBISwQ K7HpkjhIA4uAqsT26ytZQWxeAXeJFy1z2CDWyUmcPDaZFaScU8BD4sgbE4jwdHaJw9eUQMIS ArISmw4wQ4RdJH7/3Ad1qLDEq+Nb2CFsGYnLk7tZIOx+oG9atSHsGYwS597yQtjWEoePXwS7 gFmAT2LStunMEON5JTrahCBMD4k1n2MhTEeJhVNdIR6fzSjx4d1X1gmMMgsYGVYxiqSWFuem pxYb6hUn5haX5qXrJefnbmIExvrpf8ff72B82hxyiFGA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FjXKXvh4+GKsaPsf6dVXx9OpTLRvfzxA0/Xmt 4FZIyYyZu+Qf2nGlO8xl37p2p3yqyLeTbgyN259siLuwR4mlOCPRUIu5qDgRAFecZt6VAgAA X-MTR: 20000000000000000@CPGS X-CMS-MailID: 20170125115102eucas1p180bbbdbcc09381051ab86bed6cfad5d0 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: 20170125115102eucas1p180bbbdbcc09381051ab86bed6cfad5d0 X-RootMTR: 20170125115102eucas1p180bbbdbcc09381051ab86bed6cfad5d0 References: <1485345031-2948-1-git-send-email-m.szyprowski@samsung.com> Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.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 --- drivers/pinctrl/samsung/pinctrl-exynos.c | 5 +++++ 1 file changed, 5 insertions(+) -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Reviewed-by: Krzysztof Kozlowski 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; } From patchwork Wed Jan 25 11:50:27 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 92433 Delivered-To: patch@linaro.org Received: by 10.140.20.99 with SMTP id 90csp2170115qgi; Wed, 25 Jan 2017 03:51:14 -0800 (PST) X-Received: by 10.99.228.5 with SMTP id a5mr47158905pgi.1.1485345074535; Wed, 25 Jan 2017 03:51:14 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g1si1319721pld.330.2017.01.25.03.51.14; Wed, 25 Jan 2017 03:51:14 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-samsung-soc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-samsung-soc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-samsung-soc-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751683AbdAYLvM (ORCPT + 4 others); Wed, 25 Jan 2017 06:51:12 -0500 Received: from mailout3.w1.samsung.com ([210.118.77.13]:46764 "EHLO mailout3.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751407AbdAYLvH (ORCPT ); Wed, 25 Jan 2017 06:51:07 -0500 Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout3.w1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0OKC00GA73L4D310@mailout3.w1.samsung.com>; Wed, 25 Jan 2017 11:51:04 +0000 (GMT) Received: from eusmges1.samsung.com (unknown [203.254.199.239]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20170125115103eucas1p254278e04e34c0562ced062ad8f7fc8d1~dAXdCa_4P1534415344eucas1p2J; Wed, 25 Jan 2017 11:51:03 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges1.samsung.com (EUCPMTA) with SMTP id 1D.BF.16908.A2198885; Wed, 25 Jan 2017 11:51:06 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20170125115103eucas1p1b37096286fb65c64acf8f74222d473af~dAXccJxsD0875308753eucas1p1H; Wed, 25 Jan 2017 11:51:03 +0000 (GMT) X-AuditID: cbfec7ef-f79d26d00000420c-f0-5888912abfb0 Received: from eusync3.samsung.com ( [203.254.199.213]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id A6.8E.10233.42198885; Wed, 25 Jan 2017 11:51:00 +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 <0OKC00H7J3KW4970@eusync3.samsung.com>; Wed, 25 Jan 2017 11:51:02 +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 Cc: Marek Szyprowski , Sylwester Nawrocki , Krzysztof Kozlowski , Linus Walleij , Tomasz Figa , Lee Jones , Bartlomiej Zolnierkiewicz Subject: [PATCH 3/7] pinctrl: samsung: Add support for pad retention control for Exynos5433 SoCs Date: Wed, 25 Jan 2017 12:50:27 +0100 Message-id: <1485345031-2948-4-git-send-email-m.szyprowski@samsung.com> X-Mailer: git-send-email 1.9.1 In-reply-to: <1485345031-2948-1-git-send-email-m.szyprowski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrAIsWRmVeSWpSXmKPExsWy7djP87paEzsiDNZd47XYOGM9q8X58xvY Le5/PcpoMeXPciaLTY+vsVpsnv+H0eLyrjlsFjPO72OyWHvkLrvF4TftrBardv1hdOD22Dnr LrvHplWdbB53ru1h89i8pN6jb8sqRo/Pm+QC2KK4bFJSczLLUov07RK4Mk7MkS+Ya1vx5O9N 5gbG1SZdjJwcEgImEuvf/2WBsMUkLtxbz9bFyMUhJLCMUeLikscsEM5nRomN338yw3QseNjL Ald14fxfdgingUliw74dbCBVbAKGEl1vu8BmiQi0M0rc7etgAnGYBTYxSbQtOQE2S1ggSeLh 134wm0VAVeLQlrNgNq+Au8S9CUtYIfbJSZw8NhnI5uDgFPCQOPLGBGSOhMB0dolVB+YygsQl BGQlNh2AOs9FYtK8w1CtwhKvjm9hh7BlJC5P7oZ6tJ9RoqlVG8KewShx7i0vhG0tcfj4RbBe ZgE+iUnbpjNDjOeV6GgTgijxkHj45S7USEeJ1afawGwhgdmMErP28E9glFnAyLCKUSS1tDg3 PbXYUK84Mbe4NC9dLzk/dxMjMN5P/zv+fgfj0+aQQ4wCHIxKPLwvUtojhFgTy4orcw8xSnAw K4nwOrR0RAjxpiRWVqUW5ccXleakFh9ilOZgURLn3bvgSriQQHpiSWp2ampBahFMlomDU6qB cfqtlfnPkqQPzlsatfj9OrPd7Av6Tj1x5utsYm0LFWx9z1GgdP/E3eWLr6zR5tVZOOdHcEd9 ieyTNVME+goSHouK7tFv6zx0t6ckk5uPpzhyIbuSmWyPQ593Xe73j/ExS/70TLUrvVAw09Cx a9n35hf7+8r3L9j6//ksl9W7Zqz1kjmtEWDAq8RSnJFoqMVcVJwIAJmoJ7HzAgAA X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFmpgkeLIzCtJLcpLzFFi42I5/e/4VV2ViR0RBusecVtsnLGe1eL8+Q3s Fve/HmW0mPJnOZPFpsfXWC02z//DaHF51xw2ixnn9zFZrD1yl93i8Jt2VotVu/4wOnB77Jx1 l91j06pONo871/aweWxeUu/Rt2UVo8fnTXIBbFFuNhmpiSmpRQqpecn5KZl56bZKoSFuuhZK CnmJuam2ShG6viFBSgpliTmlQJ6RARpwcA5wD1bSt0twyzgxR75grm3Fk783mRsYV5t0MXJy SAiYSCx42MsCYYtJXLi3ng3EFhJYwiix9E1EFyMXkN3EJLHq3VFGkASbgKFE19suNpCEiEA7 o8Tr29eYQBxmgS1MEl2bLrKDVAkLJEk8/NrPDGKzCKhKHNpyFszmFXCXuDdhCSvEOjmJk8cm A9kcHJwCHhJH3phAbHaXmNPcyzyBkXcBI8MqRpHU0uLc9NxiI73ixNzi0rx0veT83E2MwNDf duznlh2MXe+CDzEKcDAq8fBOSGqPEGJNLCuuzD3EKMHBrCTC69DSESHEm5JYWZValB9fVJqT WnyI0RToponMUqLJ+cC4zCuJNzQxNLc0NDK2sDA3MlIS55364Uq4kEB6YklqdmpqQWoRTB8T B6dUA6Pq0ku1Xxes8hJlO+FsYJZdLxpmv+7bT5N/2WuCVE/xfd+oE6k0ocF4aizP1xPpKw4b 161nfLVryodj69PnRD//dG7K3f+PvfiOBmnIPZRZWvT8tN3pi7K9s93ljVLnz505k2GOeLav dl1A9r3Eo1tvSz6VenLNoX2L7yqDde8ecwsJyf9fJ+aoxFKckWioxVxUnAgAjaakI5MCAAA= X-MTR: 20000000000000000@CPGS X-CMS-MailID: 20170125115103eucas1p1b37096286fb65c64acf8f74222d473af 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: 20170125115103eucas1p1b37096286fb65c64acf8f74222d473af X-RootMTR: 20170125115103eucas1p1b37096286fb65c64acf8f74222d473af References: <1485345031-2948-1-git-send-email-m.szyprowski@samsung.com> Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org This patch adds support for retention control for Exynos5433 SoCs. Three groups of pins has been defined for retention control: common shared group for ALIVE, CPIF, eSE, FINGER, IMEM, NFC, PERIC, TOUCH pin banks and separate control for FSYS and AUD pin banks, for which PMU retention registers match whole banks. Signed-off-by: Marek Szyprowski --- drivers/pinctrl/samsung/pinctrl-exynos.c | 58 +++++++++++++++++++++++++++++ include/linux/soc/samsung/exynos-regs-pmu.h | 19 ++++++++++ 2 files changed, 77 insertions(+) -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/pinctrl/samsung/pinctrl-exynos.c b/drivers/pinctrl/samsung/pinctrl-exynos.c index fa3802970570..f854c92209e1 100644 --- a/drivers/pinctrl/samsung/pinctrl-exynos.c +++ b/drivers/pinctrl/samsung/pinctrl-exynos.c @@ -1551,6 +1551,54 @@ static void exynos_retention_disable(struct samsung_pinctrl_drv_data *drvdata) EXYNOS5433_PIN_BANK_EINTG(3, 0x000, "gpj1", 0x00), }; +/* PMU pin retention groups registers for Exynos5433 (without audio & fsys) */ +static const u32 exynos5433_retention_regs[] = { + EXYNOS5433_PAD_RETENTION_TOP_OPTION, + EXYNOS5433_PAD_RETENTION_UART_OPTION, + EXYNOS5433_PAD_RETENTION_EBIA_OPTION, + EXYNOS5433_PAD_RETENTION_EBIB_OPTION, + EXYNOS5433_PAD_RETENTION_SPI_OPTION, + EXYNOS5433_PAD_RETENTION_MIF_OPTION, + EXYNOS5433_PAD_RETENTION_USBXTI_OPTION, + EXYNOS5433_PAD_RETENTION_BOOTLDO_OPTION, + EXYNOS5433_PAD_RETENTION_UFS_OPTION, + EXYNOS5433_PAD_RETENTION_FSYSGENIO_OPTION, +}; + +static const struct samsung_retention_data exynos5433_retention_data __initconst = { + .regs = exynos5433_retention_regs, + .nr_regs = ARRAY_SIZE(exynos5433_retention_regs), + .value = PAD_INITIATE_WAKEUP, + .refcnt = &exynos_shared_retention_refcnt, + .init = exynos_retention_init, +}; + +/* PMU retention control for audio pins can be tied to audio pin bank */ +static const u32 exynos5433_audio_retention_regs[] = { + EXYNOS5433_PAD_RETENTION_AUD_OPTION, +}; + +static const struct samsung_retention_data exynos5433_audio_retention_data __initconst = { + .regs = exynos5433_audio_retention_regs, + .nr_regs = ARRAY_SIZE(exynos5433_audio_retention_regs), + .value = PAD_INITIATE_WAKEUP, + .init = exynos_retention_init, +}; + +/* PMU retention control for mmc pins can be tied to fsys pin bank */ +static const u32 exynos5433_fsys_retention_regs[] = { + EXYNOS5433_PAD_RETENTION_MMC0_OPTION, + EXYNOS5433_PAD_RETENTION_MMC1_OPTION, + EXYNOS5433_PAD_RETENTION_MMC2_OPTION, +}; + +static const struct samsung_retention_data exynos5433_fsys_retention_data __initconst = { + .regs = exynos5433_fsys_retention_regs, + .nr_regs = ARRAY_SIZE(exynos5433_fsys_retention_regs), + .value = PAD_INITIATE_WAKEUP, + .init = exynos_retention_init, +}; + /* * Samsung pinctrl driver data for Exynos5433 SoC. Exynos5433 SoC includes * ten gpio/pin-mux/pinconfig controllers. @@ -1564,6 +1612,7 @@ static void exynos_retention_disable(struct samsung_pinctrl_drv_data *drvdata) .suspend = exynos_pinctrl_suspend, .resume = exynos_pinctrl_resume, .nr_ext_resources = 1, + .retention_data = &exynos5433_retention_data, }, { /* pin-controller instance 1 data */ .pin_banks = exynos5433_pin_banks1, @@ -1571,6 +1620,7 @@ static void exynos_retention_disable(struct samsung_pinctrl_drv_data *drvdata) .eint_gpio_init = exynos_eint_gpio_init, .suspend = exynos_pinctrl_suspend, .resume = exynos_pinctrl_resume, + .retention_data = &exynos5433_audio_retention_data, }, { /* pin-controller instance 2 data */ .pin_banks = exynos5433_pin_banks2, @@ -1578,6 +1628,7 @@ static void exynos_retention_disable(struct samsung_pinctrl_drv_data *drvdata) .eint_gpio_init = exynos_eint_gpio_init, .suspend = exynos_pinctrl_suspend, .resume = exynos_pinctrl_resume, + .retention_data = &exynos5433_retention_data, }, { /* pin-controller instance 3 data */ .pin_banks = exynos5433_pin_banks3, @@ -1585,6 +1636,7 @@ static void exynos_retention_disable(struct samsung_pinctrl_drv_data *drvdata) .eint_gpio_init = exynos_eint_gpio_init, .suspend = exynos_pinctrl_suspend, .resume = exynos_pinctrl_resume, + .retention_data = &exynos5433_retention_data, }, { /* pin-controller instance 4 data */ .pin_banks = exynos5433_pin_banks4, @@ -1592,6 +1644,7 @@ static void exynos_retention_disable(struct samsung_pinctrl_drv_data *drvdata) .eint_gpio_init = exynos_eint_gpio_init, .suspend = exynos_pinctrl_suspend, .resume = exynos_pinctrl_resume, + .retention_data = &exynos5433_retention_data, }, { /* pin-controller instance 5 data */ .pin_banks = exynos5433_pin_banks5, @@ -1599,6 +1652,7 @@ static void exynos_retention_disable(struct samsung_pinctrl_drv_data *drvdata) .eint_gpio_init = exynos_eint_gpio_init, .suspend = exynos_pinctrl_suspend, .resume = exynos_pinctrl_resume, + .retention_data = &exynos5433_fsys_retention_data, }, { /* pin-controller instance 6 data */ .pin_banks = exynos5433_pin_banks6, @@ -1606,6 +1660,7 @@ static void exynos_retention_disable(struct samsung_pinctrl_drv_data *drvdata) .eint_gpio_init = exynos_eint_gpio_init, .suspend = exynos_pinctrl_suspend, .resume = exynos_pinctrl_resume, + .retention_data = &exynos5433_retention_data, }, { /* pin-controller instance 7 data */ .pin_banks = exynos5433_pin_banks7, @@ -1613,6 +1668,7 @@ static void exynos_retention_disable(struct samsung_pinctrl_drv_data *drvdata) .eint_gpio_init = exynos_eint_gpio_init, .suspend = exynos_pinctrl_suspend, .resume = exynos_pinctrl_resume, + .retention_data = &exynos5433_retention_data, }, { /* pin-controller instance 8 data */ .pin_banks = exynos5433_pin_banks8, @@ -1620,6 +1676,7 @@ static void exynos_retention_disable(struct samsung_pinctrl_drv_data *drvdata) .eint_gpio_init = exynos_eint_gpio_init, .suspend = exynos_pinctrl_suspend, .resume = exynos_pinctrl_resume, + .retention_data = &exynos5433_retention_data, }, { /* pin-controller instance 9 data */ .pin_banks = exynos5433_pin_banks9, @@ -1627,6 +1684,7 @@ static void exynos_retention_disable(struct samsung_pinctrl_drv_data *drvdata) .eint_gpio_init = exynos_eint_gpio_init, .suspend = exynos_pinctrl_suspend, .resume = exynos_pinctrl_resume, + .retention_data = &exynos5433_retention_data, }, }; diff --git a/include/linux/soc/samsung/exynos-regs-pmu.h b/include/linux/soc/samsung/exynos-regs-pmu.h index d30186e2b609..6a160e2ef4f0 100644 --- a/include/linux/soc/samsung/exynos-regs-pmu.h +++ b/include/linux/soc/samsung/exynos-regs-pmu.h @@ -690,4 +690,23 @@ | EXYNOS5420_KFC_USE_STANDBY_WFI2 \ | EXYNOS5420_KFC_USE_STANDBY_WFI3) +/* For EXYNOS5433 */ +#define EXYNOS5433_PAD_RETENTION_AUD_OPTION (0x3028) +#define EXYNOS5433_PAD_RETENTION_MMC2_OPTION (0x30C8) +#define EXYNOS5433_PAD_RETENTION_TOP_OPTION (0x3108) +#define EXYNOS5433_PAD_RETENTION_UART_OPTION (0x3128) +#define EXYNOS5433_PAD_RETENTION_MMC0_OPTION (0x3148) +#define EXYNOS5433_PAD_RETENTION_MMC1_OPTION (0x3168) +#define EXYNOS5433_PAD_RETENTION_EBIA_OPTION (0x3188) +#define EXYNOS5433_PAD_RETENTION_EBIB_OPTION (0x31A8) +#define EXYNOS5433_PAD_RETENTION_SPI_OPTION (0x31C8) +#define EXYNOS5433_PAD_RETENTION_MIF_OPTION (0x31E8) +#define EXYNOS5433_PAD_RETENTION_USBXTI_OPTION (0x3228) +#define EXYNOS5433_PAD_RETENTION_BOOTLDO_OPTION (0x3248) +#define EXYNOS5433_PAD_RETENTION_UFS_OPTION (0x3268) +#define EXYNOS5433_PAD_RETENTION_FSYSGENIO_OPTION (0x32A8) + +/* EXYNOS5433_PAD_RETENTION_*_OPTION */ +#define PAD_INITIATE_WAKEUP (0x1 << 28) + #endif /* __LINUX_SOC_EXYNOS_REGS_PMU_H */ From patchwork Wed Jan 25 11:50:28 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 92441 Delivered-To: patch@linaro.org Received: by 10.140.20.99 with SMTP id 90csp2170810qgi; Wed, 25 Jan 2017 03:53:15 -0800 (PST) X-Received: by 10.84.174.1 with SMTP id q1mr969249plb.19.1485345195186; Wed, 25 Jan 2017 03:53:15 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t6si1332207plm.337.2017.01.25.03.53.14; Wed, 25 Jan 2017 03:53:15 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752161AbdAYLwy (ORCPT + 25 others); Wed, 25 Jan 2017 06:52:54 -0500 Received: from mailout2.w1.samsung.com ([210.118.77.12]:57470 "EHLO mailout2.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751419AbdAYLvI (ORCPT ); Wed, 25 Jan 2017 06:51:08 -0500 Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout2.w1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0OKC00ED43L5G310@mailout2.w1.samsung.com>; Wed, 25 Jan 2017 11:51:05 +0000 (GMT) Received: from eusmges2.samsung.com (unknown [203.254.199.241]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20170125115104eucas1p17cc9acbfa0fac8918c7d979ca93a60ec~dAXdl1aU61025310253eucas1p1i; Wed, 25 Jan 2017 11:51:04 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges2.samsung.com (EUCPMTA) with SMTP id 9E.72.30614.82198885; Wed, 25 Jan 2017 11:51:04 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20170125115103eucas1p1d0e446fa6e998da257e3c17922a00d7f~dAXc6YM1u0875708757eucas1p1P; Wed, 25 Jan 2017 11:51:03 +0000 (GMT) X-AuditID: cbfec7f1-f793f6d000007796-c7-58889128e2ed Received: from eusync3.samsung.com ( [203.254.199.213]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id 67.8E.10233.42198885; Wed, 25 Jan 2017 11:51:00 +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 <0OKC00H7J3KW4970@eusync3.samsung.com>; Wed, 25 Jan 2017 11:51:03 +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 Cc: Marek Szyprowski , Sylwester Nawrocki , Krzysztof Kozlowski , Linus Walleij , Tomasz Figa , Lee Jones , Bartlomiej Zolnierkiewicz Subject: [PATCH 4/7] arm64: dts: exynos: Add clocks to Exynos5433 LPASS module Date: Wed, 25 Jan 2017 12:50:28 +0100 Message-id: <1485345031-2948-5-git-send-email-m.szyprowski@samsung.com> X-Mailer: git-send-email 1.9.1 In-reply-to: <1485345031-2948-1-git-send-email-m.szyprowski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrAIsWRmVeSWpSXmKPExsWy7djP87oaEzsiDCa94LLYOGM9q8X58xvY Le5/PcpoMeXPciaLTY+vsVpsnv+H0eLyrjlsFjPO72OyWHvkLrvF4TftrBardv1hdOD22Dnr LrvHplWdbB53ru1h89i8pN6jb8sqRo/Pm+QC2KK4bFJSczLLUov07RK4MtY/38pcsJetYvuX p2wNjHtYuxg5OCQETCQO9Cd0MXICmWISF+6tZ+ti5OIQEljKKDHv1WQo5zOjROeGZjaIKhOJ rVNOsUAkljFKrNh0ih3CaWCSaLm6hRmkik3AUKLrbRdYu4hAO6PE3b4OJhCHWWATk0TbkhNg VcICARLTj95gArFZBFQl/r16wwhi8wq4S2w5dZQdYp+cxMljk8GO5RTwkDjyxgRkjoTAdHaJ NU/fM0I8ISux6QAzRLmLxOTfs1khbGGJV8e3QI2Rkbg8uZsFwu5nlGhq1YawZzBKnHvLC2Fb Sxw+fhGsl1mAT2LStunMEON5JTrahCBKPCTuTJwJNd5RomPlSTBbSGA2o8TXe4ETGGUWMDKs YhRJLS3OTU8tNtIrTswtLs1L10vOz93ECIz30/+Of9zB+P6E1SFGAQ5GJR7eFyntEUKsiWXF lbmHGCU4mJVEeB1aOiKEeFMSK6tSi/Lji0pzUosPMUpzsCiJ8+5ZcCVcSCA9sSQ1OzW1ILUI JsvEwSnVwGijGb2ifde+oFqXd345k0zmL50tvC73maPcu5k7etVuc3/tS/i/f9vuXanO+25G 3D///dHOTn9rpYyH6w49XnZo9qa62TMnTZsseortLk+SXUZF2I6ELHHXuu+rmLkWrjvWkqTw imODJMemdL4/Jz4KeatH6stczZzxWcyd0WaKrN+ZHoPUTfuUWIozEg21mIuKEwHHXhZr8wIA AA== X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFmpkkeLIzCtJLcpLzFFi42I5/e/4VV2ViR0RBtPeaFlsnLGe1eL8+Q3s Fve/HmW0mPJnOZPFpsfXWC02z//DaHF51xw2ixnn9zFZrD1yl93i8Jt2VotVu/4wOnB77Jx1 l91j06pONo871/aweWxeUu/Rt2UVo8fnTXIBbFFuNhmpiSmpRQqpecn5KZl56bZKoSFuuhZK CnmJuam2ShG6viFBSgpliTmlQJ6RARpwcA5wD1bSt0twy1j/fCtzwV62iu1fnrI1MO5h7WLk 5JAQMJHYOuUUC4QtJnHh3nq2LkYuDiGBJYwS8/Zeg3KamCT6/k9kB6liEzCU6HrbBZYQEWhn lHh9+xoTiMMssIVJomvTRaAqDg5hAT+JyRfYQBpYBFQl/r16wwhi8wq4S2w5dZQdYp2cxMlj k1lByjkFPCSOvDEBCQsBlcxp7mWewMi7gJFhFaNIamlxbnpusZFecWJucWleul5yfu4mRmDw bzv2c8sOxq53wYcYBTgYlXh4JyS1RwixJpYVV+YeYpTgYFYS4XVo6YgQ4k1JrKxKLcqPLyrN SS0+xGgKdNNEZinR5HxgZOaVxBuaGJpbGhoZW1iYGxkpifNO/XAlXEggPbEkNTs1tSC1CKaP iYNTqoExdf63J+1buBluZS89+Cia+0LFp3NXRLvZvz63vuW1uMn9SuI+3t4D19afTmQ+dWPr oq+Wma9WzU1RCCuo4XdfWP71u64Rp/72DeXzmGYkTvu7IzkidO3u1+f/sCbIMrhFLmaXz+rN jnHv32XIZCK5J26D9GrlvQ+fWRWKhslEXN5i+PTE73kZSizFGYmGWsxFxYkAAyoLFZQCAAA= X-MTR: 20000000000000000@CPGS X-CMS-MailID: 20170125115103eucas1p1d0e446fa6e998da257e3c17922a00d7f 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: 20170125115103eucas1p1d0e446fa6e998da257e3c17922a00d7f X-RootMTR: 20170125115103eucas1p1d0e446fa6e998da257e3c17922a00d7f References: <1485345031-2948-1-git-send-email-m.szyprowski@samsung.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Exynos5433 LPASS module requires some clocks for proper operation with power domain. Signed-off-by: Marek Szyprowski --- arch/arm64/boot/dts/exynos/exynos5433.dtsi | 2 ++ 1 file changed, 2 insertions(+) -- 1.9.1 diff --git a/arch/arm64/boot/dts/exynos/exynos5433.dtsi b/arch/arm64/boot/dts/exynos/exynos5433.dtsi index 57c7bbeb65a7..16072c1c3ed3 100644 --- a/arch/arm64/boot/dts/exynos/exynos5433.dtsi +++ b/arch/arm64/boot/dts/exynos/exynos5433.dtsi @@ -1494,6 +1494,8 @@ audio-subsystem@11400000 { compatible = "samsung,exynos5433-lpass"; reg = <0x11400000 0x100>, <0x11500000 0x08>; + clocks = <&cmu_aud CLK_PCLK_SFR0_CTRL>; + clock-names = "sfr0_ctrl"; samsung,pmu-syscon = <&pmu_system_controller>; #address-cells = <1>; #size-cells = <1>; From patchwork Wed Jan 25 11:50:29 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 92440 Delivered-To: patch@linaro.org Received: by 10.140.20.99 with SMTP id 90csp2170770qgi; Wed, 25 Jan 2017 03:53:07 -0800 (PST) X-Received: by 10.99.109.143 with SMTP id i137mr46526023pgc.11.1485345187109; Wed, 25 Jan 2017 03:53:07 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r59si1331990plb.97.2017.01.25.03.53.06; Wed, 25 Jan 2017 03:53:07 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-samsung-soc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-samsung-soc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-samsung-soc-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752162AbdAYLwz (ORCPT + 4 others); Wed, 25 Jan 2017 06:52:55 -0500 Received: from mailout1.w1.samsung.com ([210.118.77.11]:50191 "EHLO mailout1.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751418AbdAYLvH (ORCPT ); Wed, 25 Jan 2017 06:51:07 -0500 Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout1.w1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0OKC00ECG3L54U10@mailout1.w1.samsung.com>; Wed, 25 Jan 2017 11:51:05 +0000 (GMT) Received: from eusmges5.samsung.com (unknown [203.254.199.245]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20170125115104eucas1p111e8adf32150c9fbd763d63f2fc01c20~dAXd5lBUK0875708757eucas1p1Q; Wed, 25 Jan 2017 11:51:04 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges5.samsung.com (EUCPMTA) with SMTP id B7.D0.17477.82198885; Wed, 25 Jan 2017 11:51:04 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20170125115104eucas1p219f763cea7fdb2dfea092d1f2a28fc31~dAXdMoXZs1193111931eucas1p2r; Wed, 25 Jan 2017 11:51:03 +0000 (GMT) X-AuditID: cbfec7f5-f79d06d000004445-6f-588891289264 Received: from eusync3.samsung.com ( [203.254.199.213]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id 48.8E.10233.52198885; Wed, 25 Jan 2017 11:51:01 +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 <0OKC00H7J3KW4970@eusync3.samsung.com>; Wed, 25 Jan 2017 11:51:03 +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 Cc: Marek Szyprowski , Sylwester Nawrocki , Krzysztof Kozlowski , Linus Walleij , Tomasz Figa , Lee Jones , Bartlomiej Zolnierkiewicz Subject: [PATCH 5/7] mfd: exynos-lpass: Remove pad retention control Date: Wed, 25 Jan 2017 12:50:29 +0100 Message-id: <1485345031-2948-6-git-send-email-m.szyprowski@samsung.com> X-Mailer: git-send-email 1.9.1 In-reply-to: <1485345031-2948-1-git-send-email-m.szyprowski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrIIsWRmVeSWpSXmKPExsWy7djP87oaEzsiDO53y1lsnLGe1eL8+Q3s Fve/HmW0mPJnOZPFpsfXWC02z//DaHF51xw2ixnn9zFZrD1yl93i8Jt2VotVu/4wOnB77Jx1 l91j06pONo871/aweWxeUu/Rt2UVo8fnTXIBbFFcNimpOZllqUX6dglcGcdP3mEtmC9fcaF1 G2MD43SpLkZODgkBE4nezVOZIGwxiQv31rN1MXJxCAksZZR40rqNBcL5zChxZfl0JpiOv3vW MEEkljFKHFg+GcppYJJoubqFGaSKTcBQouttF9gsEYF2Rom7fR1gVcwCm5gk2pacAKsSFnCR mL8UZDsHB4uAqsTypXogYV4Bd4mzi+YxQqyTkzh5bDIrSAmngIfEkTcmIGMkBKazS6z60cwM EpcQkJXYdIAZotxF4l3bIyh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jKZAJ01klhJNzgfGZV5JvKGJobmloZGxhYW5kZGSOO/UD1fChQTSE0tSs1NTC1KLYPqY ODilGhirJ1q8WZC7ftcmrXtT894ryXjnf37sJ+Y5IeiN8wGxtILO4/2ltw4b3FntnVD1f/0X V9X2OplV/C8ffVNh6Yuc+X7akjcTPDlqZMPNT/Xz8WVN5lvy+X5mRVzklQvzxZZemNTZ8/kn l2/uvvdPHD/wy8yM9OirkU9/1mG69VxBn9r9G1wvHeKVWIozEg21mIuKEwGK8gTUkwIAAA== X-MTR: 20000000000000000@CPGS X-CMS-MailID: 20170125115104eucas1p219f763cea7fdb2dfea092d1f2a28fc31 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: 20170125115104eucas1p219f763cea7fdb2dfea092d1f2a28fc31 X-RootMTR: 20170125115104eucas1p219f763cea7fdb2dfea092d1f2a28fc31 References: <1485345031-2948-1-git-send-email-m.szyprowski@samsung.com> Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org Pad retention should be controlled from pin control driver, so remove it from Exynos LPASS driver. After this change, no more access to PMU regmap is needed, so remove also the code for handling PMU regmap. Signed-off-by: Marek Szyprowski --- .../bindings/mfd/samsung,exynos5433-lpass.txt | 2 -- drivers/mfd/exynos-lpass.c | 17 ----------------- include/linux/mfd/syscon/exynos5-pmu.h | 3 --- 3 files changed, 22 deletions(-) -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/Documentation/devicetree/bindings/mfd/samsung,exynos5433-lpass.txt b/Documentation/devicetree/bindings/mfd/samsung,exynos5433-lpass.txt index c110e118b79f..a8deaee82c44 100644 --- a/Documentation/devicetree/bindings/mfd/samsung,exynos5433-lpass.txt +++ b/Documentation/devicetree/bindings/mfd/samsung,exynos5433-lpass.txt @@ -5,7 +5,6 @@ Required properties: - compatible : "samsung,exynos5433-lpass" - reg : should contain the LPASS top SFR region location and size - - samsung,pmu-syscon : the phandle to the Power Management Unit node - #address-cells : should be 1 - #size-cells : should be 1 - ranges : must be present @@ -25,7 +24,6 @@ Example: audio-subsystem { compatible = "samsung,exynos5433-lpass"; reg = <0x11400000 0x100>, <0x11500000 0x08>; - samsung,pmu-syscon = <&pmu_system_controller>; #address-cells = <1>; #size-cells = <1>; ranges; diff --git a/drivers/mfd/exynos-lpass.c b/drivers/mfd/exynos-lpass.c index 2e064fb8826f..17915daa2e80 100644 --- a/drivers/mfd/exynos-lpass.c +++ b/drivers/mfd/exynos-lpass.c @@ -18,7 +18,6 @@ #include #include #include -#include #include #include #include @@ -51,8 +50,6 @@ #define LPASS_INTR_SFR BIT(0) struct exynos_lpass { - /* pointer to the Power Management Unit regmap */ - struct regmap *pmu; /* pointer to the LPASS TOP regmap */ struct regmap *top; }; @@ -81,10 +78,6 @@ static void exynos_lpass_enable(struct exynos_lpass *lpass) regmap_write(lpass->top, SFR_LPASS_INTR_CPU_MASK, LPASS_INTR_SFR | LPASS_INTR_DMA | LPASS_INTR_I2S); - /* Activate related PADs from retention state */ - regmap_write(lpass->pmu, EXYNOS5433_PAD_RETENTION_AUD_OPTION, - EXYNOS5433_PAD_INITIATE_WAKEUP_FROM_LOWPWR); - exynos_lpass_core_sw_reset(lpass, LPASS_I2S_SW_RESET); exynos_lpass_core_sw_reset(lpass, LPASS_DMA_SW_RESET); exynos_lpass_core_sw_reset(lpass, LPASS_MEM_SW_RESET); @@ -95,9 +88,6 @@ static void exynos_lpass_disable(struct exynos_lpass *lpass) /* Mask any unmasked IP interrupt sources */ regmap_write(lpass->top, SFR_LPASS_INTR_CPU_MASK, 0); regmap_write(lpass->top, SFR_LPASS_INTR_CA5_MASK, 0); - - /* Deactivate related PADs from retention state */ - regmap_write(lpass->pmu, EXYNOS5433_PAD_RETENTION_AUD_OPTION, 0); } static const struct regmap_config exynos_lpass_reg_conf = { @@ -131,13 +121,6 @@ static int exynos_lpass_probe(struct platform_device *pdev) return PTR_ERR(lpass->top); } - lpass->pmu = syscon_regmap_lookup_by_phandle(dev->of_node, - "samsung,pmu-syscon"); - if (IS_ERR(lpass->pmu)) { - dev_err(dev, "Failed to lookup PMU regmap\n"); - return PTR_ERR(lpass->pmu); - } - platform_set_drvdata(pdev, lpass); exynos_lpass_enable(lpass); diff --git a/include/linux/mfd/syscon/exynos5-pmu.h b/include/linux/mfd/syscon/exynos5-pmu.h index c28ff21ca4d2..0622ae86f9db 100644 --- a/include/linux/mfd/syscon/exynos5-pmu.h +++ b/include/linux/mfd/syscon/exynos5-pmu.h @@ -46,7 +46,4 @@ #define EXYNOS5_MIPI_PHY_S_RESETN BIT(1) #define EXYNOS5_MIPI_PHY_M_RESETN BIT(2) -#define EXYNOS5433_PAD_RETENTION_AUD_OPTION (0x3028) -#define EXYNOS5433_PAD_INITIATE_WAKEUP_FROM_LOWPWR BIT(28) - #endif /* _LINUX_MFD_SYSCON_PMU_EXYNOS5_H_ */ From patchwork Wed Jan 25 11:50:30 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 92439 Delivered-To: patch@linaro.org Received: by 10.140.20.99 with SMTP id 90csp2170731qgi; Wed, 25 Jan 2017 03:52:58 -0800 (PST) X-Received: by 10.200.43.212 with SMTP id n20mr31715199qtn.117.1485345178818; Wed, 25 Jan 2017 03:52:58 -0800 (PST) Return-Path: Received: from bombadil.infradead.org (bombadil.infradead.org. [65.50.211.133]) by mx.google.com with ESMTPS id b46si15347020qtb.31.2017.01.25.03.52.58 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 25 Jan 2017 03:52:58 -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 1cWM8H-0005WI-36; Wed, 25 Jan 2017 11:52:57 +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 1cWM6r-0004pn-4j for linux-arm-kernel@lists.infradead.org; Wed, 25 Jan 2017 11:51:30 +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 <0OKC003953L5KS10@mailout4.w1.samsung.com> for linux-arm-kernel@lists.infradead.org; Wed, 25 Jan 2017 11:51:05 +0000 (GMT) Received: from eusmges5.samsung.com (unknown [203.254.199.245]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20170125115105eucas1p15700a443babd150232a85ea97a5d873c~dAXedauGz2999829998eucas1p1l; Wed, 25 Jan 2017 11:51:05 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges5.samsung.com (EUCPMTA) with SMTP id 88.D0.17477.92198885; Wed, 25 Jan 2017 11:51:05 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20170125115104eucas1p1c725f2854fb4cff98548721f79dd6a5b~dAXd3akbu1025310253eucas1p1k; Wed, 25 Jan 2017 11:51:04 +0000 (GMT) X-AuditID: cbfec7f5-f79d06d000004445-70-58889129fb3d Received: from eusync3.samsung.com ( [203.254.199.213]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id 49.8E.10233.52198885; Wed, 25 Jan 2017 11:51:01 +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 <0OKC00H7J3KW4970@eusync3.samsung.com>; Wed, 25 Jan 2017 11:51:04 +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 6/7] mfd: exynos-lpass: Add support for clocks Date: Wed, 25 Jan 2017 12:50:30 +0100 Message-id: <1485345031-2948-7-git-send-email-m.szyprowski@samsung.com> X-Mailer: git-send-email 1.9.1 In-reply-to: <1485345031-2948-1-git-send-email-m.szyprowski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrEIsWRmVeSWpSXmKPExsWy7djPc7qaEzsiDHpWsFlsnLGe1eL8+Q3s Fve/HmW0mPJnOZPFpsfXWC02z//DaHF51xw2ixnn9zFZrD1yl93i8Jt2VotVu/4wOnB77Jx1 l91j06pONo871/aweWxeUu/Rt2UVo8fnTXIBbFFcNimpOZllqUX6dglcGe/er2EruCJd0XB5 K1MD412xLkZODgkBE4mT3R3MELaYxIV769m6GLk4hASWMkq8bDzFDOF8ZpSYevMYO0zH3IXn oBLLGCW6n1xhgXAamCTWvdvKCFLFJmAo0fW2C2yWiEA7o8Tdvg4mEIdZYBOTRNuSE2AbhQXs JN78fsUGYrMIqEo8m7oJrJtXwF1ib/MFRoh9chInj01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QlJ7hBBrYllxZe4hRgkOZiURXoeWjggh3pTEyqrUovz4 otKc1OJDjKZAN01klhJNzgfGZl5JvKGJobmloZGxhYW5kZGSOO/UD1fChQTSE0tSs1NTC1KL YPqYODilGhjnTHxZbqGx0euP/npfhi117zuOzQ085PheotzD7EGdhjHLkqD72vUayQXT1A1m ebw9dL7NwmGp06Ss/mlnxScvyQqcwZN2SL3jVchj1qOP7Xh0t70qyI/WdasLbWdI8FnELHYz 58zSpaFlXQktJVmBSw6nWXEJTtMSangpEjBDo6cu5YVmlBJLcUaioRZzUXEiADdDnCCVAgAA X-MTR: 20000000000000000@CPGS X-CMS-MailID: 20170125115104eucas1p1c725f2854fb4cff98548721f79dd6a5b 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: 20170125115104eucas1p1c725f2854fb4cff98548721f79dd6a5b X-RootMTR: 20170125115104eucas1p1c725f2854fb4cff98548721f79dd6a5b References: <1485345031-2948-1-git-send-email-m.szyprowski@samsung.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170125_035129_348323_A0207FC2 X-CRM114-Status: GOOD ( 16.76 ) 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 Exynos LPASS requires some clocks to be enabled to make any access to its registers. This patch adds code for handling such clocks. For current set of registers it is enough to keep sfr0_ctrl clock enabled. Till now it worked only because those clocks were enabled by bootloader and driver probe() happened before they were disabled by clock core because of lack of users. Handling those clocks is also needed to make it possible to enable support for audio power domain. Signed-off-by: Marek Szyprowski --- .../devicetree/bindings/mfd/samsung,exynos5433-lpass.txt | 6 ++++++ drivers/mfd/exynos-lpass.c | 10 ++++++++++ 2 files changed, 16 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/Documentation/devicetree/bindings/mfd/samsung,exynos5433-lpass.txt b/Documentation/devicetree/bindings/mfd/samsung,exynos5433-lpass.txt index a8deaee82c44..df664018c148 100644 --- a/Documentation/devicetree/bindings/mfd/samsung,exynos5433-lpass.txt +++ b/Documentation/devicetree/bindings/mfd/samsung,exynos5433-lpass.txt @@ -5,6 +5,10 @@ Required properties: - compatible : "samsung,exynos5433-lpass" - reg : should contain the LPASS top SFR region location and size + - clock-names : should contain following required clocks: "sfr0_ctrl" + - clocks : should contain clock specifiers of all clocks, which + input names have been specified in clock-names + property, in same order. - #address-cells : should be 1 - #size-cells : should be 1 - ranges : must be present @@ -24,6 +28,8 @@ Example: audio-subsystem { compatible = "samsung,exynos5433-lpass"; reg = <0x11400000 0x100>, <0x11500000 0x08>; + clocks = <&cmu_aud CLK_PCLK_SFR0_CTRL>; + clock-names = "sfr0_ctrl"; #address-cells = <1>; #size-cells = <1>; ranges; diff --git a/drivers/mfd/exynos-lpass.c b/drivers/mfd/exynos-lpass.c index 17915daa2e80..44d8ea1a978b 100644 --- a/drivers/mfd/exynos-lpass.c +++ b/drivers/mfd/exynos-lpass.c @@ -14,6 +14,7 @@ * only version 2 as published by the Free Software Foundation. */ +#include #include #include #include @@ -52,6 +53,7 @@ struct exynos_lpass { /* pointer to the LPASS TOP regmap */ struct regmap *top; + struct clk *sfr0_clk; }; static void exynos_lpass_core_sw_reset(struct exynos_lpass *lpass, int mask) @@ -71,6 +73,8 @@ static void exynos_lpass_core_sw_reset(struct exynos_lpass *lpass, int mask) static void exynos_lpass_enable(struct exynos_lpass *lpass) { + clk_prepare_enable(lpass->sfr0_clk); + /* Unmask SFR, DMA and I2S interrupt */ regmap_write(lpass->top, SFR_LPASS_INTR_CA5_MASK, LPASS_INTR_SFR | LPASS_INTR_DMA | LPASS_INTR_I2S); @@ -88,6 +92,8 @@ static void exynos_lpass_disable(struct exynos_lpass *lpass) /* Mask any unmasked IP interrupt sources */ regmap_write(lpass->top, SFR_LPASS_INTR_CPU_MASK, 0); regmap_write(lpass->top, SFR_LPASS_INTR_CA5_MASK, 0); + + clk_disable_unprepare(lpass->sfr0_clk); } static const struct regmap_config exynos_lpass_reg_conf = { @@ -114,6 +120,10 @@ static int exynos_lpass_probe(struct platform_device *pdev) if (IS_ERR(base_top)) return PTR_ERR(base_top); + lpass->sfr0_clk = clk_get(dev, "sfr0_ctrl"); + if (IS_ERR(lpass->sfr0_clk)) + return PTR_ERR(lpass->sfr0_clk); + lpass->top = regmap_init_mmio(dev, base_top, &exynos_lpass_reg_conf); if (IS_ERR(lpass->top)) { From patchwork Wed Jan 25 11:50:31 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 92434 Delivered-To: patch@linaro.org Received: by 10.140.20.99 with SMTP id 90csp2170466qgi; Wed, 25 Jan 2017 03:52:12 -0800 (PST) X-Received: by 10.99.171.5 with SMTP id p5mr46595320pgf.182.1485345131945; Wed, 25 Jan 2017 03:52:11 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d31si1330171pld.20.2017.01.25.03.52.11; Wed, 25 Jan 2017 03:52:11 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-samsung-soc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-samsung-soc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-samsung-soc-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752044AbdAYLwI (ORCPT + 4 others); Wed, 25 Jan 2017 06:52:08 -0500 Received: from mailout2.w1.samsung.com ([210.118.77.12]:57470 "EHLO mailout2.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751653AbdAYLvL (ORCPT ); Wed, 25 Jan 2017 06:51:11 -0500 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 <0OKC00EDH3L6G110@mailout2.w1.samsung.com>; Wed, 25 Jan 2017 11:51:06 +0000 (GMT) Received: from eusmges4.samsung.com (unknown [203.254.199.244]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20170125115105eucas1p24527de8e3191c4db03d13b430b8cb6af~dAXey2eWK1534915349eucas1p2o; Wed, 25 Jan 2017 11:51:05 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges4.samsung.com (EUCPMTA) with SMTP id 02.9B.28517.92198885; Wed, 25 Jan 2017 11:51:05 +0000 (GMT) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20170125115105eucas1p1e7191cf0be871c254dd09477ca7f9e1a~dAXeKO93T1025310253eucas1p1l; Wed, 25 Jan 2017 11:51:05 +0000 (GMT) X-AuditID: cbfec7f4-f79716d000006f65-bd-588891299355 Received: from eusync3.samsung.com ( [203.254.199.213]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id AF.1F.06687.86198885; Wed, 25 Jan 2017 11:52:08 +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 <0OKC00H7J3KW4970@eusync3.samsung.com>; Wed, 25 Jan 2017 11:51:04 +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 Cc: Marek Szyprowski , Sylwester Nawrocki , Krzysztof Kozlowski , Linus Walleij , Tomasz Figa , Lee Jones , Bartlomiej Zolnierkiewicz Subject: [PATCH 7/7] mfd: exynos-lpass: Add runtime PM support Date: Wed, 25 Jan 2017 12:50:31 +0100 Message-id: <1485345031-2948-8-git-send-email-m.szyprowski@samsung.com> X-Mailer: git-send-email 1.9.1 In-reply-to: <1485345031-2948-1-git-send-email-m.szyprowski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrAIsWRmVeSWpSXmKPExsWy7djP87qaEzsiDKa9l7bYOGM9q8X58xvY Le5/PcpoMeXPciaLTY+vsVpsnv+H0eLyrjlsFjPO72OyWHvkLrvF4TftrBardv1hdOD22Dnr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/YxpjwQOeioWv3RoYX3N1MXJy SAiYSPSsX8gCYYtJXLi3nq2LkYtDSGAJo8SL+W1QThOTxPRXx8Cq2AQMJbredoElRATaGSVe 377GBOIwC2xhkujadJG9i5GDQ1jATmLSs3qQBhYBVYn7K1axgdi8Au4SvTsfM0Ksk5M4eWwy K0g5p4CHxJE3JiBhIaCSOc29zBMYeRcwMqxiFEktLc5Nzy021CtOzC0uzUvXS87P3cQIDP1t x35u3sF4aWPwIUYBDkYlHt4JSe0RQqyJZcWVuYcYJTiYlUR4HVo6IoR4UxIrq1KL8uOLSnNS iw8xmgLdNJFZSjQ5HxiXeSXxhiaG5paGRsYWFuZGRkrivCUfroQLCaQnlqRmp6YWpBbB9DFx cEo1MLJOzs8XOnW+JdpYUkel4ad2A0fFmcdxiQ9bBLZujU3mXdWoILNGpMk4Tkj9zdMrersZ 9q1Lz5l27dmdH8oTW5aYxevavl4xcbH41/wjbz2nuKmdD3t7Quvj1A1znjH/cIyfu1Hk71tJ gd0Mero2Lttu6SoeS/nv/lDr2MT18y9d8J980iNm5VQlluKMREMt5qLiRACNwc71kwIAAA== X-MTR: 20000000000000000@CPGS X-CMS-MailID: 20170125115105eucas1p1e7191cf0be871c254dd09477ca7f9e1a 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: 20170125115105eucas1p1e7191cf0be871c254dd09477ca7f9e1a X-RootMTR: 20170125115105eucas1p1e7191cf0be871c254dd09477ca7f9e1a References: <1485345031-2948-1-git-send-email-m.szyprowski@samsung.com> Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org Convert exisitng lpass-suspend/resume callbacks into runtime PM callbacks. This way Exynos LPASS driver will be ready for use with power domains enabled. LPASS will be runtime resumed/suspended as a result of its child devices runtime PM transitions. Signed-off-by: Marek Szyprowski --- drivers/mfd/exynos-lpass.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Acked-by: Krzysztof Kozlowski diff --git a/drivers/mfd/exynos-lpass.c b/drivers/mfd/exynos-lpass.c index 44d8ea1a978b..d383b2f6f207 100644 --- a/drivers/mfd/exynos-lpass.c +++ b/drivers/mfd/exynos-lpass.c @@ -22,6 +22,7 @@ #include #include #include +#include #include #include @@ -132,6 +133,8 @@ static int exynos_lpass_probe(struct platform_device *pdev) } platform_set_drvdata(pdev, lpass); + pm_runtime_set_active(dev); + pm_runtime_enable(dev); exynos_lpass_enable(lpass); return of_platform_populate(dev->of_node, NULL, NULL, dev); @@ -155,8 +158,11 @@ static int __maybe_unused exynos_lpass_resume(struct device *dev) return 0; } -static SIMPLE_DEV_PM_OPS(lpass_pm_ops, exynos_lpass_suspend, - exynos_lpass_resume); +static const struct dev_pm_ops lpass_pm_ops = { + SET_RUNTIME_PM_OPS(exynos_lpass_suspend, exynos_lpass_resume, NULL) + SET_LATE_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, + pm_runtime_force_resume) +}; static const struct of_device_id exynos_lpass_of_match[] = { { .compatible = "samsung,exynos5433-lpass" },