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: 9536869 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 25264601D7 for ; Wed, 25 Jan 2017 11:52:21 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 15A5326E75 for ; Wed, 25 Jan 2017 11:52:21 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0A5FA27C0C; Wed, 25 Jan 2017 11:52:21 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 95D6926E94 for ; Wed, 25 Jan 2017 11:52:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752044AbdAYLwI (ORCPT ); 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/PcpoM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KZl56bZKoSFuuhZK CnmJuam2ShG6viFBSgpliTmlQJ6RARpwcA5wD1bSt0twyzi/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?B?TWFyZWsgU3p5cHJvd3NraRtTUlBPTC1LZXJuZWwgKFRQKRs=?= =?UTF-8?B?7IK87ISx7KCE7J6QG1NlbmlvciBTb2Z0d2FyZSBFbmdpbmVlcg==?= X-Global-Sender: =?UTF-8?B?TWFyZWsgU3p5cHJvd3NraRtTUlBPTC1LZXJuZWwgKFRQKRtT?= =?UTF-8?B?YW1zdW5nIEVsZWN0cm9uaWNzG1NlbmlvciBTb2Z0d2FyZSBFbmdpbmVlcg==?= X-Sender-Code: =?UTF-8?B?QzEwG0VIURtDMTBDRDAyQ0QwMjczOTI=?= 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 X-Virus-Scanned: ClamAV using ClamSMTP 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 | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) 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" },