All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: Linux PM mailing list <linux-pm@lists.linux-foundation.org>
Cc: Greg Kroah-Hartman <gregkh@suse.de>,
	Magnus Damm <magnus.damm@gmail.com>,
	Paul Walmsley <paul@pwsan.com>, Kevin Hilman <khilman@ti.com>,
	Alan Stern <stern@rowland.harvard.edu>,
	LKML <linux-kernel@vger.kernel.org>,
	linux-sh@vger.kernel.org
Subject: [PATCH 4/8] PM / Domains: Support for generic I/O PM domains (v5)
Date: Sat, 11 Jun 2011 20:31:10 +0000	[thread overview]
Message-ID: <201106112231.11269.rjw@sisk.pl> (raw)
In-Reply-To: <201106112223.04972.rjw@sisk.pl>

From: Rafael J. Wysocki <rjw@sisk.pl>

Introduce common headers, helper functions and callbacks allowing
platforms to use simple generic power domains for runtime power
management.

Introduce struct generic_pm_domain to be used for representing
power domains that each contain a number of devices and may be
parent domains or subdomains with respect to other power domains.
Among other things, this structure includes callbacks to be
provided by platforms for performing specific tasks related to
power management (i.e. ->stop_device() may disable a device's
clocks, while ->start_device() may enable them, ->power_off() is
supposed to remove power from the entire power domain
and ->power_on() is supposed to restore it).

Introduce functions that can be used as power domain runtime PM
callbacks, pm_genpd_runtime_suspend() and pm_genpd_runtime_resume(),
as well as helper functions for the initialization of a power
domain represented by a struct generic_power_domain object,
adding a device to or removing a device from it and adding or
removing subdomains.

Introduce configuration option CONFIG_PM_GENERIC_DOMAINS to be
selected by the platforms that want to use the new code.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/base/power/Makefile |    1 
 drivers/base/power/domain.c |  467 ++++++++++++++++++++++++++++++++++++++++++++
 include/linux/pm.h          |    3 
 include/linux/pm_domain.h   |   78 +++++++
 kernel/power/Kconfig        |    4 
 5 files changed, 552 insertions(+), 1 deletion(-)

