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: 9458441 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 772EE60756 for ; Fri, 2 Dec 2016 13:57:23 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6AD6028562 for ; Fri, 2 Dec 2016 13:57:23 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5DA4F28564; Fri, 2 Dec 2016 13:57:23 +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 12C2128562 for ; Fri, 2 Dec 2016 13:57:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760504AbcLBN5V (ORCPT ); Fri, 2 Dec 2016 08:57:21 -0500 Received: from mail.free-electrons.com ([62.4.15.54]:60742 "EHLO mail.free-electrons.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1760707AbcLBN5U (ORCPT ); Fri, 2 Dec 2016 08:57:20 -0500 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 Cc: Nicolas Ferre , Alexandre Belloni , linux-arm-kernel@lists.infradead.org, Boris Brezillon 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> Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.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(); }