aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/base
diff options
context:
space:
mode:
authorRafael J. Wysocki <rjw@sisk.pl>2012-08-05 19:45:54 -0400
committerRafael J. Wysocki <rjw@sisk.pl>2012-09-03 19:36:03 -0400
commit6fb28badf207a6d8a78906353772e1c3f560a977 (patch)
tree3cb1cdc06c263708dd40e9c490fcf8ddf921bbbd /drivers/base
parentbed2b42d9f0b411f384c5619870ab0fea5dd116b (diff)
PM / Domains: Rename the always_on device flag to syscore
The always_on device flag is used to mark the devices (belonging to a PM domain) that should never be turned off, except for the system core (syscore) suspend/hibernation and resume stages. Change name of that flag to "syscore" to better reflect its purpose. Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> Acked-by: Magnus Damm <damm@opensource.se>
Diffstat (limited to 'drivers/base')
-rw-r--r--drivers/base/power/domain.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/drivers/base/power/domain.c b/drivers/base/power/domain.c
index 515c8ecf01ce..15234ecd7edb 100644
--- a/drivers/base/power/domain.c
+++ b/drivers/base/power/domain.c
@@ -436,7 +436,7 @@ static int pm_genpd_poweroff(struct generic_pm_domain *genpd)
436 not_suspended = 0; 436 not_suspended = 0;
437 list_for_each_entry(pdd, &genpd->dev_list, list_node) 437 list_for_each_entry(pdd, &genpd->dev_list, list_node)
438 if (pdd->dev->driver && (!pm_runtime_suspended(pdd->dev) 438 if (pdd->dev->driver && (!pm_runtime_suspended(pdd->dev)
439 || pdd->dev->power.irq_safe || to_gpd_data(pdd)->always_on)) 439 || pdd->dev->power.irq_safe || to_gpd_data(pdd)->syscore))
440 not_suspended++; 440 not_suspended++;
441 441
442 if (not_suspended > genpd->in_progress) 442 if (not_suspended > genpd->in_progress)
@@ -578,7 +578,7 @@ static int pm_genpd_runtime_suspend(struct device *dev)
578 578
579 might_sleep_if(!genpd->dev_irq_safe); 579 might_sleep_if(!genpd->dev_irq_safe);
580 580
581 if (dev_gpd_data(dev)->always_on) 581 if (dev_gpd_data(dev)->syscore)
582 return -EBUSY; 582 return -EBUSY;
583 583
584 stop_ok = genpd->gov ? genpd->gov->stop_ok : NULL; 584 stop_ok = genpd->gov ? genpd->gov->stop_ok : NULL;
@@ -983,7 +983,7 @@ static int pm_genpd_suspend_noirq(struct device *dev)
983 if (IS_ERR(genpd)) 983 if (IS_ERR(genpd))
984 return -EINVAL; 984 return -EINVAL;
985 985
986 if (genpd->suspend_power_off || dev_gpd_data(dev)->always_on 986 if (genpd->suspend_power_off || dev_gpd_data(dev)->syscore
987 || (dev->power.wakeup_path && genpd_dev_active_wakeup(genpd, dev))) 987 || (dev->power.wakeup_path && genpd_dev_active_wakeup(genpd, dev)))
988 return 0; 988 return 0;
989 989
@@ -1016,7 +1016,7 @@ static int pm_genpd_resume_noirq(struct device *dev)
1016 if (IS_ERR(genpd)) 1016 if (IS_ERR(genpd))
1017 return -EINVAL; 1017 return -EINVAL;
1018 1018
1019 if (genpd->suspend_power_off || dev_gpd_data(dev)->always_on 1019 if (genpd->suspend_power_off || dev_gpd_data(dev)->syscore
1020 || (dev->power.wakeup_path && genpd_dev_active_wakeup(genpd, dev))) 1020 || (dev->power.wakeup_path && genpd_dev_active_wakeup(genpd, dev)))
1021 return 0; 1021 return 0;
1022 1022
@@ -1136,7 +1136,7 @@ static int pm_genpd_freeze_noirq(struct device *dev)
1136 if (IS_ERR(genpd)) 1136 if (IS_ERR(genpd))
1137 return -EINVAL; 1137 return -EINVAL;
1138 1138
1139 return genpd->suspend_power_off || dev_gpd_data(dev)->always_on ? 1139 return genpd->suspend_power_off || dev_gpd_data(dev)->syscore ?
1140 0 : genpd_stop_dev(genpd, dev); 1140 0 : genpd_stop_dev(genpd, dev);
1141} 1141}
1142 1142
@@ -1157,7 +1157,7 @@ static int pm_genpd_thaw_noirq(struct device *dev)
1157 if (IS_ERR(genpd)) 1157 if (IS_ERR(genpd))
1158 return -EINVAL; 1158 return -EINVAL;
1159 1159
1160 return genpd->suspend_power_off || dev_gpd_data(dev)->always_on ? 1160 return genpd->suspend_power_off || dev_gpd_data(dev)->syscore ?
1161 0 : genpd_start_dev(genpd, dev); 1161 0 : genpd_start_dev(genpd, dev);
1162} 1162}
1163 1163
@@ -1253,7 +1253,7 @@ static int pm_genpd_restore_noirq(struct device *dev)
1253 1253
1254 pm_genpd_sync_poweron(genpd); 1254 pm_genpd_sync_poweron(genpd);
1255 1255
1256 return dev_gpd_data(dev)->always_on ? 0 : genpd_start_dev(genpd, dev); 1256 return dev_gpd_data(dev)->syscore ? 0 : genpd_start_dev(genpd, dev);
1257} 1257}
1258 1258
1259/** 1259/**
@@ -1526,11 +1526,11 @@ int pm_genpd_remove_device(struct generic_pm_domain *genpd,
1526} 1526}
1527 1527
1528/** 1528/**
1529 * pm_genpd_dev_always_on - Set/unset the "always on" flag for a given device. 1529 * pm_genpd_dev_syscore - Set/unset the "syscore" flag for a given device.
1530 * @dev: Device to set/unset the flag for. 1530 * @dev: Device to set/unset the flag for.
1531 * @val: The new value of the device's "always on" flag. 1531 * @val: The new value of the device's "syscore" flag.
1532 */ 1532 */
1533void pm_genpd_dev_always_on(struct device *dev, bool val) 1533void pm_genpd_dev_syscore(struct device *dev, bool val)
1534{ 1534{
1535 struct pm_subsys_data *psd; 1535 struct pm_subsys_data *psd;
1536 unsigned long flags; 1536 unsigned long flags;
@@ -1539,11 +1539,11 @@ void pm_genpd_dev_always_on(struct device *dev, bool val)
1539 1539
1540 psd = dev_to_psd(dev); 1540 psd = dev_to_psd(dev);
1541 if (psd && psd->domain_data) 1541 if (psd && psd->domain_data)
1542 to_gpd_data(psd->domain_data)->always_on = val; 1542 to_gpd_data(psd->domain_data)->syscore = val;
1543 1543
1544 spin_unlock_irqrestore(&dev->power.lock, flags); 1544 spin_unlock_irqrestore(&dev->power.lock, flags);
1545} 1545}
1546EXPORT_SYMBOL_GPL(pm_genpd_dev_always_on); 1546EXPORT_SYMBOL_GPL(pm_genpd_dev_syscore);
1547 1547
1548/** 1548/**
1549 * pm_genpd_dev_need_restore - Set/unset the device's "need restore" flag. 1549 * pm_genpd_dev_need_restore - Set/unset the device's "need restore" flag.