Index: linux-2.6/include/linux/pm_domain.h
=================================--- /dev/null
+++ linux-2.6/include/linux/pm_domain.h
@@ -0,0 +1,78 @@
+/*
+ * pm_domain.h - Definitions and headers related to device power domains.
+ *
+ * Copyright (C) 2011 Rafael J. Wysocki <rjw@sisk.pl>, Renesas Electronics Corp.
+ *
+ * This file is released under the GPLv2.
+ */
+
+#ifndef _LINUX_PM_DOMAIN_H
+#define _LINUX_PM_DOMAIN_H
+
+#include <linux/device.h>
+
+struct dev_power_governor {
+	bool (*power_down_ok)(struct dev_pm_domain *domain);
+};
+
+struct generic_pm_domain {
+	struct dev_pm_domain domain;	/* PM domain operations */
+	struct list_head sd_node;	/* Node in the parent's subdomain list */
+	struct generic_pm_domain *parent;	/* Parent PM domain */
+	struct list_head sd_list;	/* List of dubdomains */
+	struct list_head dev_list;	/* List of devices */
+	struct mutex lock;
+	struct dev_power_governor *gov;
+	struct work_struct power_off_work;
+	unsigned int in_progress;	/* Number of devices being suspended now */
+	unsigned int sd_count;	/* Number of subdomains with power "on" */
+	bool power_is_off;	/* Whether or not power has been removed */
+	int (*power_off)(struct dev_pm_domain *domain);
+	int (*power_on)(struct dev_pm_domain *domain);
+	int (*start_device)(struct device *dev);
+	int (*stop_device)(struct device *dev);
+};
+
+struct dev_list_entry {
+	struct list_head node;
+	struct device *dev;
+	bool need_restore;
+};
+
+#ifdef CONFIG_PM_GENERIC_DOMAINS
+extern int pm_genpd_add_device(struct generic_pm_domain *genpd,
+			       struct device *dev);
+extern int pm_genpd_remove_device(struct generic_pm_domain *genpd,
+				  struct device *dev);
+extern int pm_genpd_add_subdomain(struct generic_pm_domain *genpd,
+				  struct generic_pm_domain *new_subdomain);
+extern int pm_genpd_remove_subdomain(struct generic_pm_domain *genpd,
+				     struct generic_pm_domain *target);
+extern void pm_genpd_init(struct generic_pm_domain *genpd,
+			  struct dev_power_governor *gov, bool is_off);
+#else
+static inline int pm_genpd_add_device(struct generic_pm_domain *genpd,
+				      struct device *dev)
+{
+	return -ENOSYS;
+}
+static inline int pm_genpd_remove_device(struct generic_pm_domain *genpd,
+					 struct device *dev)
+{
+	return -ENOSYS;
+}
+static inline int pm_genpd_add_subdomain(struct generic_pm_domain *genpd,
+					 struct generic_pm_domain *new_sd)
+{
+	return -ENOSYS;
+}
+static inline int pm_genpd_remove_subdomain(struct generic_pm_domain *genpd,
+					    struct generic_pm_domain *target)
+{
+	return -ENOSYS;
+}
+static inline void pm_genpd_init(struct generic_pm_domain *genpd,
+				 struct dev_power_governor *gov, bool is_off) {}
+#endif
+
+#endif /* _LINUX_PM_DOMAIN_H */
Index: linux-2.6/include/linux/pm.h
=================================--- linux-2.6.orig/include/linux/pm.h
+++ linux-2.6/include/linux/pm.h
@@ -472,7 +472,8 @@ extern void update_pm_runtime_accounting
  * subsystem-level and driver-level callbacks.
  */
 struct dev_pm_domain {
-	struct dev_pm_ops	ops;
+	struct dev_pm_ops ops;
+	void *platform_data;
 };
 
 /*
Index: linux-2.6/drivers/base/power/Makefile
=================================--- linux-2.6.orig/drivers/base/power/Makefile
+++ linux-2.6/drivers/base/power/Makefile
@@ -3,6 +3,7 @@ obj-$(CONFIG_PM_SLEEP)	+= main.o wakeup.
 obj-$(CONFIG_PM_RUNTIME)	+= runtime.o
 obj-$(CONFIG_PM_TRACE_RTC)	+= trace.o
 obj-$(CONFIG_PM_OPP)	+= opp.o
+obj-$(CONFIG_PM_GENERIC_DOMAINS)	+=  domain.o
 obj-$(CONFIG_HAVE_CLK)	+= clock_ops.o
 
 ccflags-$(CONFIG_DEBUG_DRIVER) := -DDEBUG
\ No newline at end of file
Index: linux-2.6/drivers/base/power/domain.c
=================================--- /dev/null
+++ linux-2.6/drivers/base/power/domain.c
@@ -0,0 +1,467 @@
+/*
+ * drivers/base/power/domain.c - Common code related to device power domains.
+ *
+ * Copyright (C) 2011 Rafael J. Wysocki <rjw@sisk.pl>, Renesas Electronics Corp.
+ *
+ * This file is released under the GPLv2.
+ */
+
+#include <linux/init.h>
+#include <linux/kernel.h>
+#include <linux/io.h>
+#include <linux/pm_runtime.h>
+#include <linux/pm_domain.h>
+#include <linux/slab.h>
+#include <linux/err.h>
+
+#ifdef CONFIG_PM_RUNTIME
+
+static void genpd_sd_counter_dec(struct generic_pm_domain *genpd)
+{
+	if (!WARN_ON(genpd->sd_count = 0))
+			genpd->sd_count--;
+}
+
+/**
+ * __pm_genpd_restore_device - Restore the pre-suspend state of a device.
+ * @dle: Device list entry of the device to restore the state of.
+ * @genpd: PM domain the device belongs to.
+ */
+static void __pm_genpd_restore_device(struct dev_list_entry *dle,
+				      struct generic_pm_domain *genpd)
+{
+	struct device *dev = dle->dev;
+	struct device_driver *drv = dev->driver;
+
+	if (!dle->need_restore)
+		return;
+
+	if (genpd->start_device)
+		genpd->start_device(dev);
+
+	if (drv && drv->pm && drv->pm->runtime_resume)
+		drv->pm->runtime_resume(dev);
+
+	if (genpd->stop_device)
+		genpd->stop_device(dev);
+
+	dle->need_restore = false;
+}
+
+/**
+ * pm_genpd_poweroff - Remove power from a given PM domain.
+ * @genpd: PM domain to power down.
+ *
+ * If all of the @genpd's devices have been suspended and all of its subdomains
+ * have been powered down, run the runtime suspend callbacks provided by all of
+ * the @genpd's devices' drivers and remove power from @genpd.
+ */
+static int pm_genpd_poweroff(struct generic_pm_domain *genpd)
+{
+	struct generic_pm_domain *parent;
+	struct dev_list_entry *dle;
+	unsigned int not_suspended;
+	int ret;
+
+	if (genpd->power_is_off)
+		return 0;
+
+	if (genpd->sd_count > 0)
+		return -EBUSY;
+
+	not_suspended = 0;
+	list_for_each_entry(dle, &genpd->dev_list, node)
+		if (dle->dev->driver && !pm_runtime_suspended(dle->dev))
+			not_suspended++;
+
+	if (not_suspended > genpd->in_progress)
+		return -EBUSY;
+
+	if (genpd->gov && genpd->gov->power_down_ok) {
+		if (!genpd->gov->power_down_ok(&genpd->domain))
+			return -EAGAIN;
+	}
+
+	list_for_each_entry_reverse(dle, &genpd->dev_list, node) {
+		struct device *dev = dle->dev;
+		struct device_driver *drv = dev->driver;
+
+		if (genpd->start_device)
+			genpd->start_device(dev);
+
+		if (drv && drv->pm && drv->pm->runtime_suspend)
+			ret = drv->pm->runtime_suspend(dev);
+
+		if (genpd->stop_device)
+			genpd->stop_device(dev);
+
+		if (ret)
+			goto err_dev;
+		else
+			dle->need_restore = true;
+	}
+
+	if (genpd->power_off)
+		genpd->power_off(&genpd->domain);
+
+	genpd->power_is_off = true;
+
+	parent = genpd->parent;
+	if (parent) {
+		genpd_sd_counter_dec(parent);
+		if (parent->sd_count = 0)
+			queue_work(pm_wq, &parent->power_off_work);
+	}
+
+	return 0;
+
+ err_dev:
+	list_for_each_entry_continue(dle, &genpd->dev_list, node)
+		__pm_genpd_restore_device(dle, genpd);
+
+	return ret;
+}
+
+/**
+ * genpd_power_off_work_fn - Power off PM domain whose subdomain count is 0.
+ * @work: Work structure used for scheduling the execution of this function.
+ */
+static void genpd_power_off_work_fn(struct work_struct *work)
+{
+	struct generic_pm_domain *genpd;
+
+	genpd = container_of(work, struct generic_pm_domain, power_off_work);
+
+	if (genpd->parent)
+		mutex_lock(&genpd->parent->lock);
+	mutex_lock(&genpd->lock);
+	pm_genpd_poweroff(genpd);
+	mutex_unlock(&genpd->lock);
+	if (genpd->parent)
+		mutex_unlock(&genpd->parent->lock);
+}
+
+/**
+ * pm_genpd_runtime_suspend - Suspend a device belonging to I/O PM domain.
+ * @dev: Device to suspend.
+ *
+ * Carry out a runtime suspend of a device under the assumption that its
+ * pm_domain field points to the domain member of an object of type
+ * struct generic_pm_domain representing a PM domain consisting of I/O devices.
+ */
+static int pm_genpd_runtime_suspend(struct device *dev)
+{
+	struct generic_pm_domain *genpd;
+
+	dev_dbg(dev, "%s()\n", __func__);
+
+	if (IS_ERR_OR_NULL(dev->pm_domain))
+		return -EINVAL;
+
+	genpd = container_of(dev->pm_domain, struct generic_pm_domain, domain);
+
+	if (genpd->parent)
+		mutex_lock(&genpd->parent->lock);
+	mutex_lock(&genpd->lock);
+
+	if (genpd->stop_device) {
+		int ret = genpd->stop_device(dev);
+		if (ret)
+			goto out;
+	}
+	genpd->in_progress++;
+	pm_genpd_poweroff(genpd);
+	genpd->in_progress--;
+
+ out:
+	mutex_unlock(&genpd->lock);
+	if (genpd->parent)
+		mutex_unlock(&genpd->parent->lock);
+
+	return 0;
+}
+
+/**
+ * pm_genpd_poweron - Restore power to a given PM domain and its parents.
+ * @genpd: PM domain to power up.
+ *
+ * Restore power to @genpd and all of its parents so that it is possible to
+ * resume a device belonging to it.
+ */
+static int pm_genpd_poweron(struct generic_pm_domain *genpd)
+{
+	int ret = 0;
+
+ start:
+	if (genpd->parent)
+		mutex_lock(&genpd->parent->lock);
+	mutex_lock(&genpd->lock);
+
+	if (!genpd->power_is_off)
+		goto out;
+
+	if (genpd->parent && genpd->parent->power_is_off) {
+		mutex_unlock(&genpd->lock);
+		mutex_unlock(&genpd->parent->lock);
+
+		ret = pm_genpd_poweron(genpd->parent);
+		if (ret)
+			return ret;
+
+		goto start;
+	}
+
+	if (genpd->power_on) {
+		int ret = genpd->power_on(&genpd->domain);
+		if (ret)
+			goto out;
+	}
+
+	genpd->power_is_off = false;
+	if (genpd->parent)
+		genpd->parent->sd_count++;
+
+ out:
+	mutex_unlock(&genpd->lock);
+	if (genpd->parent)
+		mutex_unlock(&genpd->parent->lock);
+
+	return ret;
+}
+
+/**
+ * pm_genpd_runtime_resume - Resume a device belonging to I/O PM domain.
+ * @dev: Device to resume.
+ *
+ * Carry out a runtime resume of a device under the assumption that its
+ * pm_domain field points to the domain member of an object of type
+ * struct generic_pm_domain representing a PM domain consisting of I/O devices.
+ */
+static int pm_genpd_runtime_resume(struct device *dev)
+{
+	struct generic_pm_domain *genpd;
+	struct dev_list_entry *dle;
+	int ret;
+
+	dev_dbg(dev, "%s()\n", __func__);
+
+	if (IS_ERR_OR_NULL(dev->pm_domain))
+		return -EINVAL;
+
+	genpd = container_of(dev->pm_domain, struct generic_pm_domain, domain);
+
+	ret = pm_genpd_poweron(genpd);
+	if (ret)
+		return ret;
+
+	mutex_lock(&genpd->lock);
+
+	list_for_each_entry(dle, &genpd->dev_list, node) {
+		if (dle->dev = dev) {
+			__pm_genpd_restore_device(dle, genpd);
+			break;
+		}
+	}
+
+	if (genpd->start_device)
+		genpd->start_device(dev);
+
+	mutex_unlock(&genpd->lock);
+
+	return 0;
+}
+
+#else
+
+#define pm_genpd_runtime_suspend	NULL
+#define pm_genpd_runtime_resume		NULL
+
+#endif /* CONFIG_PM_RUNTIME */
+
+/**
+ * pm_genpd_add_device - Add a device to an I/O PM domain.
+ * @genpd: PM domain to add the device to.
+ * @dev: Device to be added.
+ */
+int pm_genpd_add_device(struct generic_pm_domain *genpd, struct device *dev)
+{
+	struct dev_list_entry *dle;
+	int ret = 0;
+
+	dev_dbg(dev, "%s()\n", __func__);
+
+	if (IS_ERR_OR_NULL(genpd) || IS_ERR_OR_NULL(dev))
+		return -EINVAL;
+
+	mutex_lock(&genpd->lock);
+
+	list_for_each_entry(dle, &genpd->dev_list, node)
+		if (dle->dev = dev) {
+			ret = -EINVAL;
+			goto out;
+		}
+
+	dle = kzalloc(sizeof(*dle), GFP_KERNEL);
+	if (!dle) {
+		ret = -ENOMEM;
+		goto out;
+	}
+
+	dle->dev = dev;
+	list_add_tail(&dle->node, &genpd->dev_list);
+
+	spin_lock_irq(&dev->power.lock);
+	dev->pm_domain = &genpd->domain;
+	spin_unlock_irq(&dev->power.lock);
+
+ out:
+	mutex_unlock(&genpd->lock);
+
+	return ret;
+}
+
+/**
+ * pm_genpd_remove_device - Remove a device from an I/O PM domain.
+ * @genpd: PM domain to remove the device from.
+ * @dev: Device to be removed.
+ */
+int pm_genpd_remove_device(struct generic_pm_domain *genpd,
+			   struct device *dev)
+{
+	struct dev_list_entry *dle;
+	int ret = -EINVAL;
+
+	dev_dbg(dev, "%s()\n", __func__);
+
+	if (IS_ERR_OR_NULL(genpd) || IS_ERR_OR_NULL(dev))
+		return -EINVAL;
+
+	mutex_lock(&genpd->lock);
+
+	list_for_each_entry(dle, &genpd->dev_list, node) {
+		if (dle->dev != dev)
+			continue;
+
+		spin_lock_irq(&dev->power.lock);
+		dev->pm_domain = NULL;
+		spin_unlock_irq(&dev->power.lock);
+
+		list_del(&dle->node);
+		kfree(dle);
+
+		ret = 0;
+		break;
+	}
+
+	mutex_unlock(&genpd->lock);
+
+	return ret;
+}
+
+/**
+ * pm_genpd_add_subdomain - Add a subdomain to an I/O PM domain.
+ * @genpd: Master PM domain to add the subdomain to.
+ * @new_subdomain: Subdomain to be added.
+ */
+int pm_genpd_add_subdomain(struct generic_pm_domain *genpd,
+			   struct generic_pm_domain *new_subdomain)
+{
+	struct generic_pm_domain *subdomain;
+	int ret = 0;
+
+	if (IS_ERR_OR_NULL(genpd) || IS_ERR_OR_NULL(new_subdomain))
+		return -EINVAL;
+
+	mutex_lock(&genpd->lock);
+
+	if (genpd->power_is_off && !new_subdomain->power_is_off) {
+		ret = -EINVAL;
+		goto out;
+	}
+
+	list_for_each_entry(subdomain, &genpd->sd_list, sd_node) {
+		if (subdomain = new_subdomain) {
+			ret = -EINVAL;
+			goto out;
+		}
+	}
+
+	mutex_lock(&new_subdomain->lock);
+
+	list_add_tail(&new_subdomain->sd_node, &genpd->sd_list);
+	new_subdomain->parent = genpd;
+	if (!subdomain->power_is_off)
+		genpd->sd_count++;
+
+	mutex_unlock(&new_subdomain->lock);
+
+ out:
+	mutex_unlock(&genpd->lock);
+
+	return ret;
+}
+
+/**
+ * pm_genpd_remove_subdomain - Remove a subdomain from an I/O PM domain.
+ * @genpd: Master PM domain to remove the subdomain from.
+ * @target: Subdomain to be removed.
+ */
+int pm_genpd_remove_subdomain(struct generic_pm_domain *genpd,
+			      struct generic_pm_domain *target)
+{
+	struct generic_pm_domain *subdomain;
+	int ret = -EINVAL;
+
+	if (IS_ERR_OR_NULL(genpd) || IS_ERR_OR_NULL(target))
+		return -EINVAL;
+
+	mutex_lock(&genpd->lock);
+
+	list_for_each_entry(subdomain, &genpd->sd_list, sd_node) {
+		if (subdomain != target)
+			continue;
+
+		mutex_lock(&subdomain->lock);
+
+		list_del(&subdomain->sd_node);
+		subdomain->parent = NULL;
+		if (!subdomain->power_is_off)
+			genpd_sd_counter_dec(genpd);
+
+		mutex_unlock(&subdomain->lock);
+
+		ret = 0;
+		break;
+	}
+
+	mutex_unlock(&genpd->lock);
+
+	return ret;
+}
+
+/**
+ * pm_genpd_init - Initialize a generic I/O PM domain object.
+ * @genpd: PM domain object to initialize.
+ * @gov: PM domain governor to associate with the domain (may be NULL).
+ * @is_off: Initial value of the domain's power_is_off field.
+ */
+void pm_genpd_init(struct generic_pm_domain *genpd,
+		   struct dev_power_governor *gov, bool is_off)
+{
+	if (IS_ERR_OR_NULL(genpd))
+		return;
+
+	INIT_LIST_HEAD(&genpd->sd_node);
+	genpd->parent = NULL;
+	INIT_LIST_HEAD(&genpd->dev_list);
+	INIT_LIST_HEAD(&genpd->sd_list);
+	mutex_init(&genpd->lock);
+	genpd->gov = gov;
+	INIT_WORK(&genpd->power_off_work, genpd_power_off_work_fn);
+	genpd->in_progress = 0;
+	genpd->sd_count = 0;
+	genpd->power_is_off = is_off;
+	genpd->domain.ops.runtime_suspend = pm_genpd_runtime_suspend;
+	genpd->domain.ops.runtime_resume = pm_genpd_runtime_resume;
+	genpd->domain.ops.runtime_idle = pm_generic_runtime_idle;
+}
Index: linux-2.6/kernel/power/Kconfig
=================================--- linux-2.6.orig/kernel/power/Kconfig
+++ linux-2.6/kernel/power/Kconfig
@@ -227,3 +227,7 @@ config PM_OPP
 config PM_RUNTIME_CLK
 	def_bool y
 	depends on PM_RUNTIME && HAVE_CLK
