diff options
| author | Ulf Hansson <ulf.hansson@linaro.org> | 2016-03-31 05:21:25 -0400 |
|---|---|---|
| committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2016-04-21 20:29:17 -0400 |
| commit | 9df3921e026532eb3bd2904745d990c0a9f0b4e4 (patch) | |
| tree | 002f9acdbff4a76370ae1ba74c4861793b3ca64d /drivers/base/power/domain_governor.c | |
| parent | c3b46c73264b03000d1e18b22f5caf63332547c9 (diff) | |
PM / Domains: Rename stop_ok to suspend_ok for the genpd governor
The genpd governor validates the latency constraints to find out whether
it's acceptable to runtime suspend a device. Earlier this validation was
made to know whether it was okay to invoke the ->stop() callback for the
device, hence the governor used the name "stop_ok" for the related
variables.
To clarify the code around this, let's rename these variables from
"stop_ok" to "suspend_ok".
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Reviewed-by: Kevin Hilman <khilman@baylibre.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/base/power/domain_governor.c')
| -rw-r--r-- | drivers/base/power/domain_governor.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/drivers/base/power/domain_governor.c b/drivers/base/power/domain_governor.c index 00a5436dd44b..2e0fce711135 100644 --- a/drivers/base/power/domain_governor.c +++ b/drivers/base/power/domain_governor.c | |||
| @@ -37,10 +37,10 @@ static int dev_update_qos_constraint(struct device *dev, void *data) | |||
| 37 | } | 37 | } |
| 38 | 38 | ||
| 39 | /** | 39 | /** |
| 40 | * default_stop_ok - Default PM domain governor routine for stopping devices. | 40 | * default_suspend_ok - Default PM domain governor routine to suspend devices. |
| 41 | * @dev: Device to check. | 41 | * @dev: Device to check. |
| 42 | */ | 42 | */ |
| 43 | static bool default_stop_ok(struct device *dev) | 43 | static bool default_suspend_ok(struct device *dev) |
| 44 | { | 44 | { |
| 45 | struct gpd_timing_data *td = &dev_gpd_data(dev)->td; | 45 | struct gpd_timing_data *td = &dev_gpd_data(dev)->td; |
| 46 | unsigned long flags; | 46 | unsigned long flags; |
| @@ -51,13 +51,13 @@ static bool default_stop_ok(struct device *dev) | |||
| 51 | spin_lock_irqsave(&dev->power.lock, flags); | 51 | spin_lock_irqsave(&dev->power.lock, flags); |
| 52 | 52 | ||
| 53 | if (!td->constraint_changed) { | 53 | if (!td->constraint_changed) { |
| 54 | bool ret = td->cached_stop_ok; | 54 | bool ret = td->cached_suspend_ok; |
| 55 | 55 | ||
| 56 | spin_unlock_irqrestore(&dev->power.lock, flags); | 56 | spin_unlock_irqrestore(&dev->power.lock, flags); |
| 57 | return ret; | 57 | return ret; |
| 58 | } | 58 | } |
| 59 | td->constraint_changed = false; | 59 | td->constraint_changed = false; |
| 60 | td->cached_stop_ok = false; | 60 | td->cached_suspend_ok = false; |
| 61 | td->effective_constraint_ns = -1; | 61 | td->effective_constraint_ns = -1; |
| 62 | constraint_ns = __dev_pm_qos_read_value(dev); | 62 | constraint_ns = __dev_pm_qos_read_value(dev); |
| 63 | 63 | ||
| @@ -83,13 +83,13 @@ static bool default_stop_ok(struct device *dev) | |||
| 83 | return false; | 83 | return false; |
| 84 | } | 84 | } |
| 85 | td->effective_constraint_ns = constraint_ns; | 85 | td->effective_constraint_ns = constraint_ns; |
| 86 | td->cached_stop_ok = constraint_ns >= 0; | 86 | td->cached_suspend_ok = constraint_ns >= 0; |
| 87 | 87 | ||
| 88 | /* | 88 | /* |
| 89 | * The children have been suspended already, so we don't need to take | 89 | * The children have been suspended already, so we don't need to take |
| 90 | * their stop latencies into account here. | 90 | * their suspend latencies into account here. |
| 91 | */ | 91 | */ |
| 92 | return td->cached_stop_ok; | 92 | return td->cached_suspend_ok; |
| 93 | } | 93 | } |
| 94 | 94 | ||
| 95 | /** | 95 | /** |
| @@ -150,7 +150,7 @@ static bool __default_power_down_ok(struct dev_pm_domain *pd, | |||
| 150 | */ | 150 | */ |
| 151 | td = &to_gpd_data(pdd)->td; | 151 | td = &to_gpd_data(pdd)->td; |
| 152 | constraint_ns = td->effective_constraint_ns; | 152 | constraint_ns = td->effective_constraint_ns; |
| 153 | /* default_stop_ok() need not be called before us. */ | 153 | /* default_suspend_ok() need not be called before us. */ |
| 154 | if (constraint_ns < 0) { | 154 | if (constraint_ns < 0) { |
| 155 | constraint_ns = dev_pm_qos_read_value(pdd->dev); | 155 | constraint_ns = dev_pm_qos_read_value(pdd->dev); |
| 156 | constraint_ns *= NSEC_PER_USEC; | 156 | constraint_ns *= NSEC_PER_USEC; |
| @@ -227,7 +227,7 @@ static bool always_on_power_down_ok(struct dev_pm_domain *domain) | |||
| 227 | } | 227 | } |
| 228 | 228 | ||
| 229 | struct dev_power_governor simple_qos_governor = { | 229 | struct dev_power_governor simple_qos_governor = { |
| 230 | .stop_ok = default_stop_ok, | 230 | .suspend_ok = default_suspend_ok, |
| 231 | .power_down_ok = default_power_down_ok, | 231 | .power_down_ok = default_power_down_ok, |
| 232 | }; | 232 | }; |
| 233 | 233 | ||
| @@ -236,5 +236,5 @@ struct dev_power_governor simple_qos_governor = { | |||
| 236 | */ | 236 | */ |
| 237 | struct dev_power_governor pm_domain_always_on_gov = { | 237 | struct dev_power_governor pm_domain_always_on_gov = { |
| 238 | .power_down_ok = always_on_power_down_ok, | 238 | .power_down_ok = always_on_power_down_ok, |
| 239 | .stop_ok = default_stop_ok, | 239 | .suspend_ok = default_suspend_ok, |
| 240 | }; | 240 | }; |
