From patchwork Fri Dec 2 13:57:14 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Boris BREZILLON X-Patchwork-Id: 9458455 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 B111D60585 for ; Fri, 2 Dec 2016 13:59:41 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A3E0228562 for ; Fri, 2 Dec 2016 13:59:41 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9686128565; Fri, 2 Dec 2016 13:59:41 +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=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 2476C28562 for ; Fri, 2 Dec 2016 13:59:41 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1cCoLo-0002h7-RZ; Fri, 02 Dec 2016 13:58:08 +0000 Received: from mail.free-electrons.com ([62.4.15.54]) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1cCoLL-00026P-RU for linux-arm-kernel@lists.infradead.org; Fri, 02 Dec 2016 13:57:42 +0000 Received: by mail.free-electrons.com (Postfix, from userid 110) id BDC4621D16; Fri, 2 Dec 2016 14:57:18 +0100 (CET) Received: from bbrezillon.home (LStLambert-657-1-97-87.w90-63.abo.wanadoo.fr [90.63.216.87]) by mail.free-electrons.com (Postfix) with ESMTPSA id 84CFD21D0A; Fri, 2 Dec 2016 14:57:18 +0100 (CET) From: Boris Brezillon To: Mark Brown , Liam Girdwood , "Rafael J. Wysocki" , Len Brown , Pavel Machek , linux-pm@vger.kernel.org Subject: [RFC PATCH 3/5] ARM: at91: Call regulator_suspend_{begin, end}() in the platform pm ops Date: Fri, 2 Dec 2016 14:57:14 +0100 Message-Id: <1480687036-5037-4-git-send-email-boris.brezillon@free-electrons.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1480687036-5037-1-git-send-email-boris.brezillon@free-electrons.com> References: <1480687036-5037-1-git-send-email-boris.brezillon@free-electrons.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20161202_055740_225938_5CBA19D9 X-CRM114-Status: GOOD ( 11.74 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Alexandre Belloni , Nicolas Ferre , linux-arm-kernel@lists.infradead.org, Boris Brezillon MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Call regulator_suspend_begin() and regulator_suspend_end() in the ->begin() and ->end() PM ops to inform the regulator framework that a suspend sequence is beginning/ending. Signed-off-by: Boris Brezillon --- arch/arm/mach-at91/pm.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach-at91/pm.c b/arch/arm/mach-at91/pm.c index 65e2d5f6a1c9..699125f16356 100644 --- a/arch/arm/mach-at91/pm.c +++ b/arch/arm/mach-at91/pm.c @@ -22,6 +22,7 @@ #include #include #include +#include #include #include @@ -95,7 +96,7 @@ static suspend_state_t target_state; static int at91_pm_begin(suspend_state_t state) { target_state = state; - return 0; + return regulator_suspend_begin(target_state); } /* @@ -240,6 +241,7 @@ static int at91_pm_enter(suspend_state_t state) static void at91_pm_end(void) { target_state = PM_SUSPEND_ON; + regulator_suspend_end(); }