+
+config PM_GENERIC_DOMAINS
+	bool
+	depends on PM


WARNING: multiple messages have this Message-ID (diff)
From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: Linux PM mailing list <linux-pm@lists.linux-foundation.org>
Cc: "Greg Kroah-Hartman" <gregkh@suse.de>,
	Magnus Damm <magnus.damm@gmail.com>,
	Paul Walmsley <paul@pwsan.com>, Kevin Hilman <khilman@ti.com>,
	Alan Stern <stern@rowland.harvard.edu>,
	LKML <linux-kernel@vger.kernel.org>,
	linux-sh@vger.kernel.org
Subject: [PATCH 4/8] PM / Domains: Support for generic I/O PM domains (v5)
Date: Sat, 11 Jun 2011 22:31:10 +0200	[thread overview]
Message-ID: <201106112231.11269.rjw@sisk.pl> (raw)
In-Reply-To: <201106112223.04972.rjw@sisk.pl>

From: Rafael J. Wysocki <rjw@sisk.pl>

Introduce common headers, helper functions and callbacks allowing
platforms to use simple generic power domains for runtime power
management.

Introduce struct generic_pm_domain to be used for representing
power domains that each contain a number of devices and may be
parent domains or subdomains with respect to other power domains.
Among other things, this structure includes callbacks to be
provided by platforms for performing specific tasks related to
power management (i.e. ->stop_device() may disable a device's
clocks, while ->start_device() may enable them, ->power_off() is
supposed to remove power from the entire power domain
and ->power_on() is supposed to restore it).

Introduce functions that can be used as power domain runtime PM
callbacks, pm_genpd_runtime_suspend() and pm_genpd_runtime_resume(),
as well as helper functions for the initialization of a power
domain represented by a struct generic_power_domain object,
adding a device to or removing a device from it and adding or
removing subdomains.

Introduce configuration option CONFIG_PM_GENERIC_DOMAINS to be
selected by the platforms that want to use the new code.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/base/power/Makefile |    1 
 drivers/base/power/domain.c |  467 ++++++++++++++++++++++++++++++++++++++++++++
 include/linux/pm.h          |    3 
 include/linux/pm_domain.h   |   78 +++++++
 kernel/power/Kconfig        |    4 
 5 files changed, 552 insertions(+), 1 deletion(-)

