From patchwork Thu Jan 26 08:33:47 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 92489 Delivered-To: patch@linaro.org Received: by 10.140.20.99 with SMTP id 90csp79295qgi; Thu, 26 Jan 2017 00:34:14 -0800 (PST) X-Received: by 10.84.191.129 with SMTP id a1mr2470092pld.62.1485419654342; Thu, 26 Jan 2017 00:34:14 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h82si765007pfj.218.2017.01.26.00.34.14; Thu, 26 Jan 2017 00:34: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 S1752985AbdAZIeK (ORCPT + 4 others); Thu, 26 Jan 2017 03:34:10 -0500 Received: from mailout4.w1.samsung.com ([210.118.77.14]:43161 "EHLO mailout4.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752893AbdAZIeG (ORCPT ); Thu, 26 Jan 2017 03:34: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 <0OKD006FLP4QVH50@mailout4.w1.samsung.com>; Thu, 26 Jan 2017 08:34:02 +0000 (GMT) Received: from eusmges5.samsung.com (unknown [203.254.199.245]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20170126083402eucas1p2172a80ad010df10b50fb3d36d3c5bbb2~dRUthld793153831538eucas1p2p; Thu, 26 Jan 2017 08:34:02 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges5.samsung.com (EUCPMTA) with SMTP id 89.BC.17477.974B9885; Thu, 26 Jan 2017 08:34:01 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20170126083401eucas1p24b0f04c62332e0b6e446ecca83145bc5~dRUs5cE_q3025830258eucas1p2P; Thu, 26 Jan 2017 08:34:01 +0000 (GMT) X-AuditID: cbfec7f5-f79d06d000004445-e0-5889b479ba33 Received: from eusync1.samsung.com ( [203.254.199.211]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id 91.53.10233.674B9885; Thu, 26 Jan 2017 08:33:58 +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 <0OKD000KKP4KMO50@eusync1.samsung.com>; Thu, 26 Jan 2017 08:34:01 +0000 (GMT) From: Marek Szyprowski To: linux-gpio@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, devicetree@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 v2 1/8] soc: samsung: pmu: Add dummy support for Exynos5433 SoC Date: Thu, 26 Jan 2017 09:33:47 +0100 Message-id: <1485419634-28331-2-git-send-email-m.szyprowski@samsung.com> X-Mailer: git-send-email 1.9.1 In-reply-to: <1485419634-28331-1-git-send-email-m.szyprowski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrBIsWRmVeSWpSXmKPExsWy7djPc7qVWzojDHasN7fYOGM9q8X8I+dY Lc6f38Bucf/rUUaLKX+WM1lsenyN1WLz/D+MFpd3zWGzmHF+H5PF2iN32S0Ov2lntVi16w+j A4/Hzll32T02repk87hzbQ+bx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OsELaYxIV769m6GLk4hASWMEr0bn/KBOE0MUn07lzCBFLFJmAo0fW2 C6xKRGApo8T/lZ/ZQRxmgS1MEl2bLrKDVAkL+EtMffserINFQFVi5vVZYHFeAQ+Jw3d/sEHs k5M4eWwy2G5OAU+J009fgdUIAdVsuriQfQIj7wJGhlWMIqmlxbnpucVGesWJucWleel6yfm5 mxiBsbDt2M8tOxi73gUfYhTgYFTi4c3Y1hEhxJpYVlyZe4hRgoNZSYT3/OrOCCHelMTKqtSi /Pii0pzU4kOMpkBHTWSWEk3OB8ZpXkm8oYmhuaWhkbGFhbmRkZI479QPV8KFBNITS1KzU1ML Uotg+pg4OKUaGI/sn/1fq74yfcffcP6vdpnFS6NCL97cNzWz+6nspktTNI+0McUwXLrrqHH+ CcfpeYmL5mVuf710Vcr01coCe72C76q5zUlhDNRaKdNySdP++MG981ZejHGOuV2Ykv5grqBV yNTubT39t+09dr8TlTDhvMrL3vLTXuBQdAdLl8av1G61aUeKmJVYijMSDbWYi4oTAW8ClQ6b AgAA X-MTR: 20000000000000000@CPGS X-CMS-MailID: 20170126083401eucas1p24b0f04c62332e0b6e446ecca83145bc5 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: 20170126083401eucas1p24b0f04c62332e0b6e446ecca83145bc5 X-RootMTR: 20170126083401eucas1p24b0f04c62332e0b6e446ecca83145bc5 References: <1485419634-28331-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 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 | 6 ++++-- 1 file changed, 4 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 diff --git a/drivers/soc/samsung/exynos-pmu.c b/drivers/soc/samsung/exynos-pmu.c index 813df6e7292d..56d9244ff981 100644 --- a/drivers/soc/samsung/exynos-pmu.c +++ b/drivers/soc/samsung/exynos-pmu.c @@ -44,7 +44,7 @@ void exynos_sys_powerdown_conf(enum sys_powerdown mode) unsigned int i; const struct exynos_pmu_data *pmu_data; - if (!pmu_context) + if (!pmu_context || !pmu_context->pmu_data) return; pmu_data = pmu_context->pmu_data; @@ -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 Thu Jan 26 08:33:48 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 92490 Delivered-To: patch@linaro.org Received: by 10.140.20.99 with SMTP id 90csp79434qgi; Thu, 26 Jan 2017 00:34:42 -0800 (PST) X-Received: by 10.98.93.152 with SMTP id n24mr1772371pfj.107.1485419682165; Thu, 26 Jan 2017 00:34:42 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x26si25863883pge.197.2017.01.26.00.34.41; Thu, 26 Jan 2017 00:34:42 -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 S1753062AbdAZIeQ (ORCPT + 25 others); Thu, 26 Jan 2017 03:34:16 -0500 Received: from mailout2.w1.samsung.com ([210.118.77.12]:30686 "EHLO mailout2.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752894AbdAZIeG (ORCPT ); Thu, 26 Jan 2017 03:34:06 -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 <0OKD006CUP4R4M50@mailout2.w1.samsung.com>; Thu, 26 Jan 2017 08:34:03 +0000 (GMT) Received: from eusmges3.samsung.com (unknown [203.254.199.242]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20170126083402eucas1p19fffb82a70c8ed7534bc34f6ba3dc16f~dRUuA9qQ_2231922319eucas1p16; Thu, 26 Jan 2017 08:34:02 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges3.samsung.com (EUCPMTA) with SMTP id 45.30.09557.A74B9885; Thu, 26 Jan 2017 08:34:02 +0000 (GMT) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20170126083401eucas1p289b69e3694b91e83983cd6e09aa7053c~dRUtMsj463144931449eucas1p2Z; Thu, 26 Jan 2017 08:34:01 +0000 (GMT) X-AuditID: cbfec7f2-f790f6d000002555-0d-5889b47afd97 Received: from eusync1.samsung.com ( [203.254.199.211]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id F5.34.06687.9B4B9885; Thu, 26 Jan 2017 08:35:05 +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 <0OKD000KKP4KMO50@eusync1.samsung.com>; Thu, 26 Jan 2017 08:34:01 +0000 (GMT) From: Marek Szyprowski To: linux-gpio@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, devicetree@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 v2 2/8] pinctrl: samsung: Ensure that pad retention is disabled on driver init Date: Thu, 26 Jan 2017 09:33:48 +0100 Message-id: <1485419634-28331-3-git-send-email-m.szyprowski@samsung.com> X-Mailer: git-send-email 1.9.1 In-reply-to: <1485419634-28331-1-git-send-email-m.szyprowski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrCIsWRmVeSWpSXmKPExsWy7djP87pVWzojDK58l7LYOGM9q8X8I+dY Lc6f38Bucf/rUUaLKX+WM1lsenyN1WLz/D+MFpd3zWGzmHF+H5PF2iN32S0Ov2lntVi16w+j A4/Hzll32T02repk87hzbQ+bx+Yl9R59W1YxenzeJBfAFsVlk5Kak1mWWqRvl8CV0bIso+Ar V8Xp07UNjDM5uxg5OSQETCQa3x9lhbDFJC7cW8/WxcjFISSwlFHi8fkmJpCEkMBnRontK6ph Gk6dXwhVtIxR4u78CcwQTgOTRO+F28wgVWwChhJdb7vAqkRARh1d1gnmMAtsYpJoW3ICrEpY IEGipe070HIODhYBVYnjjXwgYV4BD4nXxydB3SQncfLYZDCbU8BT4vTTV+wgcyQE5rFL7D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b+6M0KINyWxsiq1KD++ qDQntfgQoynQTROZpUST84ERmlcSb2hiaG5paGRsYWFuZKQkzlvy4Uq4kEB6YklqdmpqQWoR TB8TB6dUA2NCA3//7Cq+w7afp+SssH997H1563bGHU8y9zj/rjNhFUnda9D71u9D8Lzo/4lK 06YrZxbO0jRbns54ISj3wMFeXq2dLKoXjs29tdtu1svPASJFDmf1jVl+HopUKJyv+sld/15R +YGkjdLH3r/88kHS57QGW8mmNw0cGz+fi//pZH0lxclv5iMlluKMREMt5qLiRACw4liBmAIA AA== X-MTR: 20000000000000000@CPGS X-CMS-MailID: 20170126083401eucas1p289b69e3694b91e83983cd6e09aa7053c 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: 20170126083401eucas1p289b69e3694b91e83983cd6e09aa7053c X-RootMTR: 20170126083401eucas1p289b69e3694b91e83983cd6e09aa7053c References: <1485419634-28331-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 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 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 Thu Jan 26 08:33:49 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 92496 Delivered-To: patch@linaro.org Received: by 10.140.20.99 with SMTP id 90csp80016qgi; Thu, 26 Jan 2017 00:36:43 -0800 (PST) X-Received: by 10.98.102.196 with SMTP id s65mr1772907pfj.137.1485419803216; Thu, 26 Jan 2017 00:36:43 -0800 (PST) Return-Path: Received: from bombadil.infradead.org (bombadil.infradead.org. [65.50.211.133]) by mx.google.com with ESMTPS id f22si794582plk.179.2017.01.26.00.36.43 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 26 Jan 2017 00:36:43 -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 1cWfXs-0000Jp-Jf; Thu, 26 Jan 2017 08:36:40 +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 1cWfVl-00061W-Dk for linux-arm-kernel@lists.infradead.org; Thu, 26 Jan 2017 08:34:31 +0000 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 <0OKD008AZP4RHX50@mailout4.w1.samsung.com> for linux-arm-kernel@lists.infradead.org; Thu, 26 Jan 2017 08:34:03 +0000 (GMT) Received: from eusmges5.samsung.com (unknown [203.254.199.245]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20170126083403eucas1p2f1c0c3af58b92189c919189131504861~dRUuifW040055900559eucas1p2v; Thu, 26 Jan 2017 08:34:03 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges5.samsung.com (EUCPMTA) with SMTP id 8A.BC.17477.A74B9885; Thu, 26 Jan 2017 08:34:02 +0000 (GMT) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20170126083402eucas1p187d3d31f62544fc46fae99fc5f74dbfe~dRUt6ouOa2231722317eucas1p16; Thu, 26 Jan 2017 08:34:02 +0000 (GMT) X-AuditID: cbfec7f5-f79d06d000004445-e4-5889b47a3594 Received: from eusync1.samsung.com ( [203.254.199.211]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id 47.34.06687.AB4B9885; Thu, 26 Jan 2017 08:35:06 +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 <0OKD000KKP4KMO50@eusync1.samsung.com>; Thu, 26 Jan 2017 08:34:02 +0000 (GMT) From: Marek Szyprowski To: linux-gpio@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 3/8] pinctrl: samsung: Add support for pad retention control for Exynos5433 SoCs Date: Thu, 26 Jan 2017 09:33:49 +0100 Message-id: <1485419634-28331-4-git-send-email-m.szyprowski@samsung.com> X-Mailer: git-send-email 1.9.1 In-reply-to: <1485419634-28331-1-git-send-email-m.szyprowski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrBIsWRmVeSWpSXmKPExsWy7djPc7pVWzojDH79tbHYOGM9q8X8I+dY Lc6f38Bucf/rUUaLKX+WM1lsenyN1WLz/D+MFpd3zWGzmHF+H5PF2iN32S0Ov2lntVi16w+j A4/Hzll32T02repk87hzbQ+bx+Yl9R59W1YxenzeJBfAFsVlk5Kak1mWWqRvl8CV0TDtJHPB JZuKC6dOsDQwfjDuYuTkkBAwkfjQ3cIGYYtJXLi3Hsjm4hASWMooMbPjIAuE85lRonXfN2aY jkUPpzFCJJYxStzZsQyqpYFJomvdOhaQKjYBQ4mut11gCRGQWUeXdYI5zAKbmCTalpwAmyUs kCrx7fNXMJtFQFXi66smVhCbV8BDYtqcS+wQ++QkTh6bDBbnFPCUOP30FTvIIAmBRewSa7v7 mboYOYAcWYlNB6Duc5H4fW8HI4QtLPHq+BaoOTISnR0HmSDsfkaJplZtCHsGo8S5t7wQtrXE 4eMXwXYxC/BJTNo2nRliPK9ER5sQRImHxOH9r1ghbEeJpnsToUExh1Hi8qR5bBMYZRYwMqxi FEktLc5NTy021StOzC0uzUvXS87P3cQIjP/T/45/3cG49JjVIUYBDkYlHt4DOzoihFgTy4or cw8xSnAwK4nwnl/dGSHEm5JYWZValB9fVJqTWnyIUZqDRUmcd8+CK+FCAumJJanZqakFqUUw WSYOTqkGRuPXm5ef1jxgPaWkTm3KvO9qMm2rZ7x73t7y4oJ1wxefBXKLrfZdXRgxo2F9Sor4 a4dJvy103b6umNKpkGWt0vLsfNXTcvbwN+y/PTSfH/4R8yDF/LW+mWF/u8Jn8zrdBrnzjsrm kTULrPmNKo84P254ZupQY3UxRuAf31leO1cH038XNn47qsRSnJFoqMVcVJwIAGdBr8f7AgAA X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFmpjkeLIzCtJLcpLzFFi42I5/e/4Zd1dWzojDOa3CVpsnLGe1WL+kXOs FufPb2C3uP/1KKPFlD/LmSw2Pb7GarF5/h9Gi8u75rBZzDi/j8li7ZG77BaH37SzWqza9YfR gcdj56y77B6bVnWyedy5tofNY/OSeo++LasYPT5vkgtgi3KzyUhNTEktUkjNS85PycxLt1UK DXHTtVBSyEvMTbVVitD1DQlSUihLzCkF8owM0ICDc4B7sJK+XYJbRsO0k8wFl2wqLpw6wdLA +MG4i5GTQ0LARGLRw2mMELaYxIV769m6GLk4hASWMEocv7qEBSQhJNDEJPF6ngOIzSZgKNH1 tgusSERgKaPE/5Wf2UEcZoEtTBJdmy4CORwcwgKpEjP+S4A0sAioSnx91cQKYvMKeEhMm3OJ HWKbnMTJY5PB4pwCnhKnn75ih1jmIbHp4kL2CYy8CxgZVjGKpJYW56bnFhvqFSfmFpfmpesl 5+duYgTGwbZjPzfvYLy0MfgQowAHoxIP74EdHRFCrIllxZW5hxglOJiVRHjPr+6MEOJNSays Si3Kjy8qzUktPsRoCnTURGYp0eR8YIzmlcQbmhiaWxoaGVtYmBsZKYnzlny4Ei4kkJ5Ykpqd mlqQWgTTx8TBKdXAOLFHQVC80SPjaj3jg90v3Fk3hGwx46y2O7162ayUZt//POfNbm979ITL L36/HvO/cKv5lXOXsl7YPZdB7+Ihx72aX9flPK848iyrk19obZv0zh+J5r05qRm6y7fwHzob emcCa3fruqh7H/bs/3kx59hdxvXtZl7cq9bdNVG6cmF39/UfGbK5c5VYijMSDbWYi4oTAX2e eRiZAgAA X-MTR: 20000000000000000@CPGS X-CMS-MailID: 20170126083402eucas1p187d3d31f62544fc46fae99fc5f74dbfe 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: 20170126083402eucas1p187d3d31f62544fc46fae99fc5f74dbfe X-RootMTR: 20170126083402eucas1p187d3d31f62544fc46fae99fc5f74dbfe References: <1485419634-28331-1-git-send-email-m.szyprowski@samsung.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170126_003429_653369_7F360DF3 X-CRM114-Status: GOOD ( 14.42 ) 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 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 | 16 ++++++++ 2 files changed, 74 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 fa3802970570..7b0e6cc35e04 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 = EXYNOS_WAKEUP_FROM_LOWPWR, + .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 = EXYNOS_WAKEUP_FROM_LOWPWR, + .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 = EXYNOS_WAKEUP_FROM_LOWPWR, + .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..86f24b633e11 100644 --- a/include/linux/soc/samsung/exynos-regs-pmu.h +++ b/include/linux/soc/samsung/exynos-regs-pmu.h @@ -690,4 +690,20 @@ | 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) + #endif /* __LINUX_SOC_EXYNOS_REGS_PMU_H */ From patchwork Thu Jan 26 08:33:50 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 92495 Delivered-To: patch@linaro.org Received: by 10.140.20.99 with SMTP id 90csp79909qgi; Thu, 26 Jan 2017 00:36:17 -0800 (PST) X-Received: by 10.99.4.71 with SMTP id 68mr1716380pge.77.1485419777300; Thu, 26 Jan 2017 00:36:17 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z1si807945plb.63.2017.01.26.00.36.17; Thu, 26 Jan 2017 00:36:17 -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 S1753105AbdAZIgP (ORCPT + 4 others); Thu, 26 Jan 2017 03:36:15 -0500 Received: from mailout2.w1.samsung.com ([210.118.77.12]:30686 "EHLO mailout2.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752912AbdAZIeI (ORCPT ); Thu, 26 Jan 2017 03:34:08 -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 <0OKD007AEP4SDU50@mailout2.w1.samsung.com>; Thu, 26 Jan 2017 08:34:04 +0000 (GMT) Received: from eusmges4.samsung.com (unknown [203.254.199.244]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20170126083403eucas1p18098b0af95b044224e319cf274e10d20~dRUvGt2vZ2039320393eucas1p11; Thu, 26 Jan 2017 08:34:03 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges4.samsung.com (EUCPMTA) with SMTP id E8.E7.28517.B74B9885; Thu, 26 Jan 2017 08:34:03 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20170126083403eucas1p1ad75fe027047dc240b9afd651c7713a5~dRUuZvdnA0491404914eucas1p1B; Thu, 26 Jan 2017 08:34:03 +0000 (GMT) X-AuditID: cbfec7f4-f79716d000006f65-50-5889b47bb766 Received: from eusync1.samsung.com ( [203.254.199.211]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id D2.53.10233.874B9885; Thu, 26 Jan 2017 08:34:00 +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 <0OKD000KKP4KMO50@eusync1.samsung.com>; Thu, 26 Jan 2017 08:34:02 +0000 (GMT) From: Marek Szyprowski To: linux-gpio@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, devicetree@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 v2 4/8] arm64: dts: exynos: Add clocks to Exynos5433 LPASS module Date: Thu, 26 Jan 2017 09:33:50 +0100 Message-id: <1485419634-28331-5-git-send-email-m.szyprowski@samsung.com> X-Mailer: git-send-email 1.9.1 In-reply-to: <1485419634-28331-1-git-send-email-m.szyprowski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrGIsWRmVeSWpSXmKPExsWy7djP87rVWzojDM6+VrHYOGM9q8X8I+dY Lc6f38Bucf/rUUaLKX+WM1lsenyN1WLz/D+MFpd3zWGzmHF+H5PF2iN32S0Ov2lntVi16w+j A4/Hzll32T02repk87hzbQ+bx+Yl9R59W1YxenzeJBfAFsVlk5Kak1mWWqRvl8CVsf75VuaC vWwV2788ZWtg3MPaxcjJISFgIrH67WxGCFtM4sK99WxdjFwcQgJLGSWazsxhgXA+M0rs+fUN ruPKjFvMILaQwDJGiQfbhCGKGpgkutatYwFJsAkYSnS97QIbJQIy6uiyTjCHWWATk0TbkhNg 7cICwRI7J08AG8sioCoxoW82E4jNK+Ah8WrBVjaIdXISJ49NBqvhFPCUOP30FTvIIAmBRewS M/9uBlrHAeTISmw6wAxhukhceKcD0Sos8er4FnYIW0bi8uRuFgi7H+i3Vm0IewajxLm3vBC2 tcTh4xfBVjEL8ElM2jYdaiSvREebEESJh8SSN/uhLnOUmNW9mR3i+TmMEnOn7mabwCizgJFh FaNIamlxbnpqsYlecWJucWleul5yfu4mRmDsn/53/MsOxsXHrA4xCnAwKvHwHtjRESHEmlhW XJl7iFGCg1lJhPf86s4IId6UxMqq1KL8+KLSnNTiQ4zSHCxK4rx7FlwJFxJITyxJzU5NLUgt gskycXBKNTCunXQr66JoyqwSBaV71a/jn/AfapjE3+Xz9NhR21WfNk02Ovv+69vmTSq38y4v k5RcKt1arZXKa1LOLaKkdmFGoZW1pc0G2XKhteX7brlty7KudC8Pa9jD2++9c0Ea++J23peK navfKt29dNB3zmNWi+LtM3gPml+4X7yV59CbXwfiwlXtNWYrsRRnJBpqMRcVJwIARiV72vkC AAA= X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFmpnkeLIzCtJLcpLzFFi42I5/e/4Zd2KLZ0RBufWS1hsnLGe1WL+kXOs FufPb2C3uP/1KKPFlD/LmSw2Pb7GarF5/h9Gi8u75rBZzDi/j8li7ZG77BaH37SzWqza9YfR gcdj56y77B6bVnWyedy5tofNY/OSeo++LasYPT5vkgtgi3KzyUhNTEktUkjNS85PycxLt1UK DXHTtVBSyEvMTbVVitD1DQlSUihLzCkF8owM0ICDc4B7sJK+XYJbxvrnW5kL9rJVbP/ylK2B cQ9rFyMnh4SAicSVGbeYIWwxiQv31rN1MXJxCAksYZR4cGA7I0hCSKCJSeL1PAcQm03AUKLr bRdYkYjAUkaJ/ys/s4M4zAJbmCS6Nl1kB6kSFgiW2Dl5AtgKFgFViQl9s5lAbF4BD4lXC7ay QayTkzh5bDJYDaeAp8Tpp6/YIbZ5SGy6uJB9AiPvAkaGVYwiqaXFuem5xUZ6xYm5xaV56XrJ +bmbGIGRsO3Yzy07GLveBR9iFOBgVOLhzdjWESHEmlhWXJl7iFGCg1lJhPf86s4IId6UxMqq 1KL8+KLSnNTiQ4ymQEdNZJYSTc4HRmleSbyhiaG5paGRsYWFuZGRkjjv1A9XwoUE0hNLUrNT UwtSi2D6mDg4pRoYzydtefCnPn7rQwHlQC3595Lp+18vFV3ful5qZnRlwikFr4tvdm05Lj/1 v3VptULrmbcvom6Z/PmUWL7wv/ijvLkTpWr2r+E4uzL1Lt/0YOugvIk+f38+O/kzz3NP2oVX ce+/Bsc/57X521gxmfFUi0FkmbDK7UvZyQtOPKi8V31+8vo7TxUSe5RYijMSDbWYi4oTAbZ3 ghGaAgAA X-MTR: 20000000000000000@CPGS X-CMS-MailID: 20170126083403eucas1p1ad75fe027047dc240b9afd651c7713a5 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: 20170126083403eucas1p1ad75fe027047dc240b9afd651c7713a5 X-RootMTR: 20170126083403eucas1p1ad75fe027047dc240b9afd651c7713a5 References: <1485419634-28331-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 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 -- 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/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 Thu Jan 26 08:33:51 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 92493 Delivered-To: patch@linaro.org Received: by 10.140.20.99 with SMTP id 90csp79703qgi; Thu, 26 Jan 2017 00:35:35 -0800 (PST) X-Received: by 10.99.147.81 with SMTP id w17mr1699930pgm.111.1485419735655; Thu, 26 Jan 2017 00:35:35 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b28si792396pfk.134.2017.01.26.00.35.35; Thu, 26 Jan 2017 00:35:35 -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 S1753174AbdAZIf1 (ORCPT + 4 others); Thu, 26 Jan 2017 03:35:27 -0500 Received: from mailout4.w1.samsung.com ([210.118.77.14]:43161 "EHLO mailout4.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752950AbdAZIeJ (ORCPT ); Thu, 26 Jan 2017 03:34:09 -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 <0OKD008B1P4SHX50@mailout4.w1.samsung.com>; Thu, 26 Jan 2017 08:34:04 +0000 (GMT) Received: from eusmges5.samsung.com (unknown [203.254.199.245]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20170126083404eucas1p2095c33bfcd1ff92c9cb1b2fe1c6b265a~dRUvd5x0O0139801398eucas1p2F; Thu, 26 Jan 2017 08:34:04 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges5.samsung.com (EUCPMTA) with SMTP id 9B.BC.17477.B74B9885; Thu, 26 Jan 2017 08:34:03 +0000 (GMT) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20170126083403eucas1p2328ed884334b453ffb1faac3c745cec3~dRUutKHjt0057100571eucas1p21; Thu, 26 Jan 2017 08:34:03 +0000 (GMT) X-AuditID: cbfec7f5-f79d06d000004445-e8-5889b47b50ae Received: from eusync1.samsung.com ( [203.254.199.211]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id 18.34.06687.BB4B9885; Thu, 26 Jan 2017 08:35:07 +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 <0OKD000KKP4KMO50@eusync1.samsung.com>; Thu, 26 Jan 2017 08:34:03 +0000 (GMT) From: Marek Szyprowski To: linux-gpio@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, devicetree@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 v2 5/8] mfd: exynos-lpass: Remove pad retention control Date: Thu, 26 Jan 2017 09:33:51 +0100 Message-id: <1485419634-28331-6-git-send-email-m.szyprowski@samsung.com> X-Mailer: git-send-email 1.9.1 In-reply-to: <1485419634-28331-1-git-send-email-m.szyprowski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrGIsWRmVeSWpSXmKPExsWy7djPc7rVWzojDE49sbHYOGM9q8X8I+dY Lc6f38Bucf/rUUaLKX+WM1lsenyN1WLz/D+MFpd3zWGzmHF+H5PF2iN32S0Ov2lntVi16w+j A4/Hzll32T02repk87hzbQ+bx+Yl9R59W1YxenzeJBfAFsVlk5Kak1mWWqRvl8CVcXTNf9aC C/IVj37MZG9gPCzVxcjJISFgInG38wg7hC0mceHeejYQW0hgKaPEk91VXYxcQPZnRom73w4z wjTMmbqVGSKxjFFiYvcGRgingUni99eLYO1sAoYSXW+72EASIiCjji7rBHOYBTYxSbQtOcEM UiUs4C5xb/l2sA4WAVWJ1cd7WUFsXgEPiVmXe6GOkpM4eWwyWJxTwFPi9NNX7CCDJAQWsUss XrsYKMEB5MhKbDrADFHvIrFs5gSoXmGJV8e3QNkyEp0dB5kg7H5GiaZWbQh7BqPEube8ELa1 xOHjF8F2MQvwSUzaNp0ZYjyvREebEESJh0TD0q9QIx0l7tw7wA4JrzmMEqe3BE9glFnAyLCK USS1tDg3PbXYVK84Mb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InkaFy29/p5bd5J86KtzO1v534Ml8wTaXx+lTOr1856xIUFZR070d8kJcVuTHL+tO+iXMb 3Ow9Lrjv3Xvy2OozeQHxa1Lld+eezZqhfvjDf5V/TnPXPn/mf6xIiaU4I9FQi7moOBEA3FmZ MpsCAAA= X-MTR: 20000000000000000@CPGS X-CMS-MailID: 20170126083403eucas1p2328ed884334b453ffb1faac3c745cec3 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: 20170126083403eucas1p2328ed884334b453ffb1faac3c745cec3 X-RootMTR: 20170126083403eucas1p2328ed884334b453ffb1faac3c745cec3 References: <1485419634-28331-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 Acked-by: Krzysztof Kozlowski --- .../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 Acked-by: Sylwester Nawrocki 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 Thu Jan 26 08:33:52 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 92491 Delivered-To: patch@linaro.org Received: by 10.140.20.99 with SMTP id 90csp79440qgi; Thu, 26 Jan 2017 00:34:42 -0800 (PST) X-Received: by 10.84.200.200 with SMTP id u8mr2447840plh.98.1485419682876; Thu, 26 Jan 2017 00:34:42 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x26si25863883pge.197.2017.01.26.00.34.42; Thu, 26 Jan 2017 00:34:42 -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 S1752893AbdAZIeO (ORCPT + 4 others); Thu, 26 Jan 2017 03:34:14 -0500 Received: from mailout1.w1.samsung.com ([210.118.77.11]:23346 "EHLO mailout1.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752900AbdAZIeH (ORCPT ); Thu, 26 Jan 2017 03:34: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 <0OKD005ENP4TSJ50@mailout1.w1.samsung.com>; Thu, 26 Jan 2017 08:34:05 +0000 (GMT) Received: from eusmges2.samsung.com (unknown [203.254.199.241]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20170126083405eucas1p115c54f37b5d2eddfa636e9c52c598e83~dRUwU9il02038520385eucas1p16; Thu, 26 Jan 2017 08:34:05 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges2.samsung.com (EUCPMTA) with SMTP id A9.3E.30614.C74B9885; Thu, 26 Jan 2017 08:34:04 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20170126083404eucas1p132ce7a0792505367f6a001f21e9d1632~dRUvZw4xp2038920389eucas1p1_; Thu, 26 Jan 2017 08:34:04 +0000 (GMT) X-AuditID: cbfec7f1-f793f6d000007796-50-5889b47c85c8 Received: from eusync1.samsung.com ( [203.254.199.211]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id A3.53.10233.974B9885; Thu, 26 Jan 2017 08:34:01 +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 <0OKD000KKP4KMO50@eusync1.samsung.com>; Thu, 26 Jan 2017 08:34:03 +0000 (GMT) From: Marek Szyprowski To: linux-gpio@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, devicetree@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 v2 6/8] mfd: exynos-lpass: Add support for clocks Date: Thu, 26 Jan 2017 09:33:52 +0100 Message-id: <1485419634-28331-7-git-send-email-m.szyprowski@samsung.com> X-Mailer: git-send-email 1.9.1 In-reply-to: <1485419634-28331-1-git-send-email-m.szyprowski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrKIsWRmVeSWpSXmKPExsWy7djP87o1WzojDJp/mltsnLGe1WL+kXOs FufPb2C3uP/1KKPFlD/LmSw2Pb7GarF5/h9Gi8u75rBZzDi/j8li7ZG77BaH37SzWqza9YfR gcdj56y77B6bVnWyedy5tofNY/OSeo++LasYPT5vkgtgi+KySUnNySxLLdK3S+DK6N+zialg ukzFiSU/mBoYp4h3MXJySAiYSPz//osRwhaTuHBvPVsXIxeHkMBSRomW3dPZIZzPjBKtt94w w3SsndDECpFYxiixa/NMZgingUni99eLbCBVbAKGEl1vu8BmiYDMOrqsE8xhFtjEJNG25ATY LGEBR4mH+7eB2SwCqhIX2npYQWxeAQ+J5tvLWCH2yUmcPDYZzOYU8JQ4/fQVO0R8HrtE9369 LkYOIFtWYtMBqPNcJP7OXMICYQtLvDq+BapcRuLy5G6oeD+jRFOrNoQ9g1Hi3FteCNta4vDx i2CrmAX4JCZtm84MMZ5XoqNNCKLEQ2L/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7bnLwaxrMJXZ5hJpotxs0cdm7lvdpnNHxbP2569jvsy5E5aRst 7qkYLcjSVRdvcauPPbfg5ae+J9daH63+ev+goLC856/ouNdFn5c8DrT2DG9T+ic0+wP33Blp m7Rbgp//TF77bNli/tO7czq3zyySmTDn3K1p5Utvvw//9P+uohJLcUaioRZzUXEiAJWBz7mb AgAA X-MTR: 20000000000000000@CPGS X-CMS-MailID: 20170126083404eucas1p132ce7a0792505367f6a001f21e9d1632 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: 20170126083404eucas1p132ce7a0792505367f6a001f21e9d1632 X-RootMTR: 20170126083404eucas1p132ce7a0792505367f6a001f21e9d1632 References: <1485419634-28331-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 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. This patch requires adding sfr0_ctrl clock to device tree. 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 -- 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 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..be264988bdc9 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 = devm_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 Thu Jan 26 08:33:53 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 92494 Delivered-To: patch@linaro.org Received: by 10.140.20.99 with SMTP id 90csp79704qgi; Thu, 26 Jan 2017 00:35:35 -0800 (PST) X-Received: by 10.99.178.89 with SMTP id t25mr1659737pgo.183.1485419735913; Thu, 26 Jan 2017 00:35:35 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b28si792396pfk.134.2017.01.26.00.35.35; Thu, 26 Jan 2017 00:35:35 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of devicetree-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 devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753190AbdAZIfa (ORCPT + 7 others); Thu, 26 Jan 2017 03:35:30 -0500 Received: from mailout1.w1.samsung.com ([210.118.77.11]:23346 "EHLO mailout1.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752939AbdAZIeJ (ORCPT ); Thu, 26 Jan 2017 03:34:09 -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 <0OKD005EPP4VSJ50@mailout1.w1.samsung.com>; Thu, 26 Jan 2017 08:34:07 +0000 (GMT) Received: from eusmges2.samsung.com (unknown [203.254.199.241]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20170126083406eucas1p2e275f95e6264d09a8788cb6d4f401e5c~dRUxrsr9v0139801398eucas1p2I; Thu, 26 Jan 2017 08:34:06 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges2.samsung.com (EUCPMTA) with SMTP id 7A.3E.30614.E74B9885; Thu, 26 Jan 2017 08:34:06 +0000 (GMT) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20170126083405eucas1p29a888fa3896e2bd131e23585f7d033d9~dRUxAv3h60139801398eucas1p2H; Thu, 26 Jan 2017 08:34:05 +0000 (GMT) X-AuditID: cbfec7f1-f793f6d000007796-53-5889b47e6f64 Received: from eusync1.samsung.com ( [203.254.199.211]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id 7B.34.06687.DB4B9885; Thu, 26 Jan 2017 08:35:09 +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 <0OKD000KKP4KMO50@eusync1.samsung.com>; Thu, 26 Jan 2017 08:34:05 +0000 (GMT) From: Marek Szyprowski To: linux-gpio@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, devicetree@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 v2 7/8] mfd: exynos-lpass: Add missing remove() function Date: Thu, 26 Jan 2017 09:33:53 +0100 Message-id: <1485419634-28331-8-git-send-email-m.szyprowski@samsung.com> X-Mailer: git-send-email 1.9.1 In-reply-to: <1485419634-28331-1-git-send-email-m.szyprowski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrKIsWRmVeSWpSXmKPExsWy7djP87p1WzojDH79ErPYOGM9q8X8I+dY Lc6f38Bucf/rUUaLKX+WM1lsenyN1WLz/D+MFpd3zWGzmHF+H5PF2iN32S0Ov2lntVi16w+j A4/Hzll32T02repk87hzbQ+bx+Yl9R59W1YxenzeJBfAFsVlk5Kak1mWWqRvl8CVMemPfkED Z8XquVMYGxivsncxcnJICJhIXPs9DcoWk7hwbz1bFyMXh5DAUkaJOa/3skM4nxkl3vxfzArT 8XbmL6jEMkaJX4+/M0I4DUwSbxd8YgapYhMwlOh62wU2SwRk1tFlnWAOs8AmJom2JSfAqoQF PCQ+rb7D1MXIwcEioCrRfd4CJMwLFF5xcj4bxDo5iZPHJoOt5hTwlDj99BXUsfPYJbafqAFp lRCQldh0gBki7CKxd9Y9JghbWOLV8S1Q5TISnR0HoeL9jBJNrdoQ9gxGiXNveSFsa4nDxy+C rWIW4JOYtG06M8R4XomONiGIEg+JiU/bGCFsR4lXMy5B/T6HUeLZtwVMExhlFjAyrGIUSS0t zk1PLTbSK07MLS7NS9dLzs/dxAiM/NP/jn/cwfj+hNUhRgEORiUe3gM7OiKEWBPLiitzDzFK cDArifCeX90ZIcSbklhZlVqUH19UmpNafIhRmoNFSZx3z4Ir4UIC6YklqdmpqQWpRTBZJg5O qQZG9wCl3Cmhu3m3atVx7Jqcb3+0btvOFTcWWD/LexRz5b9v4Fu5ryu/hjTdq1FTmqf/7I/K /Nktnz67bimd4/H7oETwxAdhB78fz7CX7O2/UM5QbCx+zXOC5zuDHN/pOkFKd1YzZLnOmyXq XKu0OlupLF99Q2zHa5vbMRc/27heFF3K8Pt9/dQrSizFGYmGWsxFxYkABoQMZvgCAAA= X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFmpjkeLIzCtJLcpLzFFi42I5/e/4Zd29WzojDE7sM7LYOGM9q8X8I+dY Lc6f38Bucf/rUUaLKX+WM1lsenyN1WLz/D+MFpd3zWGzmHF+H5PF2iN32S0Ov2lntVi16w+j A4/Hzll32T02repk87hzbQ+bx+Yl9R59W1YxenzeJBfAFuVmk5GamJJapJCal5yfkpmXbqsU GuKma6GkkJeYm2qrFKHrGxKkpFCWmFMK5BkZoAEH5wD3YCV9uwS3jEl/9AsaOCtWz53C2MB4 lb2LkZNDQsBE4u3MX1C2mMSFe+vZuhi5OIQEljBKHN/UyA7hNDFJrD56jQmkik3AUKLrbRdY lYjAUkaJ/ys/g1UxC2xhkujadBFslrCAh8Sn1XeAOjg4WARUJbrPW4CEeYHCK07OZ4NYJydx 8thkVhCbU8BT4vTTV2CtQkA1my4uZJ/AyLuAkWEVo0hqaXFuem6xoV5xYm5xaV66XnJ+7iZG YBxsO/Zz8w7GSxuDDzEKcDAq8fAe2NERIcSaWFZcmXuIUYKDWUmE9/zqzggh3pTEyqrUovz4 otKc1OJDjKZAN01klhJNzgfGaF5JvKGJobmloZGxhYW5kZGSOG/JhyvhQgLpiSWp2ampBalF MH1MHJxSDYyx1qvX5EYfyhMpPDdhZ0scZ338Id9m868nL/0/f3ZLEp+S/1Wzx9JHL2q8vOzw NPLxuY+PT/y2ZhN1/6c6/TMnm4j04huc+RftJ8/7dkzZ2zBp2c2DjRtrHzy+rMpfynVyIvel x1vb7QvvPihxUDYxsv/0Znb5me9Xw5hv/vz/enm2p9nqiE4dJZbijERDLeai4kQA8shpk5kC AAA= X-MTR: 20000000000000000@CPGS X-CMS-MailID: 20170126083405eucas1p29a888fa3896e2bd131e23585f7d033d9 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: 20170126083405eucas1p29a888fa3896e2bd131e23585f7d033d9 X-RootMTR: 20170126083405eucas1p29a888fa3896e2bd131e23585f7d033d9 References: <1485419634-28331-1-git-send-email-m.szyprowski@samsung.com> Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Disable device on driver remove and release allocated regmap. Signed-off-by: Marek Szyprowski --- drivers/mfd/exynos-lpass.c | 11 +++++++++++ 1 file changed, 11 insertions(+) -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe devicetree" 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/mfd/exynos-lpass.c b/drivers/mfd/exynos-lpass.c index be264988bdc9..9dbbedad916f 100644 --- a/drivers/mfd/exynos-lpass.c +++ b/drivers/mfd/exynos-lpass.c @@ -137,6 +137,16 @@ static int exynos_lpass_probe(struct platform_device *pdev) return of_platform_populate(dev->of_node, NULL, NULL, dev); } +static int exynos_lpass_remove(struct platform_device *pdev) +{ + struct exynos_lpass *lpass = platform_get_drvdata(pdev); + + exynos_lpass_disable(lpass); + regmap_exit(lpass->top); + + return 0; +} + static int __maybe_unused exynos_lpass_suspend(struct device *dev) { struct exynos_lpass *lpass = dev_get_drvdata(dev); @@ -171,6 +181,7 @@ static SIMPLE_DEV_PM_OPS(lpass_pm_ops, exynos_lpass_suspend, .of_match_table = exynos_lpass_of_match, }, .probe = exynos_lpass_probe, + .remove = exynos_lpass_remove, }; module_platform_driver(exynos_lpass_driver); From patchwork Thu Jan 26 08:33:54 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 92492 Delivered-To: patch@linaro.org Received: by 10.140.20.99 with SMTP id 90csp79558qgi; Thu, 26 Jan 2017 00:35:05 -0800 (PST) X-Received: by 10.84.232.78 with SMTP id f14mr2501740pln.27.1485419705199; Thu, 26 Jan 2017 00:35:05 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f25si778109plj.294.2017.01.26.00.35.04; Thu, 26 Jan 2017 00:35:05 -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 S1753135AbdAZIe4 (ORCPT + 4 others); Thu, 26 Jan 2017 03:34:56 -0500 Received: from mailout4.w1.samsung.com ([210.118.77.14]:43161 "EHLO mailout4.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752975AbdAZIeL (ORCPT ); Thu, 26 Jan 2017 03:34:11 -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 <0OKD008ASP4VHZ50@mailout4.w1.samsung.com>; Thu, 26 Jan 2017 08:34:07 +0000 (GMT) Received: from eusmges5.samsung.com (unknown [203.254.199.245]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20170126083407eucas1p261b668bd807d9ee384de904c37525982~dRUyNVbH03039030390eucas1p2l; Thu, 26 Jan 2017 08:34:07 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges5.samsung.com (EUCPMTA) with SMTP id EE.BC.17477.E74B9885; Thu, 26 Jan 2017 08:34:06 +0000 (GMT) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20170126083406eucas1p20148fa4f3ca70d333400c806dd490aef~dRUxj0B8D0139901399eucas1p2K; Thu, 26 Jan 2017 08:34:06 +0000 (GMT) X-AuditID: cbfec7f5-f79d06d000004445-f4-5889b47ec932 Received: from eusync1.samsung.com ( [203.254.199.211]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id 6C.34.06687.EB4B9885; Thu, 26 Jan 2017 08:35:10 +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 <0OKD000KKP4KMO50@eusync1.samsung.com>; Thu, 26 Jan 2017 08:34:06 +0000 (GMT) From: Marek Szyprowski To: linux-gpio@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, devicetree@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 v2 8/8] mfd: exynos-lpass: Add runtime PM support Date: Thu, 26 Jan 2017 09:33:54 +0100 Message-id: <1485419634-28331-9-git-send-email-m.szyprowski@samsung.com> X-Mailer: git-send-email 1.9.1 In-reply-to: <1485419634-28331-1-git-send-email-m.szyprowski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAAzWRXUhTcRjG++9sZ3O5PMxRL2pebEhkSzMKTiqS4cWpmzKCRjc29OCkTWVH h/ZhGqRugkVZW+YX+BVbpU4bamY656aom2J4U05kLE3UG5MMJdrx6N3v4X3e54H3FWHSID9K lJdfROvz1Vo5LuY73H+9Z8v6jKpzNY5LZI+lS0A2u7w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Lk4hASWMEoc3b6KCcJpYpK4+HU5C0gVm4ChRNfb LrAqEYGljBL/V35mB3GYBbYwSXRtusgOUiUs4CixevZURhCbRUBV4umJxWBxXgEPiWdnDkLt k5M4eWwymM0p4Clx+ukrsBohoJpNFxeyT2DkXcDIsIpRJLW0ODc9t9hQrzgxt7g0L10vOT93 EyMwFrYd+7l5B+OljcGHGAU4GJV4eA/s6IgQYk0sK67MPcQowcGsJMJ7fnVnhBBvSmJlVWpR fnxRaU5q8SFGU6CjJjJLiSbnA+M0ryTe0MTQ3NLQyNjCwtzISEmct+TDlXAhgfTEktTs1NSC 1CKYPiYOTqkGRvfG1UlFd/tmT+pfuWjf2X/dktecXKds2pCnE+GtyTflTdeHjc0HnANKJ9au upCS3G3zcCKHRd9P7wKL2qd2j9VZTHK3M65Z3fPi+Laj+14qG+e5r39W9u95ww/ToBmSJfOL 0r6L6DzPeFhv7hh5SthXS/Ek45o9D5clX45p/pVseP5t3c+WaUosxRmJhlrMRcWJAPwgV0Gb AgAA X-MTR: 20000000000000000@CPGS X-CMS-MailID: 20170126083406eucas1p20148fa4f3ca70d333400c806dd490aef 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: 20170126083406eucas1p20148fa4f3ca70d333400c806dd490aef X-RootMTR: 20170126083406eucas1p20148fa4f3ca70d333400c806dd490aef References: <1485419634-28331-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 Acked-by: Krzysztof Kozlowski --- drivers/mfd/exynos-lpass.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 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/drivers/mfd/exynos-lpass.c b/drivers/mfd/exynos-lpass.c index 9dbbedad916f..6d735e22acda 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); @@ -141,7 +144,9 @@ static int exynos_lpass_remove(struct platform_device *pdev) { struct exynos_lpass *lpass = platform_get_drvdata(pdev); - exynos_lpass_disable(lpass); + pm_runtime_disable(&pdev->dev); + if (!pm_runtime_status_suspended(&pdev->dev)) + exynos_lpass_disable(lpass); regmap_exit(lpass->top); return 0; @@ -165,8 +170,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" },