diff options
author | MyungJoo Ham <myungjoo.ham@samsung.com> | 2015-08-18 00:45:49 -0400 |
---|---|---|
committer | MyungJoo Ham <myungjoo.ham@samsung.com> | 2015-09-11 01:23:29 -0400 |
commit | d54cdf3fc91aae3780433471d15d73413a845bc0 (patch) | |
tree | fa5ffcdf078ea528d4ee32afefed4c1da5dc4385 | |
parent | d3b7e1745c0d1be2add1bb58065eef142c5a098f (diff) |
PM / devfreq: comments for get_dev_status usage updated
With the introduction of devfreq_update_stats(), governors
are not recommended to use get_dev_status() directly.
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
-rw-r--r-- | include/linux/devfreq.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/include/linux/devfreq.h b/include/linux/devfreq.h index 70a1c60ddda4..68030e22af35 100644 --- a/include/linux/devfreq.h +++ b/include/linux/devfreq.h | |||
@@ -65,7 +65,10 @@ struct devfreq_dev_status { | |||
65 | * The "flags" parameter's possible values are | 65 | * The "flags" parameter's possible values are |
66 | * explained above with "DEVFREQ_FLAG_*" macros. | 66 | * explained above with "DEVFREQ_FLAG_*" macros. |
67 | * @get_dev_status: The device should provide the current performance | 67 | * @get_dev_status: The device should provide the current performance |
68 | * status to devfreq, which is used by governors. | 68 | * status to devfreq. Governors are recommended not to |
69 | * use this directly. Instead, governors are recommended | ||
70 | * to use devfreq_update_stats() along with | ||
71 | * devfreq.last_status. | ||
69 | * @get_cur_freq: The device should provide the current frequency | 72 | * @get_cur_freq: The device should provide the current frequency |
70 | * at which it is operating. | 73 | * at which it is operating. |
71 | * @exit: An optional callback that is called when devfreq | 74 | * @exit: An optional callback that is called when devfreq |
@@ -208,6 +211,10 @@ extern void devm_devfreq_unregister_opp_notifier(struct device *dev, | |||
208 | /** | 211 | /** |
209 | * devfreq_update_stats() - update the last_status pointer in struct devfreq | 212 | * devfreq_update_stats() - update the last_status pointer in struct devfreq |
210 | * @df: the devfreq instance whose status needs updating | 213 | * @df: the devfreq instance whose status needs updating |
214 | * | ||
215 | * Governors are recommended to use this function along with last_status, | ||
216 | * which allows other entities to reuse the last_status without affecting | ||
217 | * the values fetched later by governors. | ||
211 | */ | 218 | */ |
212 | static inline int devfreq_update_stats(struct devfreq *df) | 219 | static inline int devfreq_update_stats(struct devfreq *df) |
213 | { | 220 | { |