Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 431bf99d authored by Linus Torvalds's avatar Linus Torvalds
Browse files
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/suspend-2.6: (51 commits)
  PM: Improve error code of pm_notifier_call_chain()
  PM: Add "RTC" to PM trace time stamps to avoid confusion
  PM / Suspend: Export suspend_set_ops, suspend_valid_only_mem
  PM / Suspend: Add .suspend_again() callback to suspend_ops
  PM / OPP: Introduce function to free cpufreq table
  ARM / shmobile: Return -EBUSY from A4LC power off if A3RV is active
  PM / Domains: Take .power_off() error code into account
  ARM / shmobile: Use genpd_queue_power_off_work()
  ARM / shmobile: Use pm_genpd_poweroff_unused()
  PM / Domains: Introduce function to power off all unused PM domains
  OMAP: PM: disable idle on suspend for GPIO and UART
  OMAP: PM: omap_device: add API to disable idle on suspend
  OMAP: PM: omap_device: add system PM methods for PM domain handling
  OMAP: PM: omap_device: conditionally use PM domain runtime helpers
  PM / Runtime: Add new helper function: pm_runtime_status_suspended()
  PM / Domains: Queue up power off work only if it is not pending
  PM / Domains: Improve handling of wakeup devices during system suspend
  PM / Domains: Do not restore all devices on power off error
  PM / Domains: Allow callbacks to execute all runtime PM helpers
  PM / Domains: Do not execute device callbacks under locks
  ...
parents 72f96e0e 7ae033cc
Loading
Loading
Loading
Loading
+7 −7
Original line number Diff line number Diff line
@@ -506,8 +506,8 @@ routines. Nevertheless, different callback pointers are used in case there is a
situation where it actually matters.


Device Power Domains
--------------------
Device Power Management Domains
-------------------------------
Sometimes devices share reference clocks or other power resources.  In those
cases it generally is not possible to put devices into low-power states
individually.  Instead, a set of devices sharing a power resource can be put
@@ -516,8 +516,8 @@ power resource. Of course, they also need to be put into the full-power state
together, by turning the shared power resource on.  A set of devices with this
property is often referred to as a power domain.

Support for power domains is provided through the pwr_domain field of struct
device.  This field is a pointer to an object of type struct dev_power_domain,
Support for power domains is provided through the pm_domain field of struct
device.  This field is a pointer to an object of type struct dev_pm_domain,
defined in include/linux/pm.h, providing a set of power management callbacks
analogous to the subsystem-level and device driver callbacks that are executed
for the given device during all power transitions, instead of the respective
@@ -604,7 +604,7 @@ state temporarily, for example so that its system wakeup capability can be
disabled.  This all depends on the hardware and the design of the subsystem and
device driver in question.

During system-wide resume from a sleep state it's best to put devices into the
full-power state, as explained in Documentation/power/runtime_pm.txt.  Refer to
that document for more information regarding this particular issue as well as
During system-wide resume from a sleep state it's easiest to put devices into
the full-power state, as explained in Documentation/power/runtime_pm.txt.  Refer
to that document for more information regarding this particular issue as well as
for information on the device runtime power management framework in general.
+2 −0
Original line number Diff line number Diff line
@@ -321,6 +321,8 @@ opp_init_cpufreq_table - cpufreq framework typically is initialized with
	addition to CONFIG_PM as power management feature is required to
	dynamically scale voltage and frequency in a system.

opp_free_cpufreq_table - Free up the table allocated by opp_init_cpufreq_table

7. Data Structures
==================
Typically an SoC contains multiple voltage domains which are variable. Each
+152 −77

File changed.

Preview size limit exceeded, changes collapsed.

+1 −0
Original line number Diff line number Diff line
@@ -642,6 +642,7 @@ config ARCH_SHMOBILE
	select NO_IOPORT
	select SPARSE_IRQ
	select MULTI_IRQ_HANDLER
	select PM_GENERIC_DOMAINS if PM
	help
	  Support for Renesas's SH-Mobile and R-Mobile ARM platforms.

+7 −7
Original line number Diff line number Diff line
@@ -32,7 +32,7 @@ static int omap1_pm_runtime_suspend(struct device *dev)
	if (ret)
		return ret;

	ret = pm_runtime_clk_suspend(dev);
	ret = pm_clk_suspend(dev);
	if (ret) {
		pm_generic_runtime_resume(dev);
		return ret;
@@ -45,24 +45,24 @@ static int omap1_pm_runtime_resume(struct device *dev)
{
	dev_dbg(dev, "%s\n", __func__);

	pm_runtime_clk_resume(dev);
	pm_clk_resume(dev);
	return pm_generic_runtime_resume(dev);
}

static struct dev_power_domain default_power_domain = {
static struct dev_pm_domain default_pm_domain = {
	.ops = {
		.runtime_suspend = omap1_pm_runtime_suspend,
		.runtime_resume = omap1_pm_runtime_resume,
		USE_PLATFORM_PM_SLEEP_OPS
	},
};
#define OMAP1_PWR_DOMAIN (&default_power_domain)
#define OMAP1_PM_DOMAIN (&default_pm_domain)
#else
#define OMAP1_PWR_DOMAIN NULL
#define OMAP1_PM_DOMAIN NULL
#endif /* CONFIG_PM_RUNTIME */

static struct pm_clk_notifier_block platform_bus_notifier = {
	.pwr_domain = OMAP1_PWR_DOMAIN,
	.pm_domain = OMAP1_PM_DOMAIN,
	.con_ids = { "ick", "fck", NULL, },
};

@@ -71,7 +71,7 @@ static int __init omap1_pm_runtime_init(void)
	if (!cpu_class_is_omap1())
		return -ENODEV;

	pm_runtime_clk_add_notifier(&platform_bus_type, &platform_bus_notifier);
	pm_clk_add_notifier(&platform_bus_type, &platform_bus_notifier);

	return 0;
}
Loading