From patchwork Tue Jun 21 13:16:10 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jean Pihet X-Patchwork-Id: 901552 Received: from smtp1.linux-foundation.org (smtp1.linux-foundation.org [140.211.169.13]) by demeter1.kernel.org (8.14.4/8.14.4) with ESMTP id p5LDJqgI031486 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL) for ; Tue, 21 Jun 2011 13:20:18 GMT Received: from daredevil.linux-foundation.org (localhost [127.0.0.1]) by smtp1.linux-foundation.org (8.14.2/8.13.5/Debian-3ubuntu1.1) with ESMTP id p5LDH8rQ004013; Tue, 21 Jun 2011 06:17:40 -0700 Received: from mail-ww0-f43.google.com (mail-ww0-f43.google.com [74.125.82.43]) by smtp1.linux-foundation.org (8.14.2/8.13.5/Debian-3ubuntu1.1) with ESMTP id p5LDGaYV003970 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=FAIL) for ; Tue, 21 Jun 2011 06:16:38 -0700 Received: by wwg12 with SMTP id 12so3029082wwg.24 for ; Tue, 21 Jun 2011 06:16:35 -0700 (PDT) Received: by 10.217.1.5 with SMTP id m5mr6369739wes.19.1308662194908; Tue, 21 Jun 2011 06:16:34 -0700 (PDT) Received: from localhost.localdomain (176.96-66-87.adsl-dyn.isp.belgacom.be [87.66.96.176]) by mx.google.com with ESMTPS id n20sm3471058weq.15.2011.06.21.06.16.33 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 21 Jun 2011 06:16:34 -0700 (PDT) From: jean.pihet@newoldbits.com To: "Rafael J. Wysocki" , Paul Walmsley , Kevin Hilman , Magnus Damm , Linux PM mailing list Date: Tue, 21 Jun 2011 15:16:10 +0200 Message-Id: <1308662171-22337-2-git-send-email-j-pihet@ti.com> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1308662171-22337-1-git-send-email-j-pihet@ti.com> References: <1308662171-22337-1-git-send-email-j-pihet@ti.com> Received-SPF: pass (localhost is always allowed.) X-Spam-Status: No, hits=-4.152 required=5 tests=AWL, BAYES_00, OSDL_HEADER_SUBJECT_BRACKETED X-Spam-Checker-Version: SpamAssassin 3.2.4-osdl_revision__1.47__ X-MIMEDefang-Filter: lf$Revision: 1.188 $ X-Scanned-By: MIMEDefang 2.63 on 140.211.169.21 Cc: Jean Pihet Subject: [linux-pm] [PATCH 1/2] PM: add a per-device wake-up latency constraints plist X-BeenThere: linux-pm@lists.linux-foundation.org X-Mailman-Version: 2.1.9 Precedence: list List-Id: Linux power management List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-pm-bounces@lists.linux-foundation.org Errors-To: linux-pm-bounces@lists.linux-foundation.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Tue, 21 Jun 2011 13:20:18 +0000 (UTC) From: Jean Pihet Add the field wakeup_lat_plist_head in the struct dev_pm_info and the initialization of the plist in device_pm_init. This enables the implementation of per-device constraints in PM QoS. Signed-off-by: Jean Pihet --- drivers/base/power/main.c | 1 + include/linux/pm.h | 2 ++ 2 files changed, 3 insertions(+), 0 deletions(-) diff --git a/drivers/base/power/main.c b/drivers/base/power/main.c index aa632020..6a096d1 100644 --- a/drivers/base/power/main.c +++ b/drivers/base/power/main.c @@ -64,6 +64,7 @@ void device_pm_init(struct device *dev) spin_lock_init(&dev->power.lock); pm_runtime_init(dev); INIT_LIST_HEAD(&dev->power.entry); + plist_head_init(&dev->power.wakeup_lat_plist_head, &dev->power.lock); } /** diff --git a/include/linux/pm.h b/include/linux/pm.h index 3160648..35fe682 100644 --- a/include/linux/pm.h +++ b/include/linux/pm.h @@ -22,6 +22,7 @@ #define _LINUX_PM_H #include +#include #include #include #include @@ -462,6 +463,7 @@ struct dev_pm_info { unsigned long accounting_timestamp; void *subsys_data; /* Owned by the subsystem. */ #endif + struct plist_head wakeup_lat_plist_head; }; extern void update_pm_runtime_accounting(struct device *dev);