Index: linux-2.6/include/linux/pm_domain.h
===================================================================
--- /dev/null
+++ linux-2.6/include/linux/pm_domain.h
@@ -0,0 +1,78 @@
+/*
+ * pm_domain.h - Definitions and headers related to device power domains.
+ *
+ * Copyright (C) 2011 Rafael J. Wysocki <rjw@sisk.pl>, Renesas Electronics Corp.
+ *
+ * This file is released under the GPLv2.
+ */
+
+#ifndef _LINUX_PM_DOMAIN_H
+#define _LINUX_PM_DOMAIN_H
+
+#include <linux/device.h>
+
+struct dev_power_governor {
+	bool (*power_down_ok)(struct dev_pm_domain *domain);
+};
+
+struct generic_pm_domain {
+	struct dev_pm_domain domain;	/* PM domain operations */
+	struct list_head sd_node;	/* Node in the parent's subdomain list */
+	struct generic_pm_domain *parent;	/* Parent PM domain */
+	struct list_head sd_list;	/* List of dubdomains */
+	struct list_head dev_list;	/* List of devices */
+	struct mutex lock;
+	struct dev_power_governor *gov;
+	struct work_struct power_off_work;
+	unsigned int in_progress;	/* Number of devices being suspended now */
+	unsigned int sd_count;	/* Number of subdomains with power "on" */
+	bool power_is_off;	/* Whether or not power has been removed */
+	int (*power_off)(struct dev_pm_domain *domain);
+	int (*power_on)(struct dev_pm_domain *domain);
+	int (*start_device)(struct device *dev);
+	int (*stop_device)(struct device *dev);
+};
+
+struct dev_list_entry {
+	struct list_head node;
+	struct device *dev;
+	bool need_restore;
+};
+
+#ifdef CONFIG_PM_GENERIC_DOMAINS
+extern int pm_genpd_add_device(struct generic_pm_domain *genpd,
+			       struct device *dev);
+extern int pm_genpd_remove_device(struct generic_pm_domain *genpd,
+				  struct device *dev);
+extern int pm_genpd_add_subdomain(struct generic_pm_domain *genpd,
+				  struct generic_pm_domain *new_subdomain);
+extern int pm_genpd_remove_subdomain(struct generic_pm_domain *genpd,
+				     struct generic_pm_domain *target);
+extern void pm_genpd_init(struct generic_pm_domain *genpd,
+			  struct dev_power_governor *gov, bool is_off);
+#else
+static inline int pm_genpd_add_device(struct generic_pm_domain *genpd,
+				      struct device *dev)
+{
+	return -ENOSYS;
+}
+static inline int pm_genpd_remove_device(struct generic_pm_domain *genpd,
+					 struct device *dev)
+{
+	return -ENOSYS;
+}
+static inline int pm_genpd_add_subdomain(struct generic_pm_domain *genpd,
+					 struct generic_pm_domain *new_sd)
+{
+	return -ENOSYS;
+}
+static inline int pm_genpd_remove_subdomain(struct generic_pm_domain *genpd,
+					    struct generic_pm_domain *target)
+{
+	return -ENOSYS;
+}
+static inline void pm_genpd_init(struct generic_pm_domain *genpd,
+				 struct dev_power_governor *gov, bool is_off) {}
+#endif
+
+#endif /* _LINUX_PM_DOMAIN_H */
Index: linux-2.6/include/linux/pm.h
===================================================================
--- linux-2.6.orig/include/linux/pm.h
+++ linux-2.6/include/linux/pm.h
@@ -472,7 +472,8 @@ extern void update_pm_runtime_accounting
  * subsystem-level and driver-level callbacks.
  */
 struct dev_pm_domain {
-	struct dev_pm_ops	ops;
+	struct dev_pm_ops ops;
+	void *platform_data;
 };
 
 /*
Index: linux-2.6/drivers/base/power/Makefile
===================================================================
--- linux-2.6.orig/drivers/base/power/Makefile
+++ linux-2.6/drivers/base/power/Makefile
@@ -3,6 +3,7 @@ obj-$(CONFIG_PM_SLEEP)	+= main.o wakeup.
 obj-$(CONFIG_PM_RUNTIME)	+= runtime.o
 obj-$(CONFIG_PM_TRACE_RTC)	+= trace.o
 obj-$(CONFIG_PM_OPP)	+= opp.o
+obj-$(CONFIG_PM_GENERIC_DOMAINS)	+=  domain.o
 obj-$(CONFIG_HAVE_CLK)	+= clock_ops.o
 
 ccflags-$(CONFIG_DEBUG_DRIVER) := -DDEBUG
\ No newline at end of file
Index: linux-2.6/drivers/base/power/domain.c
===================================================================
--- /dev/null
+++ linux-2.6/drivers/base/power/domain.c
@@ -0,0 +1,467 @@
+/*
+ * drivers/base/power/domain.c - Common code related to device power domains.
+ *
+ * Copyright (C) 2011 Rafael J. Wysocki <rjw@sisk.pl>, Renesas Electronics Corp.
+ *
+ * This file is released under the GPLv2.
+ */
+
+#include <linux/init.h>
+#include <linux/kernel.h>
+#include <linux/io.h>
+#include <linux/pm_runtime.h>
+#include <linux/pm_domain.h>
+#include <linux/slab.h>
+#include <linux/err.h>
+
+#ifdef CONFIG_PM_RUNTIME
+
+static void genpd_sd_counter_dec(struct generic_pm_domain *genpd)
+{
+	if (!WARN_ON(genpd->sd_count == 0))
+			genpd->sd_count--;
+}
+
+/**
+ * __pm_genpd_restore_device - Restore the pre-suspend state of a device.
+ * @dle: Device list entry of the device to restore the state of.
+ * @genpd: PM domain the device belongs to.
+ */
+static void __pm_genpd_restore_device(struct dev_list_entry *dle,
+				      struct generic_pm_domain *genpd)
+{
+	struct device *dev = dle->dev;
+	struct device_driver *drv = dev->driver;
+
+	if (!dle->need_restore)
+		return;
+
+	if (genpd->start_device)
+		genpd->start_device(dev);
+
+	if (drv && drv->pm && drv->pm->runtime_resume)
+		drv->pm->runtime_resume(dev);
+
+	if (genpd->stop_device)
+		genpd->stop_device(dev);
+
+	dle->need_restore = false;
+}
+
+/**
+ * pm_genpd_poweroff - Remove power from a given PM domain.
+ * @genpd: PM domain to power down.
+ *
+ * If all of the @genpd's devices have been suspended and all of its subdomains
+ * have been powered down, run the runtime suspend callbacks provided by all of
+ * the @genpd's devices' drivers and remove power from @genpd.
+ */
+static int pm_genpd_poweroff(struct generic_pm_domain *genpd)
+{
+	struct generic_pm_domain *parent;
+	struct dev_list_entry *dle;
+	unsigned int not_suspended;
+	int ret;
+
+	if (genpd->power_is_off)
+		return 0;
+
+	if (genpd->sd_count > 0)
+		return -EBUSY;
+
+	not_suspended = 0;
+	list_for_each_entry(dle, &genpd->dev_list, node)
+		if (dle->dev->driver && !pm_runtime_suspended(dle->dev))
+			not_suspended++;
+
+	if (not_suspended > genpd->in_progress)
+		return -EBUSY;
+
+	if (genpd->gov && genpd->gov->power_down_ok) {
+		if (!genpd->gov->power_down_ok(&genpd->domain))
+			return -EAGAIN;
+	}
+
+	list_for_each_entry_reverse(dle, &genpd->dev_list, node) {
+		struct device *dev = dle->dev;
+		struct device_driver *drv = dev->driver;
+
+		if (genpd->start_device)
+			genpd->start_device(dev);
+
+		if (drv && drv->pm && drv->pm->runtime_suspend)
+			ret = drv->pm->runtime_suspend(dev);
+
+		if (genpd->stop_device)
+			genpd->stop_device(dev);
+
+		if (ret)
+			goto err_dev;
+		else
+			dle->need_restore = true;
+	}
+
+	if (genpd->power_off)
+		genpd->power_off(&genpd->domain);
+
+	genpd->power_is_off = true;
+
+	parent = genpd->parent;
+	if (parent) {
+		genpd_sd_counter_dec(parent);
+		if (parent->sd_count == 0)
+			queue_work(pm_wq, &parent->power_off_work);
+	}
+
+	return 0;
+
+ err_dev:
+	list_for_each_entry_continue(dle, &genpd->dev_list, node)
+		__pm_genpd_restore_device(dle, genpd);
+
+	return ret;
+}
+
+/**
+ * genpd_power_off_work_fn - Power off PM domain whose subdomain count is 0.
+ * @work: Work structure used for scheduling the execution of this function.
+ */
+static void genpd_power_off_work_fn(struct work_struct *work)
+{
+	struct generic_pm_domain *genpd;
+
+	genpd = container_of(work, struct generic_pm_domain, power_off_work);
+
+	if (genpd->parent)
+		mutex_lock(&genpd->parent->lock);
+	mutex_lock(&genpd->lock);
+	pm_genpd_poweroff(genpd);
+	mutex_unlock(&genpd->lock);
+	if (genpd->parent)
+		mutex_unlock(&genpd->parent->lock);
+}
+
+/**
+ * pm_genpd_runtime_suspend - Suspend a device belonging to I/O PM domain.
+ * @dev: Device to suspend.
+ *
+ * Carry out a runtime suspend of a device under the assumption that its
+ * pm_domain field points to the domain member of an object of type
+ * struct generic_pm_domain representing a PM domain consisting of I/O devices.
+ */
+static int pm_genpd_runtime_suspend(struct device *dev)
+{
+	struct generic_pm_domain *genpd;
+
+	dev_dbg(dev, "%s()\n", __func__);
+
+	if (IS_ERR_OR_NULL(dev->pm_domain))
+		return -EINVAL;
+
+	genpd = container_of(dev->pm_domain, struct generic_pm_domain, domain);
+
+	if (genpd->parent)
+		mutex_lock(&genpd->parent->lock);
+	mutex_lock(&genpd->lock);
+
+	if (genpd->stop_device) {
+		int ret = genpd->stop_device(dev);
+		if (ret)
+			goto out;
+	}
+	genpd->in_progress++;
+	pm_genpd_poweroff(genpd);
+	genpd->in_progress--;
+
+ out:
+	mutex_unlock(&genpd->lock);
+	if (genpd->parent)
+		mutex_unlock(&genpd->parent->lock);
+
+	return 0;
+}
+
+/**
+ * pm_genpd_poweron - Restore power to a given PM domain and its parents.
+ * @genpd: PM domain to power up.
+ *
+ * Restore power to @genpd and all of its parents so that it is possible to
+ * resume a device belonging to it.
+ */
+static int pm_genpd_poweron(struct generic_pm_domain *genpd)
+{
+	int ret = 0;
+
+ start:
+	if (genpd->parent)
+		mutex_lock(&genpd->parent->lock);
+	mutex_lock(&genpd->lock);
+
+	if (!genpd->power_is_off)
+		goto out;
+
+	if (genpd->parent && genpd->parent->power_is_off) {
+		mutex_unlock(&genpd->lock);
+		mutex_unlock(&genpd->parent->lock);
+
+		ret = pm_genpd_poweron(genpd->parent);
+		if (ret)
+			return ret;
+
+		goto start;
+	}
+
+	if (genpd->power_on) {
+		int ret = genpd->power_on(&genpd->domain);
+		if (ret)
+			goto out;
+	}
+
+	genpd->power_is_off = false;
+	if (genpd->parent)
+		genpd->parent->sd_count++;
+
+ out:
+	mutex_unlock(&genpd->lock);
+	if (genpd->parent)
+		mutex_unlock(&genpd->parent->lock);
+
+	return ret;
+}
+
+/**
+ * pm_genpd_runtime_resume - Resume a device belonging to I/O PM domain.
+ * @dev: Device to resume.
+ *
+ * Carry out a runtime resume of a device under the assumption that its
+ * pm_domain field points to the domain member of an object of type
+ * struct generic_pm_domain representing a PM domain consisting of I/O devices.
+ */
+static int pm_genpd_runtime_resume(struct device *dev)
+{
+	struct generic_pm_domain *genpd;
+	struct dev_list_entry *dle;
+	int ret;
+
+	dev_dbg(dev, "%s()\n", __func__);
+
+	if (IS_ERR_OR_NULL(dev->pm_domain))
+		return -EINVAL;
+
+	genpd = container_of(dev->pm_domain, struct generic_pm_domain, domain);
+
+	ret = pm_genpd_poweron(genpd);
+	if (ret)
+		return ret;
+
+	mutex_lock(&genpd->lock);
+
+	list_for_each_entry(dle, &genpd->dev_list, node) {
+		if (dle->dev == dev) {
+			__pm_genpd_restore_device(dle, genpd);
+			break;
+		}
+	}
+
+	if (genpd->start_device)
+		genpd->start_device(dev);
+
+	mutex_unlock(&genpd->lock);
+
+	return 0;
+}
+
+#else
+
+#define pm_genpd_runtime_suspend	NULL
+#define pm_genpd_runtime_resume		NULL
+
+#endif /* CONFIG_PM_RUNTIME */
+
+/**
+ * pm_genpd_add_device - Add a device to an I/O PM domain.
+ * @genpd: PM domain to add the device to.
+ * @dev: Device to be added.
+ */
+int pm_genpd_add_device(struct generic_pm_domain *genpd, struct device *dev)
+{
+	struct dev_list_entry *dle;
+	int ret = 0;
+
+	dev_dbg(dev, "%s()\n", __func__);
+
+	if (IS_ERR_OR_NULL(genpd) || IS_ERR_OR_NULL(dev))
+		return -EINVAL;
+
+	mutex_lock(&genpd->lock);
+
+	list_for_each_entry(dle, &genpd->dev_list, node)
+		if (dle->dev == dev) {
+			ret = -EINVAL;
+			goto out;
+		}
+
+	dle = kzalloc(sizeof(*dle), GFP_KERNEL);
+	if (!dle) {
+		ret = -ENOMEM;
+		goto out;
+	}
+
+	dle->dev = dev;
+	list_add_tail(&dle->node, &genpd->dev_list);
+
+	spin_lock_irq(&dev->power.lock);
+	dev->pm_domain = &genpd->domain;
+	spin_unlock_irq(&dev->power.lock);
+
+ out:
+	mutex_unlock(&genpd->lock);
+
+	return ret;
+}
+
+/**
+ * pm_genpd_remove_device - Remove a device from an I/O PM domain.
+ * @genpd: PM domain to remove the device from.
+ * @dev: Device to be removed.
+ */
+int pm_genpd_remove_device(struct generic_pm_domain *genpd,
+			   struct device *dev)
+{
+	struct dev_list_entry *dle;
+	int ret = -EINVAL;
+
+	dev_dbg(dev, "%s()\n", __func__);
+
+	if (IS_ERR_OR_NULL(genpd) || IS_ERR_OR_NULL(dev))
+		return -EINVAL;
+
+	mutex_lock(&genpd->lock);
+
+	list_for_each_entry(dle, &genpd->dev_list, node) {
+		if (dle->dev != dev)
+			continue;
+
+		spin_lock_irq(&dev->power.lock);
+		dev->pm_domain = NULL;
+		spin_unlock_irq(&dev->power.lock);
+
+		list_del(&dle->node);
+		kfree(dle);
+
+		ret = 0;
+		break;
+	}
+
+	mutex_unlock(&genpd->lock);
+
+	return ret;
+}
+
+/**
+ * pm_genpd_add_subdomain - Add a subdomain to an I/O PM domain.
+ * @genpd: Master PM domain to add the subdomain to.
+ * @new_subdomain: Subdomain to be added.
+ */
+int pm_genpd_add_subdomain(struct generic_pm_domain *genpd,
+			   struct generic_pm_domain *new_subdomain)
+{
+	struct generic_pm_domain *subdomain;
+	int ret = 0;
+
+	if (IS_ERR_OR_NULL(genpd) || IS_ERR_OR_NULL(new_subdomain))
+		return -EINVAL;
+
+	mutex_lock(&genpd->lock);
+
+	if (genpd->power_is_off && !new_subdomain->power_is_off) {
+		ret = -EINVAL;
+		goto out;
+	}
+
+	list_for_each_entry(subdomain, &genpd->sd_list, sd_node) {
+		if (subdomain == new_subdomain) {
+			ret = -EINVAL;
+			goto out;
+		}
+	}
+
+	mutex_lock(&new_subdomain->lock);
+
+	list_add_tail(&new_subdomain->sd_node, &genpd->sd_list);
+	new_subdomain->parent = genpd;
+	if (!subdomain->power_is_off)
+		genpd->sd_count++;
+
+	mutex_unlock(&new_subdomain->lock);
+
+ out:
+	mutex_unlock(&genpd->lock);
+
+	return ret;
+}
+
+/**
+ * pm_genpd_remove_subdomain - Remove a subdomain from an I/O PM domain.
+ * @genpd: Master PM domain to remove the subdomain from.
+ * @target: Subdomain to be removed.
+ */
+int pm_genpd_remove_subdomain(struct generic_pm_domain *genpd,
+			      struct generic_pm_domain *target)
+{
+	struct generic_pm_domain *subdomain;
+	int ret = -EINVAL;
+
+	if (IS_ERR_OR_NULL(genpd) || IS_ERR_OR_NULL(target))
+		return -EINVAL;
+
+	mutex_lock(&genpd->lock);
+
+	list_for_each_entry(subdomain, &genpd->sd_list, sd_node) {
+		if (subdomain != target)
+			continue;
+
+		mutex_lock(&subdomain->lock);
+
+		list_del(&subdomain->sd_node);
+		subdomain->parent = NULL;
+		if (!subdomain->power_is_off)
+			genpd_sd_counter_dec(genpd);
+
+		mutex_unlock(&subdomain->lock);
+
+		ret = 0;
+		break;
+	}
+
+	mutex_unlock(&genpd->lock);
+
+	return ret;
+}
+
+/**
+ * pm_genpd_init - Initialize a generic I/O PM domain object.
+ * @genpd: PM domain object to initialize.
+ * @gov: PM domain governor to associate with the domain (may be NULL).
+ * @is_off: Initial value of the domain's power_is_off field.
+ */
+void pm_genpd_init(struct generic_pm_domain *genpd,
+		   struct dev_power_governor *gov, bool is_off)
+{
+	if (IS_ERR_OR_NULL(genpd))
+		return;
+
+	INIT_LIST_HEAD(&genpd->sd_node);
+	genpd->parent = NULL;
+	INIT_LIST_HEAD(&genpd->dev_list);
+	INIT_LIST_HEAD(&genpd->sd_list);
+	mutex_init(&genpd->lock);
+	genpd->gov = gov;
+	INIT_WORK(&genpd->power_off_work, genpd_power_off_work_fn);
+	genpd->in_progress = 0;
+	genpd->sd_count = 0;
+	genpd->power_is_off = is_off;
+	genpd->domain.ops.runtime_suspend = pm_genpd_runtime_suspend;
+	genpd->domain.ops.runtime_resume = pm_genpd_runtime_resume;
+	genpd->domain.ops.runtime_idle = pm_generic_runtime_idle;
+}
Index: linux-2.6/kernel/power/Kconfig
===================================================================
--- linux-2.6.orig/kernel/power/Kconfig
+++ linux-2.6/kernel/power/Kconfig
@@ -227,3 +227,7 @@ config PM_OPP
 config PM_RUNTIME_CLK
 	def_bool y
 	depends on PM_RUNTIME && HAVE_CLK
