From patchwork Tue Feb 2 14:52:27 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tero Kristo X-Patchwork-Id: 76371 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 o12D4W5b024245 for ; Tue, 2 Feb 2010 13:04:32 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755961Ab0BBNEc (ORCPT ); Tue, 2 Feb 2010 08:04:32 -0500 Received: from smtp.nokia.com ([192.100.105.134]:25437 "EHLO mgw-mx09.nokia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754033Ab0BBNEb (ORCPT ); Tue, 2 Feb 2010 08:04:31 -0500 Received: from vaebh106.NOE.Nokia.com (vaebh106.europe.nokia.com [10.160.244.32]) by mgw-mx09.nokia.com (Switch-3.3.3/Switch-3.3.3) with ESMTP id o12D4Pth006095 for ; Tue, 2 Feb 2010 07:04:30 -0600 Received: from vaebh104.NOE.Nokia.com ([10.160.244.30]) by vaebh106.NOE.Nokia.com with Microsoft SMTPSVC(6.0.3790.3959); Tue, 2 Feb 2010 15:03:12 +0200 Received: from mgw-sa02.ext.nokia.com ([147.243.1.48]) by vaebh104.NOE.Nokia.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.3959); Tue, 2 Feb 2010 15:03:10 +0200 Received: from localhost.localdomain (sokoban.nmp.nokia.com [172.22.215.13]) by mgw-sa02.ext.nokia.com (Switch-3.3.3/Switch-3.3.3) with ESMTP id o12D2wJk029178 for ; Tue, 2 Feb 2010 15:03:09 +0200 From: Tero Kristo To: linux-omap@vger.kernel.org Subject: [PATCHv5 9/9] OMAP3: PM: Added support for suspending to INACTIVE state Date: Tue, 2 Feb 2010 16:52:27 +0200 Message-Id: <1265122347-2233-10-git-send-email-tero.kristo@nokia.com> X-Mailer: git-send-email 1.5.4.3 In-Reply-To: <1265122347-2233-9-git-send-email-tero.kristo@nokia.com> References: <> <1265122347-2233-1-git-send-email-tero.kristo@nokia.com> <1265122347-2233-2-git-send-email-tero.kristo@nokia.com> <1265122347-2233-3-git-send-email-tero.kristo@nokia.com> <1265122347-2233-4-git-send-email-tero.kristo@nokia.com> <1265122347-2233-5-git-send-email-tero.kristo@nokia.com> <1265122347-2233-6-git-send-email-tero.kristo@nokia.com> <1265122347-2233-7-git-send-email-tero.kristo@nokia.com> <1265122347-2233-8-git-send-email-tero.kristo@nokia.com> <1265122347-2233-9-git-send-email-tero.kristo@nokia.com> X-OriginalArrivalTime: 02 Feb 2010 13:03:10.0633 (UTC) FILETIME=[123F9190:01CAA408] 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]); Tue, 02 Feb 2010 13:04:33 +0000 (UTC) diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c index 7946b70..b0911f2 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)