From patchwork Fri Feb 12 18:27:45 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tero Kristo X-Patchwork-Id: 78918 X-Patchwork-Delegate: khilman@deeprootsystems.com Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o1CGdodZ008922 for ; Fri, 12 Feb 2010 16:39:50 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757240Ab0BLQjt (ORCPT ); Fri, 12 Feb 2010 11:39:49 -0500 Received: from smtp.nokia.com ([192.100.122.233]:53946 "EHLO mgw-mx06.nokia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757179Ab0BLQjs (ORCPT ); Fri, 12 Feb 2010 11:39:48 -0500 Received: from esebh105.NOE.Nokia.com (esebh105.ntc.nokia.com [172.21.138.211]) by mgw-mx06.nokia.com (Switch-3.3.3/Switch-3.3.3) with ESMTP id o1CGddEA031375 for ; Fri, 12 Feb 2010 18:39:46 +0200 Received: from esebh102.NOE.Nokia.com ([172.21.138.183]) by esebh105.NOE.Nokia.com with Microsoft SMTPSVC(6.0.3790.3959); Fri, 12 Feb 2010 18:39:44 +0200 Received: from mgw-sa01.ext.nokia.com ([147.243.1.47]) by esebh102.NOE.Nokia.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.3959); Fri, 12 Feb 2010 18:39:43 +0200 Received: from localhost.localdomain (sokoban.nmp.nokia.com [172.22.215.13]) by mgw-sa01.ext.nokia.com (Switch-3.3.3/Switch-3.3.3) with ESMTP id o1CGdVM2021112 for ; Fri, 12 Feb 2010 18:39:42 +0200 From: Tero Kristo To: linux-omap@vger.kernel.org Subject: [PATCHv6 9/9] OMAP3: PM: Added support for suspending to INACTIVE state Date: Fri, 12 Feb 2010 20:27:45 +0200 Message-Id: <1265999265-4363-10-git-send-email-tero.kristo@nokia.com> X-Mailer: git-send-email 1.5.4.3 In-Reply-To: <1265999265-4363-9-git-send-email-tero.kristo@nokia.com> References: <> <1265999265-4363-1-git-send-email-tero.kristo@nokia.com> <1265999265-4363-2-git-send-email-tero.kristo@nokia.com> <1265999265-4363-3-git-send-email-tero.kristo@nokia.com> <1265999265-4363-4-git-send-email-tero.kristo@nokia.com> <1265999265-4363-5-git-send-email-tero.kristo@nokia.com> <1265999265-4363-6-git-send-email-tero.kristo@nokia.com> <1265999265-4363-7-git-send-email-tero.kristo@nokia.com> <1265999265-4363-8-git-send-email-tero.kristo@nokia.com> <1265999265-4363-9-git-send-email-tero.kristo@nokia.com> X-OriginalArrivalTime: 12 Feb 2010 16:39:44.0166 (UTC) FILETIME=[FB20DC60:01CAAC01] X-Nokia-AV: Clean Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Fri, 12 Feb 2010 16:39:50 +0000 (UTC) diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c index cdbedcf..41d6cc3 100644 --- a/arch/arm/mach-omap2/pm34xx.c +++ b/arch/arm/mach-omap2/pm34xx.c @@ -633,11 +633,12 @@ int set_pwrdm_state(struct powerdomain *pwrdm, u32 state) if (pwrdm == NULL || IS_ERR(pwrdm)) return -EINVAL; - while (!(pwrdm->pwrsts & (1 << state))) { - if (state == PWRDM_POWER_OFF) - return ret; - state--; - } + if (state != PWRDM_POWER_INACTIVE) + while (!(pwrdm->pwrsts & (1 << state))) { + if (state == PWRDM_POWER_OFF) + return ret; + state--; + } cur_state = pwrdm_read_next_pwrst(pwrdm); if (cur_state == state)