+
+config PM_GENERIC_DOMAINS
+	bool
+	depends on PM


  parent reply	other threads:[~2011-06-11 20:31 UTC|newest]

Thread overview: 261+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-11 20:23 [PATCH 0/8] PM / Domains: Support for generic I/O PM domains (v5) Rafael J. Wysocki
2011-06-11 20:23 ` Rafael J. Wysocki
2011-06-11 20:23 ` Rafael J. Wysocki
2011-06-11 20:25 ` [PATCH 1/8] PM / Domains: Update documentation Rafael J. Wysocki
2011-06-11 20:25   ` Rafael J. Wysocki
2011-06-11 20:25 ` Rafael J. Wysocki
2011-06-11 20:26 ` [PATCH 2/8] PM / Domains: Rename struct dev_power_domain to struct dev_pm_domain Rafael J. Wysocki
2011-06-11 20:26   ` Rafael J. Wysocki
2011-06-20 23:37   ` Kevin Hilman
2011-06-20 23:37   ` Kevin Hilman
2011-06-20 23:37     ` Kevin Hilman
2011-06-11 20:26 ` Rafael J. Wysocki
2011-06-11 20:27 ` [PATCH 3/8] PM: subsys_data in struct dev_pm_info need not depend on RM_RUNTIME Rafael J. Wysocki
2011-06-11 20:27   ` Rafael J. Wysocki
2011-06-11 20:27 ` Rafael J. Wysocki
2011-06-11 20:31 ` [PATCH 4/8] PM / Domains: Support for generic I/O PM domains (v5) Rafael J. Wysocki
2011-06-11 20:31 ` Rafael J. Wysocki [this message]
2011-06-11 20:31   ` Rafael J. Wysocki
2011-06-19 22:02   ` [Update][PATCH 4/8] PM / Domains: Support for generic I/O PM domains (v6) Rafael J. Wysocki
2011-06-19 22:02   ` Rafael J. Wysocki
2011-06-19 22:02     ` Rafael J. Wysocki
2011-06-21 17:42     ` Kevin Hilman
2011-06-21 17:42     ` Kevin Hilman
2011-06-21 17:42       ` Kevin Hilman
2011-06-22  0:07       ` Rafael J. Wysocki
2011-06-22  0:07         ` Rafael J. Wysocki
2011-06-22 19:51         ` Kevin Hilman
2011-06-22 19:51         ` Kevin Hilman
2011-06-22 19:51           ` Kevin Hilman
2011-06-22 21:30           ` Rafael J. Wysocki
2011-06-22 21:30           ` Rafael J. Wysocki
2011-06-22 21:30             ` Rafael J. Wysocki
2011-06-22  0:07       ` Rafael J. Wysocki
2011-06-11 20:36 ` [PATCH 5/8] PM: Introduce generic "noirq" callback routines for subsystems Rafael J. Wysocki
2011-06-11 20:36   ` Rafael J. Wysocki
2011-06-11 20:36 ` Rafael J. Wysocki
2011-06-11 20:37 ` [PATCH 6/8] PM / Domains: Move code from under #ifdef CONFIG_PM_RUNTIME Rafael J. Wysocki
2011-06-11 20:37 ` Rafael J. Wysocki
2011-06-11 20:37   ` Rafael J. Wysocki
2011-06-11 20:39 ` [PATCH 7/8] PM / Domains: System-wide transitions support for generic PM domains Rafael J. Wysocki
2011-06-11 20:39   ` Rafael J. Wysocki
2011-06-11 23:28   ` [Update][PATCH 7/8] PM / Domains: System-wide transitions support for generic domains (v2) Rafael J. Wysocki
2011-06-11 23:28   ` Rafael J. Wysocki
2011-06-11 23:28     ` Rafael J. Wysocki
2011-06-19 22:06   ` [Update][PATCH 7/8] PM / Domains: System-wide transitions support for generic domains (v3) Rafael J. Wysocki
2011-06-19 22:06     ` Rafael J. Wysocki
2011-06-20 23:05     ` Rafael J. Wysocki
2011-06-20 23:05       ` Rafael J. Wysocki
2011-06-20 23:05     ` Rafael J. Wysocki
2011-06-22 21:50     ` Kevin Hilman
2011-06-22 21:50     ` Kevin Hilman
2011-06-22 21:50       ` Kevin Hilman
2011-06-22 22:16       ` Rafael J. Wysocki
2011-06-22 22:16       ` Rafael J. Wysocki
2011-06-22 22:16         ` Rafael J. Wysocki
2011-06-22 22:18         ` Kevin Hilman
2011-06-22 22:18           ` Kevin Hilman
2011-06-22 22:22           ` Rafael J. Wysocki
2011-06-22 22:22             ` Rafael J. Wysocki
2011-06-23 13:57             ` [PATCH] PM / Runtime: Update documentation of interactions with system sleep Rafael J. Wysocki
2011-06-23 13:57               ` Rafael J. Wysocki
2011-06-24 18:25               ` Kevin Hilman
2011-06-24 18:25               ` Kevin Hilman
2011-06-24 18:25                 ` Kevin Hilman
2011-06-23 13:57             ` Rafael J. Wysocki
2011-06-22 22:22           ` [Update][PATCH 7/8] PM / Domains: System-wide transitions support for generic domains (v3) Rafael J. Wysocki
2011-06-22 22:18         ` Kevin Hilman
2011-06-23 14:19         ` Alan Stern
2011-06-23 14:19         ` [Update][PATCH 7/8] PM / Domains: System-wide transitions support Alan Stern
2011-06-23 14:19           ` [Update][PATCH 7/8] PM / Domains: System-wide transitions support for generic domains (v3) Alan Stern
2011-06-23 14:44           ` Rafael J. Wysocki
2011-06-23 14:44           ` Rafael J. Wysocki
2011-06-23 14:44             ` Rafael J. Wysocki
2011-06-23 15:11             ` Alan Stern
2011-06-23 15:11             ` [Update][PATCH 7/8] PM / Domains: System-wide transitions support Alan Stern
2011-06-23 15:11               ` [Update][PATCH 7/8] PM / Domains: System-wide transitions support for generic domains (v3) Alan Stern
2011-06-23 17:41               ` Rafael J. Wysocki
2011-06-23 17:41               ` Rafael J. Wysocki
2011-06-23 17:41                 ` Rafael J. Wysocki
2011-06-23 18:22                 ` Alan Stern
2011-06-23 18:22                 ` [Update][PATCH 7/8] PM / Domains: System-wide transitions support Alan Stern
2011-06-23 18:22                   ` [Update][PATCH 7/8] PM / Domains: System-wide transitions support for generic domains (v3) Alan Stern
2011-06-23 21:03                   ` Rafael J. Wysocki
2011-06-23 21:03                   ` Rafael J. Wysocki
2011-06-23 21:03                     ` Rafael J. Wysocki
2011-06-19 22:06   ` Rafael J. Wysocki
2011-06-11 20:39 ` [PATCH 7/8] PM / Domains: System-wide transitions support for generic PM domains Rafael J. Wysocki
2011-06-11 20:40 ` [PATCH 8/8] ARM / shmobile: Support for I/O PM domains for SH7372 (v5) Rafael J. Wysocki
2011-06-11 20:40 ` Rafael J. Wysocki
2011-06-11 20:40   ` Rafael J. Wysocki
2011-06-14 13:12   ` Magnus Damm
2011-06-14 13:12     ` Magnus Damm
2011-06-14 21:16     ` Rafael J. Wysocki
2011-06-14 21:16     ` Rafael J. Wysocki
2011-06-14 21:16       ` Rafael J. Wysocki
2011-06-15 14:17       ` Magnus Damm
2011-06-15 14:17         ` Magnus Damm
2011-06-15 23:06         ` Rafael J. Wysocki
2011-06-15 23:06           ` Rafael J. Wysocki
2011-06-19 22:07           ` [Update][PATCH 8/8] ARM / shmobile: Support for I/O power domains for SH7372 (v6) Rafael J. Wysocki
2011-06-19 22:07             ` Rafael J. Wysocki
2011-06-20  2:01             ` Paul Mundt
2011-06-20  2:01               ` Paul Mundt
2011-06-20 22:30               ` Rafael J. Wysocki
2011-06-20 22:30                 ` Rafael J. Wysocki
2011-06-21 11:57                 ` Rafael J. Wysocki
2011-06-21 11:57                   ` Rafael J. Wysocki
2011-06-21 12:47                   ` Paul Mundt
2011-06-21 12:47                   ` Paul Mundt
2011-06-21 12:47                     ` Paul Mundt
2011-06-21 11:57                 ` Rafael J. Wysocki
2011-06-20 22:30               ` Rafael J. Wysocki
2011-06-20  2:01             ` Paul Mundt
2011-06-19 22:07           ` Rafael J. Wysocki
2011-06-15 23:06         ` [PATCH 8/8] ARM / shmobile: Support for I/O PM domains for SH7372 (v5) Rafael J. Wysocki
2011-07-10 11:45         ` Laurent Pinchart
2011-07-10 11:45         ` Laurent Pinchart
2011-07-10 11:45           ` Laurent Pinchart
2011-06-15 14:17       ` Magnus Damm
2011-06-14 13:12   ` Magnus Damm
2011-06-11 20:57 ` [PATCH 0/8] PM / Domains: Support for generic I/O PM domains (v5) Greg KH
2011-06-11 20:57 ` Greg KH
2011-06-11 20:57   ` Greg KH
2011-06-21  0:02 ` Kevin Hilman
2011-06-21  0:02 ` Kevin Hilman
2011-06-21  0:02   ` Kevin Hilman
2011-06-21 11:06   ` Rafael J. Wysocki
2011-06-21 11:06   ` Rafael J. Wysocki
2011-06-21 11:06     ` Rafael J. Wysocki
2011-06-21 14:47     ` Kevin Hilman
2011-06-21 14:47     ` [PATCH 0/8] PM / Domains: Support for generic I/O PM domains Kevin Hilman
2011-06-21 14:47       ` [PATCH 0/8] PM / Domains: Support for generic I/O PM domains (v5) Kevin Hilman
2011-06-25 21:24 ` [PATCH 0/10 v6] PM / Domains: Support for generic I/O PM domains Rafael J. Wysocki
2011-06-25 21:24   ` Rafael J. Wysocki
2011-06-25 21:24   ` [PATCH 1/10 v6] PM / Domains: Rename struct dev_power_domain to struct dev_pm_domain Rafael J. Wysocki
2011-06-25 21:24   ` Rafael J. Wysocki
2011-06-25 21:24     ` Rafael J. Wysocki
2011-06-25 21:25   ` [PATCH 2/10 v6] PM: subsys_data in struct dev_pm_info need not depend on RM_RUNTIME Rafael J. Wysocki
2011-06-25 21:25   ` Rafael J. Wysocki
2011-06-25 21:25     ` Rafael J. Wysocki
2011-06-25 21:26   ` [PATCH 3/10 v6] PM / Domains: Support for generic I/O PM domains (v7) Rafael J. Wysocki
2011-06-25 21:26   ` Rafael J. Wysocki
2011-06-25 21:26     ` Rafael J. Wysocki
2011-06-30  6:14     ` Ming Lei
2011-06-30  6:14       ` Ming Lei
2011-06-30 18:58       ` Rafael J. Wysocki
2011-06-30 18:58       ` Rafael J. Wysocki
2011-06-30 18:58         ` Rafael J. Wysocki
2011-06-30  6:14     ` Ming Lei
2011-07-01 18:11     ` Kevin Hilman
2011-07-01 18:11       ` Kevin Hilman
2011-07-01 20:03       ` Rafael J. Wysocki
2011-07-01 20:03         ` Rafael J. Wysocki
2011-07-01 20:03       ` Rafael J. Wysocki
2011-07-01 18:11     ` Kevin Hilman
2011-06-25 21:27   ` [PATCH 4/10 v6] PM: Introduce generic "noirq" callback routines for subsystems (v2) Rafael J. Wysocki
2011-06-25 21:27   ` Rafael J. Wysocki
2011-06-25 21:27     ` Rafael J. Wysocki
2011-06-25 21:27   ` [PATCH 5/10 v6] PM / Domains: Move code from under #ifdef CONFIG_PM_RUNTIME (v2) Rafael J. Wysocki
2011-06-25 21:27     ` Rafael J. Wysocki
2011-06-25 21:27     ` Rafael J. Wysocki
2011-06-25 21:28   ` [PATCH 6/10 v6] PM / Domains: System-wide transitions support for generic domains (v4) Rafael J. Wysocki
2011-06-25 21:28     ` Rafael J. Wysocki
2011-06-28 23:44     ` [Update][PATCH 6/10] PM / Domains: System-wide transitions support for generic domains (v5) Rafael J. Wysocki
2011-06-28 23:44     ` Rafael J. Wysocki
2011-06-28 23:44       ` Rafael J. Wysocki
2011-07-08  0:29       ` Kevin Hilman
2011-07-08  0:29         ` Kevin Hilman
2011-07-08  9:24         ` Rafael J. Wysocki
2011-07-08  9:24         ` Rafael J. Wysocki
2011-07-08  9:24           ` Rafael J. Wysocki
2011-07-08 14:37           ` [Update][PATCH 6/10] PM / Domains: System-wide transitions Alan Stern
2011-07-08 14:37             ` [Update][PATCH 6/10] PM / Domains: System-wide transitions support for generic domains (v5) Alan Stern
2011-07-08 17:20             ` Kevin Hilman
2011-07-08 17:20             ` Kevin Hilman
2011-07-08 17:20               ` Kevin Hilman
2011-07-08 18:06               ` Rafael J. Wysocki
2011-07-08 18:06                 ` Rafael J. Wysocki
2011-07-08 19:24                 ` Rafael J. Wysocki
2011-07-08 19:24                 ` Rafael J. Wysocki
2011-07-08 19:24                   ` Rafael J. Wysocki
2011-07-09 14:15                   ` Rafael J. Wysocki
2011-07-09 14:15                   ` Rafael J. Wysocki
2011-07-09 14:15                     ` Rafael J. Wysocki
2011-07-11 15:37                     ` Kevin Hilman
2011-07-11 15:37                     ` Kevin Hilman
2011-07-11 15:37                       ` Kevin Hilman
2011-07-11 19:39                       ` Rafael J. Wysocki
2011-07-11 19:39                         ` Rafael J. Wysocki
2011-07-11 19:39                       ` Rafael J. Wysocki
2011-07-08 18:06               ` Rafael J. Wysocki
2011-07-08 17:56             ` Rafael J. Wysocki
2011-07-08 17:56             ` Rafael J. Wysocki
2011-07-08 17:56               ` Rafael J. Wysocki
2011-07-08 14:37           ` Alan Stern
2011-07-08  0:29       ` Kevin Hilman
2011-06-25 21:28   ` [PATCH 6/10 v6] PM / Domains: System-wide transitions support for generic domains (v4) Rafael J. Wysocki
2011-06-25 21:29   ` [PATCH 7/10 v6] PM / Domains: Don't stop wakeup devices during system sleep transitions Rafael J. Wysocki
2011-06-25 21:29   ` Rafael J. Wysocki
2011-06-25 21:29     ` Rafael J. Wysocki
2011-06-29 23:50     ` Kevin Hilman
2011-06-29 23:50       ` Kevin Hilman
2011-06-30 19:37       ` Rafael J. Wysocki
2011-06-30 19:37       ` Rafael J. Wysocki
2011-06-30 19:37         ` Rafael J. Wysocki
2011-06-30 22:42         ` Kevin Hilman
2011-06-30 22:42         ` Kevin Hilman
2011-06-30 22:42           ` Kevin Hilman
2011-06-30 22:55           ` Rafael J. Wysocki
2011-06-30 22:55           ` Rafael J. Wysocki
2011-06-30 22:55             ` Rafael J. Wysocki
2011-06-30 23:14             ` Kevin Hilman
2011-06-30 23:14             ` Kevin Hilman
2011-06-30 23:14               ` Kevin Hilman
2011-06-30 23:28               ` Rafael J. Wysocki
2011-06-30 23:28               ` Rafael J. Wysocki
2011-06-30 23:28                 ` Rafael J. Wysocki
2011-07-01  0:01                 ` Kevin Hilman
2011-07-01  0:01                   ` Kevin Hilman
2011-07-01  0:01                   ` Kevin Hilman
2011-07-01  0:24                   ` Rafael J. Wysocki
2011-07-01  0:24                   ` Rafael J. Wysocki
2011-07-01  0:24                     ` Rafael J. Wysocki
2011-07-01 14:34                     ` Kevin Hilman
2011-07-01 14:34                       ` Kevin Hilman
2011-07-01 14:34                     ` Kevin Hilman
2011-06-30 23:25             ` Rafael J. Wysocki
2011-06-30 23:25             ` Rafael J. Wysocki
2011-06-30 23:25               ` Rafael J. Wysocki
2011-07-01 14:45               ` [PATCH 7/10 v6] PM / Domains: Don't stop wakeup devices during Alan Stern
2011-07-01 14:45                 ` [PATCH 7/10 v6] PM / Domains: Don't stop wakeup devices during system sleep transitions Alan Stern
2011-07-01 20:06                 ` Rafael J. Wysocki
2011-07-01 20:06                   ` Rafael J. Wysocki
2011-07-01 20:06                 ` Rafael J. Wysocki
2011-07-01 14:45               ` Alan Stern
2011-06-29 23:50     ` Kevin Hilman
2011-06-25 21:30   ` [PATCH 8/10 v6] PM: Allow the clocks management code to be used during system suspend Rafael J. Wysocki
2011-06-25 21:30     ` Rafael J. Wysocki
2011-06-25 21:30   ` Rafael J. Wysocki
2011-06-25 21:30   ` [PATCH 9/10 v6] PM: Rename clock management functions Rafael J. Wysocki
2011-06-25 21:30   ` Rafael J. Wysocki
2011-06-25 21:30     ` Rafael J. Wysocki
2011-06-25 21:31   ` [PATCH 10/10 v6] ARM / shmobile: Support for I/O power domains for SH7372 (v8) Rafael J. Wysocki
2011-06-25 21:31     ` Rafael J. Wysocki
2011-06-27  4:07     ` [PATCH 10/10 v6] ARM / shmobile: Support for I/O power domains Magnus Damm
2011-06-27  4:07       ` [PATCH 10/10 v6] ARM / shmobile: Support for I/O power domains for SH7372 (v8) Magnus Damm
2011-06-27  4:07       ` Magnus Damm
2011-06-27 19:25       ` Rafael J. Wysocki
2011-06-27 19:25       ` Rafael J. Wysocki
2011-06-27 19:25         ` Rafael J. Wysocki
2011-06-27 23:21         ` [PATCH 10/10 v6] ARM / shmobile: Support for I/O power domains Magnus Damm
2011-06-27 23:21           ` [PATCH 10/10 v6] ARM / shmobile: Support for I/O power domains for SH7372 (v8) Magnus Damm
2011-06-27 23:21           ` Magnus Damm
2011-06-28 10:08           ` Rafael J. Wysocki
2011-06-28 10:08             ` Rafael J. Wysocki
2011-06-28 10:08           ` Rafael J. Wysocki
2011-06-25 21:31   ` Rafael J. Wysocki
2011-07-01 18:27   ` [PATCH 0/10 v6] PM / Domains: Support for generic I/O PM domains Kevin Hilman
2011-07-01 18:27   ` Kevin Hilman
2011-07-01 18:27     ` Kevin Hilman
2011-06-25 21:24 ` Rafael J. Wysocki

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201106112231.11269.rjw@sisk.pl \
    --to=rjw@sisk.pl \
    --cc=gregkh@suse.de \
    --cc=khilman@ti.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@lists.linux-foundation.org \
    --cc=linux-sh@vger.kernel.org \
    --cc=magnus.damm@gmail.com \
    --cc=paul@pwsan.com \
    --cc=stern@rowland.harvard.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.