From patchwork Thu Jul 19 12:08:48 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vaibhav Bedia X-Patchwork-Id: 1216361 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork1.kernel.org (Postfix) with ESMTP id E900B3FC33 for ; Thu, 19 Jul 2012 12:16:50 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1SrpXr-0002RH-DF; Thu, 19 Jul 2012 12:09:27 +0000 Received: from comal.ext.ti.com ([198.47.26.152]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1SrpXl-0002R2-3h for linux-arm-kernel@lists.infradead.org; Thu, 19 Jul 2012 12:09:23 +0000 Received: from dbdp20.itg.ti.com ([172.24.170.38]) by comal.ext.ti.com (8.13.7/8.13.7) with ESMTP id q6JC9IBV010968; Thu, 19 Jul 2012 07:09:18 -0500 Received: from DBDE70.ent.ti.com (localhost [127.0.0.1]) by dbdp20.itg.ti.com (8.13.8/8.13.8) with ESMTP id q6JC9Fdo020650; Thu, 19 Jul 2012 17:39:16 +0530 (IST) Received: from dbdp32.itg.ti.com (172.24.170.251) by dbde70.ent.ti.com (172.24.170.148) with Microsoft SMTP Server id 14.1.323.3; Thu, 19 Jul 2012 17:39:15 +0530 Received: from localhost.localdomain (dbdp20.itg.ti.com [172.24.170.38]) by dbdp32.itg.ti.com (8.13.8/8.13.8) with ESMTP id q6JC9CtU011499; Thu, 19 Jul 2012 17:39:12 +0530 From: Vaibhav Bedia To: , , Subject: [RFC][PATCH v2 1/1] ARM: OMAP2+: PM: Register suspend ops even in the presence of DT blob Date: Thu, 19 Jul 2012 17:38:48 +0530 Message-ID: <1342699728-19831-1-git-send-email-vaibhav.bedia@ti.com> X-Mailer: git-send-email 1.7.0.4 MIME-Version: 1.0 X-Spam-Note: CRM114 invocation failed X-Spam-Score: -6.9 (------) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-6.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at http://www.dnswl.org/, high trust [198.47.26.152 listed in list.dnswl.org] -0.0 T_RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: linux-omap@vger.kernel.org, Vaibhav Bedia , linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org As per the comment in omap2_common_late_init() looks like the original intent of the DT check was to treat only the PMIC and SR initialization differently. Recent changes to consolidate the suspend-resume code across OMAP3/4 resulted into the registration of suspend ops also being dependent on the check for DT blob. Since the suspend-resume operation should not really be dependent on the usage of DT remove this dependency by wrapping the PMIC and SR init under the DT check. Signed-off-by: Vaibhav Bedia --- v2->v1 - As suggested by Paul, Instead of moving around the suspend ops registration just wrap the PMIC and SR init under the DT check. - Fixed up Kevin's email address :\ arch/arm/mach-omap2/pm.c | 21 ++++++++++----------- 1 files changed, 10 insertions(+), 11 deletions(-) diff --git a/arch/arm/mach-omap2/pm.c b/arch/arm/mach-omap2/pm.c index 9cb5ced..46848f7 100644 --- a/arch/arm/mach-omap2/pm.c +++ b/arch/arm/mach-omap2/pm.c @@ -302,19 +302,18 @@ int __init omap2_common_pm_late_init(void) * a completely different mechanism. * Disable this part if a DT blob is available. */ - if (of_have_populated_dt()) - return 0; + if (!of_have_populated_dt()) { + /* Init the voltage layer */ + omap_pmic_late_init(); + omap_voltage_late_init(); - /* Init the voltage layer */ - omap_pmic_late_init(); - omap_voltage_late_init(); + /* Initialize the voltages */ + omap3_init_voltages(); + omap4_init_voltages(); - /* Initialize the voltages */ - omap3_init_voltages(); - omap4_init_voltages(); - - /* Smartreflex device init */ - omap_devinit_smartreflex(); + /* Smartreflex device init */ + omap_devinit_smartreflex(); + } #ifdef CONFIG_SUSPEND suspend_set_ops(&omap_pm_ops);