From patchwork Mon Jun 20 08:43:31 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "J, KEERTHY" X-Patchwork-Id: 9186869 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 8BA1860756 for ; Mon, 20 Jun 2016 08:49:39 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7318622064 for ; Mon, 20 Jun 2016 08:49:39 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6467925227; Mon, 20 Jun 2016 08:49:39 +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 D2B1922064 for ; Mon, 20 Jun 2016 08:49:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753479AbcFTIth (ORCPT ); Mon, 20 Jun 2016 04:49:37 -0400 Received: from devils.ext.ti.com ([198.47.26.153]:46281 "EHLO devils.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752237AbcFTItg (ORCPT ); Mon, 20 Jun 2016 04:49:36 -0400 Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by devils.ext.ti.com (8.13.7/8.13.7) with ESMTP id u5K8hOJK028861; Mon, 20 Jun 2016 03:43:24 -0500 Received: from DFLE72.ent.ti.com (dfle72.ent.ti.com [128.247.5.109]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id u5K8i2gg027640; Mon, 20 Jun 2016 03:44:03 -0500 Received: from dlep32.itg.ti.com (157.170.170.100) by DFLE72.ent.ti.com (128.247.5.109) with Microsoft SMTP Server id 14.3.294.0; Mon, 20 Jun 2016 03:44:02 -0500 Received: from ula0393675.india.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by dlep32.itg.ti.com (8.14.3/8.13.8) with ESMTP id u5K8ho6S025602; Mon, 20 Jun 2016 03:43:59 -0500 From: Keerthy To: , , CC: , , , , , , , , Dave Gerlach Subject: [PATCH 2/9] regulator: of: setup initial suspend state Date: Mon, 20 Jun 2016 14:13:31 +0530 Message-ID: <1466412218-5906-3-git-send-email-j-keerthy@ti.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1466412218-5906-1-git-send-email-j-keerthy@ti.com> References: <1466412218-5906-1-git-send-email-j-keerthy@ti.com> MIME-Version: 1.0 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Setup initial suspend state to mem, if suspend state is defined for mem state. This makes sure that the regulators are in proper mode already from boot. Signed-off-by: Tero Kristo Signed-off-by: Dave Gerlach Signed-off-by: Keerthy --- drivers/regulator/of_regulator.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/regulator/of_regulator.c b/drivers/regulator/of_regulator.c index cd828db..4f613ec 100644 --- a/drivers/regulator/of_regulator.c +++ b/drivers/regulator/of_regulator.c @@ -163,6 +163,9 @@ static void of_get_regulation_constraints(struct device_node *np, "regulator-suspend-microvolt", &pval)) suspend_state->uV = pval; + if (i == PM_SUSPEND_MEM) + constraints->initial_state = PM_SUSPEND_MEM; + of_node_put(suspend_np); suspend_state = NULL; suspend_np = NULL;