From patchwork Fri Jun 24 14:37:58 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jean Pihet X-Patchwork-Id: 916502 X-Patchwork-Delegate: khilman@deeprootsystems.com Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.4) with ESMTP id p5OEcVdP021979 for ; Fri, 24 Jun 2011 14:38:31 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759214Ab1FXOi3 (ORCPT ); Fri, 24 Jun 2011 10:38:29 -0400 Received: from mail-ww0-f44.google.com ([74.125.82.44]:45637 "EHLO mail-ww0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759332Ab1FXOi1 (ORCPT ); Fri, 24 Jun 2011 10:38:27 -0400 Received: by wwe5 with SMTP id 5so2945133wwe.1 for ; Fri, 24 Jun 2011 07:38:26 -0700 (PDT) Received: by 10.216.16.79 with SMTP id g57mr1068584weg.74.1308926306310; Fri, 24 Jun 2011 07:38:26 -0700 (PDT) Received: from localhost.localdomain (175.96-66-87.adsl-dyn.isp.belgacom.be [87.66.96.175]) by mx.google.com with ESMTPS id g2sm1425972wes.34.2011.06.24.07.38.24 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 24 Jun 2011 07:38:25 -0700 (PDT) From: jean.pihet@newoldbits.com To: "Rafael J. Wysocki" , Paul Walmsley , Kevin Hilman , Magnus Damm , Linux PM mailing list , linux-omap@vger.kernel.org Cc: Jean Pihet Subject: [RFC/PATCH 1/9] PM: add a per-device wake-up latency constraints plist Date: Fri, 24 Jun 2011 16:37:58 +0200 Message-Id: <1308926286-30445-2-git-send-email-j-pihet@ti.com> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1308926286-30445-1-git-send-email-j-pihet@ti.com> References: <1308926286-30445-1-git-send-email-j-pihet@ti.com> 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.6 (demeter1.kernel.org [140.211.167.41]); Fri, 24 Jun 2011 14:38:31 +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);