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 LrvHplWdbB53ru1h89i8pN6jb8sqRo/Pm+QC2KK4bFJSczLLUov07R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YtDSGAJo8SL+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" },