aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Documentation/power/devices.txt8
-rw-r--r--arch/arm/mach-omap1/pm_bus.c8
-rw-r--r--arch/arm/mach-shmobile/pm_runtime.c8
-rw-r--r--arch/arm/plat-omap/omap_device.c4
-rw-r--r--arch/sh/kernel/cpu/shmobile/pm_runtime.c6
-rw-r--r--drivers/base/power/clock_ops.c14
-rw-r--r--drivers/base/power/main.c30
-rw-r--r--drivers/base/power/runtime.c12
-rw-r--r--include/linux/device.h4
-rw-r--r--include/linux/pm.h2
-rw-r--r--include/linux/pm_runtime.h2
11 files changed, 49 insertions, 49 deletions
diff --git a/Documentation/power/devices.txt b/Documentation/power/devices.txt
index 64565aac6e40..85c6f980b642 100644
--- a/Documentation/power/devices.txt
+++ b/Documentation/power/devices.txt
@@ -506,8 +506,8 @@ routines. Nevertheless, different callback pointers are used in case there is a
506situation where it actually matters. 506situation where it actually matters.
507 507
508 508
509Device Power Domains 509Device Power Management Domains
510-------------------- 510-------------------------------
511Sometimes devices share reference clocks or other power resources. In those 511Sometimes devices share reference clocks or other power resources. In those
512cases it generally is not possible to put devices into low-power states 512cases it generally is not possible to put devices into low-power states
513individually. Instead, a set of devices sharing a power resource can be put 513individually. 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
516together, by turning the shared power resource on. A set of devices with this 516together, by turning the shared power resource on. A set of devices with this
517property is often referred to as a power domain. 517property is often referred to as a power domain.
518 518
519Support for power domains is provided through the pwr_domain field of struct 519Support for power domains is provided through the pm_domain field of struct
520device. This field is a pointer to an object of type struct dev_power_domain, 520device. This field is a pointer to an object of type struct dev_pm_domain,
521defined in include/linux/pm.h, providing a set of power management callbacks 521defined in include/linux/pm.h, providing a set of power management callbacks
522analogous to the subsystem-level and device driver callbacks that are executed 522analogous to the subsystem-level and device driver callbacks that are executed
523for the given device during all power transitions, instead of the respective 523for the given device during all power transitions, instead of the respective
diff --git a/arch/arm/mach-omap1/pm_bus.c b/arch/arm/mach-omap1/pm_bus.c
index 334fb8871bc3..212f33103712 100644
--- a/arch/arm/mach-omap1/pm_bus.c
+++ b/arch/arm/mach-omap1/pm_bus.c
@@ -49,20 +49,20 @@ static int omap1_pm_runtime_resume(struct device *dev)
49 return pm_generic_runtime_resume(dev); 49 return pm_generic_runtime_resume(dev);
50} 50}
51 51
52static struct dev_power_domain default_power_domain = { 52static struct dev_pm_domain default_pm_domain = {
53 .ops = { 53 .ops = {
54 .runtime_suspend = omap1_pm_runtime_suspend, 54 .runtime_suspend = omap1_pm_runtime_suspend,
55 .runtime_resume = omap1_pm_runtime_resume, 55 .runtime_resume = omap1_pm_runtime_resume,
56 USE_PLATFORM_PM_SLEEP_OPS 56 USE_PLATFORM_PM_SLEEP_OPS
57 }, 57 },
58}; 58};
59#define OMAP1_PWR_DOMAIN (&default_power_domain) 59#define OMAP1_PM_DOMAIN (&default_pm_domain)
60#else 60#else
61#define OMAP1_PWR_DOMAIN NULL 61#define OMAP1_PM_DOMAIN NULL
62#endif /* CONFIG_PM_RUNTIME */ 62#endif /* CONFIG_PM_RUNTIME */
63 63
64static struct pm_clk_notifier_block platform_bus_notifier = { 64static struct pm_clk_notifier_block platform_bus_notifier = {
65 .pwr_domain = OMAP1_PWR_DOMAIN, 65 .pm_domain = OMAP1_PM_DOMAIN,
66 .con_ids = { "ick", "fck", NULL, }, 66 .con_ids = { "ick", "fck", NULL, },
67}; 67};
68 68
diff --git a/arch/arm/mach-shmobile/pm_runtime.c b/arch/arm/mach-shmobile/pm_runtime.c
index 2d1b67a59e4a..99802d28e5d3 100644
--- a/arch/arm/mach-shmobile/pm_runtime.c
+++ b/arch/arm/mach-shmobile/pm_runtime.c
@@ -28,7 +28,7 @@ static int default_platform_runtime_idle(struct device *dev)
28 return pm_runtime_suspend(dev); 28 return pm_runtime_suspend(dev);
29} 29}
30 30
31static struct dev_power_domain default_power_domain = { 31static struct dev_pm_domain default_pm_domain = {
32 .ops = { 32 .ops = {
33 .runtime_suspend = pm_runtime_clk_suspend, 33 .runtime_suspend = pm_runtime_clk_suspend,
34 .runtime_resume = pm_runtime_clk_resume, 34 .runtime_resume = pm_runtime_clk_resume,
@@ -37,16 +37,16 @@ static struct dev_power_domain default_power_domain = {
37 }, 37 },
38}; 38};
39 39
40#define DEFAULT_PWR_DOMAIN_PTR (&default_power_domain) 40#define DEFAULT_PM_DOMAIN_PTR (&default_pm_domain)
41 41
42#else 42#else
43 43
44#define DEFAULT_PWR_DOMAIN_PTR NULL 44#define DEFAULT_PM_DOMAIN_PTR NULL
45 45
46#endif /* CONFIG_PM_RUNTIME */ 46#endif /* CONFIG_PM_RUNTIME */
47 47
48static struct pm_clk_notifier_block platform_bus_notifier = { 48static struct pm_clk_notifier_block platform_bus_notifier = {
49 .pwr_domain = DEFAULT_PWR_DOMAIN_PTR, 49 .pm_domain = DEFAULT_PM_DOMAIN_PTR,
50 .con_ids = { NULL, }, 50 .con_ids = { NULL, },
51}; 51};
52 52
diff --git a/arch/arm/plat-omap/omap_device.c b/arch/arm/plat-omap/omap_device.c
index 49fc0df0c21f..d21579b2c11e 100644
--- a/arch/arm/plat-omap/omap_device.c
+++ b/arch/arm/plat-omap/omap_device.c
@@ -564,7 +564,7 @@ static int _od_runtime_resume(struct device *dev)
564 return pm_generic_runtime_resume(dev); 564 return pm_generic_runtime_resume(dev);
565} 565}
566 566
567static struct dev_power_domain omap_device_power_domain = { 567static struct dev_pm_domain omap_device_pm_domain = {
568 .ops = { 568 .ops = {
569 .runtime_suspend = _od_runtime_suspend, 569 .runtime_suspend = _od_runtime_suspend,
570 .runtime_idle = _od_runtime_idle, 570 .runtime_idle = _od_runtime_idle,
@@ -586,7 +586,7 @@ int omap_device_register(struct omap_device *od)
586 pr_debug("omap_device: %s: registering\n", od->pdev.name); 586 pr_debug("omap_device: %s: registering\n", od->pdev.name);
587 587
588 od->pdev.dev.parent = &omap_device_parent; 588 od->pdev.dev.parent = &omap_device_parent;
589 od->pdev.dev.pwr_domain = &omap_device_power_domain; 589 od->pdev.dev.pm_domain = &omap_device_pm_domain;
590 return platform_device_register(&od->pdev); 590 return platform_device_register(&od->pdev);
591} 591}
592 592
diff --git a/arch/sh/kernel/cpu/shmobile/pm_runtime.c b/arch/sh/kernel/cpu/shmobile/pm_runtime.c
index 64c807c39208..bf280c812d2f 100644
--- a/arch/sh/kernel/cpu/shmobile/pm_runtime.c
+++ b/arch/sh/kernel/cpu/shmobile/pm_runtime.c
@@ -256,7 +256,7 @@ out:
256 return ret; 256 return ret;
257} 257}
258 258
259static struct dev_power_domain default_power_domain = { 259static struct dev_pm_domain default_pm_domain = {
260 .ops = { 260 .ops = {
261 .runtime_suspend = default_platform_runtime_suspend, 261 .runtime_suspend = default_platform_runtime_suspend,
262 .runtime_resume = default_platform_runtime_resume, 262 .runtime_resume = default_platform_runtime_resume,
@@ -285,7 +285,7 @@ static int platform_bus_notify(struct notifier_block *nb,
285 hwblk_disable(hwblk_info, hwblk); 285 hwblk_disable(hwblk_info, hwblk);
286 /* make sure driver re-inits itself once */ 286 /* make sure driver re-inits itself once */
287 __set_bit(PDEV_ARCHDATA_FLAG_INIT, &pdev->archdata.flags); 287 __set_bit(PDEV_ARCHDATA_FLAG_INIT, &pdev->archdata.flags);
288 dev->pwr_domain = &default_power_domain; 288 dev->pm_domain = &default_pm_domain;
289 break; 289 break;
290 /* TODO: add BUS_NOTIFY_BIND_DRIVER and increase idle count */ 290 /* TODO: add BUS_NOTIFY_BIND_DRIVER and increase idle count */
291 case BUS_NOTIFY_BOUND_DRIVER: 291 case BUS_NOTIFY_BOUND_DRIVER:
@@ -299,7 +299,7 @@ static int platform_bus_notify(struct notifier_block *nb,
299 __set_bit(PDEV_ARCHDATA_FLAG_INIT, &pdev->archdata.flags); 299 __set_bit(PDEV_ARCHDATA_FLAG_INIT, &pdev->archdata.flags);
300 break; 300 break;
301 case BUS_NOTIFY_DEL_DEVICE: 301 case BUS_NOTIFY_DEL_DEVICE:
302 dev->pwr_domain = NULL; 302 dev->pm_domain = NULL;
303 break; 303 break;
304 } 304 }
305 return 0; 305 return 0;
diff --git a/drivers/base/power/clock_ops.c b/drivers/base/power/clock_ops.c
index ad367c4139b1..c5624818259e 100644
--- a/drivers/base/power/clock_ops.c
+++ b/drivers/base/power/clock_ops.c
@@ -278,11 +278,11 @@ int pm_runtime_clk_resume(struct device *dev)
278 * 278 *
279 * For this function to work, @nb must be a member of an object of type 279 * For this function to work, @nb must be a member of an object of type
280 * struct pm_clk_notifier_block containing all of the requisite data. 280 * struct pm_clk_notifier_block containing all of the requisite data.
281 * Specifically, the pwr_domain member of that object is copied to the device's 281 * Specifically, the pm_domain member of that object is copied to the device's
282 * pwr_domain field and its con_ids member is used to populate the device's list 282 * pm_domain field and its con_ids member is used to populate the device's list
283 * of runtime PM clocks, depending on @action. 283 * of runtime PM clocks, depending on @action.
284 * 284 *
285 * If the device's pwr_domain field is already populated with a value different 285 * If the device's pm_domain field is already populated with a value different
286 * from the one stored in the struct pm_clk_notifier_block object, the function 286 * from the one stored in the struct pm_clk_notifier_block object, the function
287 * does nothing. 287 * does nothing.
288 */ 288 */
@@ -300,14 +300,14 @@ static int pm_runtime_clk_notify(struct notifier_block *nb,
300 300
301 switch (action) { 301 switch (action) {
302 case BUS_NOTIFY_ADD_DEVICE: 302 case BUS_NOTIFY_ADD_DEVICE:
303 if (dev->pwr_domain) 303 if (dev->pm_domain)
304 break; 304 break;
305 305
306 error = pm_runtime_clk_init(dev); 306 error = pm_runtime_clk_init(dev);
307 if (error) 307 if (error)
308 break; 308 break;
309 309
310 dev->pwr_domain = clknb->pwr_domain; 310 dev->pm_domain = clknb->pm_domain;
311 if (clknb->con_ids[0]) { 311 if (clknb->con_ids[0]) {
312 for (con_id = clknb->con_ids; *con_id; con_id++) 312 for (con_id = clknb->con_ids; *con_id; con_id++)
313 pm_runtime_clk_add(dev, *con_id); 313 pm_runtime_clk_add(dev, *con_id);
@@ -317,10 +317,10 @@ static int pm_runtime_clk_notify(struct notifier_block *nb,
317 317
318 break; 318 break;
319 case BUS_NOTIFY_DEL_DEVICE: 319 case BUS_NOTIFY_DEL_DEVICE:
320 if (dev->pwr_domain != clknb->pwr_domain) 320 if (dev->pm_domain != clknb->pm_domain)
321 break; 321 break;
322 322
323 dev->pwr_domain = NULL; 323 dev->pm_domain = NULL;
324 pm_runtime_clk_destroy(dev); 324 pm_runtime_clk_destroy(dev);
325 break; 325 break;
326 } 326 }
diff --git a/drivers/base/power/main.c b/drivers/base/power/main.c
index 06f09bf89cb2..85b591a5429a 100644
--- a/drivers/base/power/main.c
+++ b/drivers/base/power/main.c
@@ -425,9 +425,9 @@ static int device_resume_noirq(struct device *dev, pm_message_t state)
425 TRACE_DEVICE(dev); 425 TRACE_DEVICE(dev);
426 TRACE_RESUME(0); 426 TRACE_RESUME(0);
427 427
428 if (dev->pwr_domain) { 428 if (dev->pm_domain) {
429 pm_dev_dbg(dev, state, "EARLY power domain "); 429 pm_dev_dbg(dev, state, "EARLY power domain ");
430 error = pm_noirq_op(dev, &dev->pwr_domain->ops, state); 430 error = pm_noirq_op(dev, &dev->pm_domain->ops, state);
431 } else if (dev->type && dev->type->pm) { 431 } else if (dev->type && dev->type->pm) {
432 pm_dev_dbg(dev, state, "EARLY type "); 432 pm_dev_dbg(dev, state, "EARLY type ");
433 error = pm_noirq_op(dev, dev->type->pm, state); 433 error = pm_noirq_op(dev, dev->type->pm, state);
@@ -521,9 +521,9 @@ static int device_resume(struct device *dev, pm_message_t state, bool async)
521 if (!dev->power.is_suspended) 521 if (!dev->power.is_suspended)
522 goto Unlock; 522 goto Unlock;
523 523
524 if (dev->pwr_domain) { 524 if (dev->pm_domain) {
525 pm_dev_dbg(dev, state, "power domain "); 525 pm_dev_dbg(dev, state, "power domain ");
526 error = pm_op(dev, &dev->pwr_domain->ops, state); 526 error = pm_op(dev, &dev->pm_domain->ops, state);
527 goto End; 527 goto End;
528 } 528 }
529 529
@@ -641,10 +641,10 @@ static void device_complete(struct device *dev, pm_message_t state)
641{ 641{
642 device_lock(dev); 642 device_lock(dev);
643 643
644 if (dev->pwr_domain) { 644 if (dev->pm_domain) {
645 pm_dev_dbg(dev, state, "completing power domain "); 645 pm_dev_dbg(dev, state, "completing power domain ");
646 if (dev->pwr_domain->ops.complete) 646 if (dev->pm_domain->ops.complete)
647 dev->pwr_domain->ops.complete(dev); 647 dev->pm_domain->ops.complete(dev);
648 } else if (dev->type && dev->type->pm) { 648 } else if (dev->type && dev->type->pm) {
649 pm_dev_dbg(dev, state, "completing type "); 649 pm_dev_dbg(dev, state, "completing type ");
650 if (dev->type->pm->complete) 650 if (dev->type->pm->complete)
@@ -744,9 +744,9 @@ static int device_suspend_noirq(struct device *dev, pm_message_t state)
744{ 744{
745 int error; 745 int error;
746 746
747 if (dev->pwr_domain) { 747 if (dev->pm_domain) {
748 pm_dev_dbg(dev, state, "LATE power domain "); 748 pm_dev_dbg(dev, state, "LATE power domain ");
749 error = pm_noirq_op(dev, &dev->pwr_domain->ops, state); 749 error = pm_noirq_op(dev, &dev->pm_domain->ops, state);
750 if (error) 750 if (error)
751 return error; 751 return error;
752 } else if (dev->type && dev->type->pm) { 752 } else if (dev->type && dev->type->pm) {
@@ -853,9 +853,9 @@ static int __device_suspend(struct device *dev, pm_message_t state, bool async)
853 goto Unlock; 853 goto Unlock;
854 } 854 }
855 855
856 if (dev->pwr_domain) { 856 if (dev->pm_domain) {
857 pm_dev_dbg(dev, state, "power domain "); 857 pm_dev_dbg(dev, state, "power domain ");
858 error = pm_op(dev, &dev->pwr_domain->ops, state); 858 error = pm_op(dev, &dev->pm_domain->ops, state);
859 goto End; 859 goto End;
860 } 860 }
861 861
@@ -982,11 +982,11 @@ static int device_prepare(struct device *dev, pm_message_t state)
982 982
983 device_lock(dev); 983 device_lock(dev);
984 984
985 if (dev->pwr_domain) { 985 if (dev->pm_domain) {
986 pm_dev_dbg(dev, state, "preparing power domain "); 986 pm_dev_dbg(dev, state, "preparing power domain ");
987 if (dev->pwr_domain->ops.prepare) 987 if (dev->pm_domain->ops.prepare)
988 error = dev->pwr_domain->ops.prepare(dev); 988 error = dev->pm_domain->ops.prepare(dev);
989 suspend_report_result(dev->pwr_domain->ops.prepare, error); 989 suspend_report_result(dev->pm_domain->ops.prepare, error);
990 if (error) 990 if (error)
991 goto End; 991 goto End;
992 } else if (dev->type && dev->type->pm) { 992 } else if (dev->type && dev->type->pm) {
diff --git a/drivers/base/power/runtime.c b/drivers/base/power/runtime.c
index 0d4587b15c55..5f5c4236f006 100644
--- a/drivers/base/power/runtime.c
+++ b/drivers/base/power/runtime.c
@@ -213,8 +213,8 @@ static int rpm_idle(struct device *dev, int rpmflags)
213 213
214 dev->power.idle_notification = true; 214 dev->power.idle_notification = true;
215 215
216 if (dev->pwr_domain) 216 if (dev->pm_domain)
217 callback = dev->pwr_domain->ops.runtime_idle; 217 callback = dev->pm_domain->ops.runtime_idle;
218 else if (dev->type && dev->type->pm) 218 else if (dev->type && dev->type->pm)
219 callback = dev->type->pm->runtime_idle; 219 callback = dev->type->pm->runtime_idle;
220 else if (dev->class && dev->class->pm) 220 else if (dev->class && dev->class->pm)
@@ -374,8 +374,8 @@ static int rpm_suspend(struct device *dev, int rpmflags)
374 374
375 __update_runtime_status(dev, RPM_SUSPENDING); 375 __update_runtime_status(dev, RPM_SUSPENDING);
376 376
377 if (dev->pwr_domain) 377 if (dev->pm_domain)
378 callback = dev->pwr_domain->ops.runtime_suspend; 378 callback = dev->pm_domain->ops.runtime_suspend;
379 else if (dev->type && dev->type->pm) 379 else if (dev->type && dev->type->pm)
380 callback = dev->type->pm->runtime_suspend; 380 callback = dev->type->pm->runtime_suspend;
381 else if (dev->class && dev->class->pm) 381 else if (dev->class && dev->class->pm)
@@ -573,8 +573,8 @@ static int rpm_resume(struct device *dev, int rpmflags)
573 573
574 __update_runtime_status(dev, RPM_RESUMING); 574 __update_runtime_status(dev, RPM_RESUMING);
575 575
576 if (dev->pwr_domain) 576 if (dev->pm_domain)
577 callback = dev->pwr_domain->ops.runtime_resume; 577 callback = dev->pm_domain->ops.runtime_resume;
578 else if (dev->type && dev->type->pm) 578 else if (dev->type && dev->type->pm)
579 callback = dev->type->pm->runtime_resume; 579 callback = dev->type->pm->runtime_resume;
580 else if (dev->class && dev->class->pm) 580 else if (dev->class && dev->class->pm)
diff --git a/include/linux/device.h b/include/linux/device.h
index e4f62d8896b7..160d4ddb2499 100644
--- a/include/linux/device.h
+++ b/include/linux/device.h
@@ -516,7 +516,7 @@ struct device_dma_parameters {
516 * minimizes board-specific #ifdefs in drivers. 516 * minimizes board-specific #ifdefs in drivers.
517 * @power: For device power management. 517 * @power: For device power management.
518 * See Documentation/power/devices.txt for details. 518 * See Documentation/power/devices.txt for details.
519 * @pwr_domain: Provide callbacks that are executed during system suspend, 519 * @pm_domain: Provide callbacks that are executed during system suspend,
520 * hibernation, system resume and during runtime PM transitions 520 * hibernation, system resume and during runtime PM transitions
521 * along with subsystem-level and driver-level callbacks. 521 * along with subsystem-level and driver-level callbacks.
522 * @numa_node: NUMA node this device is close to. 522 * @numa_node: NUMA node this device is close to.
@@ -567,7 +567,7 @@ struct device {
567 void *platform_data; /* Platform specific data, device 567 void *platform_data; /* Platform specific data, device
568 core doesn't touch it */ 568 core doesn't touch it */
569 struct dev_pm_info power; 569 struct dev_pm_info power;
570 struct dev_power_domain *pwr_domain; 570 struct dev_pm_domain *pm_domain;
571 571
572#ifdef CONFIG_NUMA 572#ifdef CONFIG_NUMA
573 int numa_node; /* NUMA node this device is close to */ 573 int numa_node; /* NUMA node this device is close to */
diff --git a/include/linux/pm.h b/include/linux/pm.h
index 411e4f4be52b..e3963208aa93 100644
--- a/include/linux/pm.h
+++ b/include/linux/pm.h
@@ -472,7 +472,7 @@ extern void update_pm_runtime_accounting(struct device *dev);
472 * hibernation, system resume and during runtime PM transitions along with 472 * hibernation, system resume and during runtime PM transitions along with
473 * subsystem-level and driver-level callbacks. 473 * subsystem-level and driver-level callbacks.
474 */ 474 */
475struct dev_power_domain { 475struct dev_pm_domain {
476 struct dev_pm_ops ops; 476 struct dev_pm_ops ops;
477}; 477};
478 478
diff --git a/include/linux/pm_runtime.h b/include/linux/pm_runtime.h
index 878cf84baeb1..ef91904c7110 100644
--- a/include/linux/pm_runtime.h
+++ b/include/linux/pm_runtime.h
@@ -247,7 +247,7 @@ static inline void pm_runtime_dont_use_autosuspend(struct device *dev)
247 247
248struct pm_clk_notifier_block { 248struct pm_clk_notifier_block {
249 struct notifier_block nb; 249 struct notifier_block nb;
250 struct dev_power_domain *pwr_domain; 250 struct dev_pm_domain *pm_domain;
251 char *con_ids[]; 251 char *con_ids[];
252}; 252};
253 253