diff options
author | Rafael J. Wysocki <rjw@sisk.pl> | 2012-08-15 14:32:43 -0400 |
---|---|---|
committer | Rafael J. Wysocki <rjw@sisk.pl> | 2012-09-03 19:36:53 -0400 |
commit | 40114447a7f89860b46a64e5504f313656cb5f27 (patch) | |
tree | e46fcfd3213839ee6acb90138308b8f34bf0093c | |
parent | 8bc0251de2932e603f8ed73b76ba2d64b2dc1d18 (diff) |
PM / Domains: Document cpuidle-related functions and change their names
The names of the cpuidle-related functions in
drivers/base/power/domain.c are inconsistent with the names of the
other exported functions in that file (the "pm_" prefix is missing
from them) and they are missing kerneldoc comments.
Fix that by adding the missing "pm_" prefix to the names of those
functions and add kerneldoc comments documenting them.
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
-rw-r--r-- | drivers/base/power/domain.c | 20 | ||||
-rw-r--r-- | include/linux/pm_domain.h | 8 |
2 files changed, 22 insertions, 6 deletions
diff --git a/drivers/base/power/domain.c b/drivers/base/power/domain.c index 4d633406f375..e44e1a8e8376 100644 --- a/drivers/base/power/domain.c +++ b/drivers/base/power/domain.c | |||
@@ -1829,7 +1829,16 @@ int __pm_genpd_remove_callbacks(struct device *dev, bool clear_td) | |||
1829 | } | 1829 | } |
1830 | EXPORT_SYMBOL_GPL(__pm_genpd_remove_callbacks); | 1830 | EXPORT_SYMBOL_GPL(__pm_genpd_remove_callbacks); |
1831 | 1831 | ||
1832 | int genpd_attach_cpuidle(struct generic_pm_domain *genpd, int state) | 1832 | /** |
1833 | * pm_genpd_attach_cpuidle - Connect the given PM domain with cpuidle. | ||
1834 | * @genpd: PM domain to be connected with cpuidle. | ||
1835 | * @state: cpuidle state this domain can disable/enable. | ||
1836 | * | ||
1837 | * Make a PM domain behave as though it contained a CPU core, that is, instead | ||
1838 | * of calling its power down routine it will enable the given cpuidle state so | ||
1839 | * that the cpuidle subsystem can power it down (if possible and desirable). | ||
1840 | */ | ||
1841 | int pm_genpd_attach_cpuidle(struct generic_pm_domain *genpd, int state) | ||
1833 | { | 1842 | { |
1834 | struct cpuidle_driver *cpuidle_drv; | 1843 | struct cpuidle_driver *cpuidle_drv; |
1835 | struct gpd_cpu_data *cpu_data; | 1844 | struct gpd_cpu_data *cpu_data; |
@@ -1878,7 +1887,14 @@ int genpd_attach_cpuidle(struct generic_pm_domain *genpd, int state) | |||
1878 | goto out; | 1887 | goto out; |
1879 | } | 1888 | } |
1880 | 1889 | ||
1881 | int genpd_detach_cpuidle(struct generic_pm_domain *genpd) | 1890 | /** |
1891 | * pm_genpd_detach_cpuidle - Remove the cpuidle connection from a PM domain. | ||
1892 | * @genpd: PM domain to remove the cpuidle connection from. | ||
1893 | * | ||
1894 | * Remove the cpuidle connection set up by pm_genpd_attach_cpuidle() from the | ||
1895 | * given PM domain. | ||
1896 | */ | ||
1897 | int pm_genpd_detach_cpuidle(struct generic_pm_domain *genpd) | ||
1882 | { | 1898 | { |
1883 | struct gpd_cpu_data *cpu_data; | 1899 | struct gpd_cpu_data *cpu_data; |
1884 | struct cpuidle_state *idle_state; | 1900 | struct cpuidle_state *idle_state; |
diff --git a/include/linux/pm_domain.h b/include/linux/pm_domain.h index d9d60835c29b..f2a633a913e7 100644 --- a/include/linux/pm_domain.h +++ b/include/linux/pm_domain.h | |||
@@ -155,8 +155,8 @@ extern int pm_genpd_add_callbacks(struct device *dev, | |||
155 | struct gpd_dev_ops *ops, | 155 | struct gpd_dev_ops *ops, |
156 | struct gpd_timing_data *td); | 156 | struct gpd_timing_data *td); |
157 | extern int __pm_genpd_remove_callbacks(struct device *dev, bool clear_td); | 157 | extern int __pm_genpd_remove_callbacks(struct device *dev, bool clear_td); |
158 | extern int genpd_attach_cpuidle(struct generic_pm_domain *genpd, int state); | 158 | extern int pm_genpd_attach_cpuidle(struct generic_pm_domain *genpd, int state); |
159 | extern int genpd_detach_cpuidle(struct generic_pm_domain *genpd); | 159 | extern int pm_genpd_detach_cpuidle(struct generic_pm_domain *genpd); |
160 | extern void pm_genpd_init(struct generic_pm_domain *genpd, | 160 | extern void pm_genpd_init(struct generic_pm_domain *genpd, |
161 | struct dev_power_governor *gov, bool is_off); | 161 | struct dev_power_governor *gov, bool is_off); |
162 | 162 | ||
@@ -225,11 +225,11 @@ static inline int __pm_genpd_remove_callbacks(struct device *dev, bool clear_td) | |||
225 | { | 225 | { |
226 | return -ENOSYS; | 226 | return -ENOSYS; |
227 | } | 227 | } |
228 | static inline int genpd_attach_cpuidle(struct generic_pm_domain *genpd, int st) | 228 | static inline int pm_genpd_attach_cpuidle(struct generic_pm_domain *genpd, int st) |
229 | { | 229 | { |
230 | return -ENOSYS; | 230 | return -ENOSYS; |
231 | } | 231 | } |
232 | static inline int genpd_detach_cpuidle(struct generic_pm_domain *genpd) | 232 | static inline int pm_genpd_detach_cpuidle(struct generic_pm_domain *genpd) |
233 | { | 233 | { |
234 | return -ENOSYS; | 234 | return -ENOSYS; |
235 | } | 235 | } |