From patchwork Fri Apr 12 09:41:06 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulf Hansson X-Patchwork-Id: 16076 Return-Path: X-Original-To: linaro@staging.patches.linaro.org Delivered-To: linaro@staging.patches.linaro.org Received: from mail-qe0-f70.google.com (mail-qe0-f70.google.com [209.85.128.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 4722D26EB0 for ; Fri, 12 Apr 2013 09:43:28 +0000 (UTC) Received: by mail-qe0-f70.google.com with SMTP id 1sf4342199qec.1 for ; Fri, 12 Apr 2013 02:43:05 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:x-beenthere:x-received:received-spf:x-received :x-forwarded-to:x-forwarded-for:delivered-to:x-received:received-spf :from:to:cc:subject:date:message-id:x-mailer:mime-version :x-gm-message-state:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-google-group-id:list-post:list-help:list-archive:list-unsubscribe :content-type; bh=zrkbGJLNWfxBkec/TIWcitybF0o4R/nLDWI0hWBwM90=; b=blAB43yFI/RGp1c4g7B7HEeuJpXpY2VlwSIt8ihia0IiDWd9ZxPwS7B4+CHlBM2k4m yUXzJXHHv/i2GjLkuHzwlSDUFCijlH+HaWGwgVnH/LFTd9b/2sAVEOsMDr6PRfhkLMvn wJ87Gz+pQXDcVbZsx+mIrbzTKUCP5QbjdMUo9pFcyWLmuGg/TDNZHp1HCLBGYovhUhit DLXF/HrFgclvDDcmTthp1F7RTNmyUT0Zx9gUNDOW5rghf0B4D2nx1lnqXYZm1yv8mkj3 R1Zu3wuEC4JJy8ctiHPcDkf7pzdBqlbeuR6MP3/GWGTUvGB+gAp4aqvQXSq/A08rwaPt HhxQ== X-Received: by 10.224.172.200 with SMTP id m8mr5869491qaz.0.1365759785063; Fri, 12 Apr 2013 02:43:05 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.48.131 with SMTP id l3ls1287325qen.54.gmail; Fri, 12 Apr 2013 02:43:05 -0700 (PDT) X-Received: by 10.52.16.177 with SMTP id h17mr4497698vdd.109.1365759784961; Fri, 12 Apr 2013 02:43:04 -0700 (PDT) Received: from mail-vc0-f178.google.com (mail-vc0-f178.google.com [209.85.220.178]) by mx.google.com with ESMTPS id p19si6047588vcw.43.2013.04.12.02.43.04 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 12 Apr 2013 02:43:04 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.178 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.178; Received: by mail-vc0-f178.google.com with SMTP id hv10so2035154vcb.37 for ; Fri, 12 Apr 2013 02:43:04 -0700 (PDT) X-Received: by 10.52.71.4 with SMTP id q4mr6661642vdu.8.1365759784569; Fri, 12 Apr 2013 02:43:04 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.58.127.98 with SMTP id nf2csp58323veb; Fri, 12 Apr 2013 02:43:03 -0700 (PDT) X-Received: by 10.14.218.66 with SMTP id j42mr26171610eep.46.1365759783299; Fri, 12 Apr 2013 02:43:03 -0700 (PDT) Received: from eu1sys200aog101.obsmtp.com (eu1sys200aog101.obsmtp.com [207.126.144.111]) by mx.google.com with SMTP id z49si10855561eep.60.2013.04.12.02.42.47 (version=TLSv1 cipher=RC4-SHA bits=128/128); Fri, 12 Apr 2013 02:43:03 -0700 (PDT) Received-SPF: neutral (google.com: 207.126.144.111 is neither permitted nor denied by best guess record for domain of ulf.hansson@stericsson.com) client-ip=207.126.144.111; Received: from beta.dmz-eu.st.com ([164.129.1.35]) (using TLSv1) by eu1sys200aob101.postini.com ([207.126.147.11]) with SMTP ID DSNKUWfXFWXLRyGtJoh/tc0knYM/NnNEEsus@postini.com; Fri, 12 Apr 2013 09:43:03 UTC Received: from zeta.dmz-eu.st.com (zeta.dmz-eu.st.com [164.129.230.9]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 56AE015D; Fri, 12 Apr 2013 09:41:20 +0000 (GMT) Received: from relay2.stm.gmessaging.net (unknown [10.230.100.18]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id CEF1548CD; Fri, 12 Apr 2013 09:41:17 +0000 (GMT) Received: from exdcvycastm003.EQ1STM.local (alteon-source-exch [10.230.100.61]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (Client CN "exdcvycastm003", Issuer "exdcvycastm003" (not verified)) by relay2.stm.gmessaging.net (Postfix) with ESMTPS id 62A2DA8094; Fri, 12 Apr 2013 11:41:15 +0200 (CEST) Received: from steludxu1397.stericsson.com (10.230.100.153) by smtp.stericsson.com (10.230.100.1) with Microsoft SMTP Server (TLS) id 8.3.279.5; Fri, 12 Apr 2013 11:41:18 +0200 From: Ulf Hansson To: "Rafael J. Wysocki" , Len Brown , Pavel Machek , Cc: , Rickard Andersson , Ulf Hansson , Kevin Hilman , Alan Stern Subject: [PATCH] PM / Runtime: Asyncronous idle|suspend devices at system resume Date: Fri, 12 Apr 2013 11:41:06 +0200 Message-ID: <1365759666-23652-1-git-send-email-ulf.hansson@stericsson.com> X-Mailer: git-send-email 1.7.10 MIME-Version: 1.0 X-Gm-Message-State: ALoCoQmQvGNAAKJ9q3xtebuS9c29J9/iGJSbG/OgwWdTY6D3eMa28qVgrPaWnxY0vfrw3LL84GQG X-Original-Sender: patch@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.178 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , From: Ulf Hansson Use the asyncronous runtime PM API when returning the runtime reference for the device after the system resume is completed. By using the asyncronous runtime PM API we don't have to wait for each an every device to become idle|suspended. Instead we can move on and handle the next device in queue. Signed-off-by: Ulf Hansson Cc: Kevin Hilman Cc: Alan Stern --- drivers/base/power/domain.c | 2 +- drivers/base/power/generic_ops.c | 2 +- drivers/base/power/main.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/base/power/domain.c b/drivers/base/power/domain.c index 9a6b05a..bba5758 100644 --- a/drivers/base/power/domain.c +++ b/drivers/base/power/domain.c @@ -1327,7 +1327,7 @@ static void pm_genpd_complete(struct device *dev) pm_generic_complete(dev); pm_runtime_set_active(dev); pm_runtime_enable(dev); - pm_runtime_idle(dev); + pm_request_idle(dev); } } diff --git a/drivers/base/power/generic_ops.c b/drivers/base/power/generic_ops.c index d03d290..bfd898b 100644 --- a/drivers/base/power/generic_ops.c +++ b/drivers/base/power/generic_ops.c @@ -324,6 +324,6 @@ void pm_generic_complete(struct device *dev) * Let runtime PM try to suspend devices that haven't been in use before * going into the system-wide sleep state we're resuming from. */ - pm_runtime_idle(dev); + pm_request_idle(dev); } #endif /* CONFIG_PM_SLEEP */ diff --git a/drivers/base/power/main.c b/drivers/base/power/main.c index 15beb50..5a9b656 100644 --- a/drivers/base/power/main.c +++ b/drivers/base/power/main.c @@ -756,7 +756,7 @@ static void device_complete(struct device *dev, pm_message_t state) device_unlock(dev); - pm_runtime_put_sync(dev); + pm_runtime_put(dev); } /**