summaryrefslogtreecommitdiff
path: root/include/linux/devfreq.h
diff options
context:
space:
mode:
authorMyungJoo Ham <myungjoo.ham@samsung.com>2015-08-18 07:45:49 +0300
committerMyungJoo Ham <myungjoo.ham@samsung.com>2015-09-11 08:23:29 +0300
commitd54cdf3fc91aae3780433471d15d73413a845bc0 (patch)
treefa5ffcdf078ea528d4ee32afefed4c1da5dc4385 /include/linux/devfreq.h
parentd3b7e1745c0d1be2add1bb58065eef142c5a098f (diff)
downloadlinux-d54cdf3fc91aae3780433471d15d73413a845bc0.tar.xz
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>
Diffstat (limited to 'include/linux/devfreq.h')
-rw-r--r--include/linux/devfreq.h9
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 {
* The "flags" parameter's possible values are
* explained above with "DEVFREQ_FLAG_*" macros.
* @get_dev_status: The device should provide the current performance
- * status to devfreq, which is used by governors.
+ * status to devfreq. Governors are recommended not to
+ * use this directly. Instead, governors are recommended
+ * to use devfreq_update_stats() along with
+ * devfreq.last_status.
* @get_cur_freq: The device should provide the current frequency
* at which it is operating.
* @exit: An optional callback that is called when devfreq
@@ -208,6 +211,10 @@ extern void devm_devfreq_unregister_opp_notifier(struct device *dev,
/**
* devfreq_update_stats() - update the last_status pointer in struct devfreq
* @df: the devfreq instance whose status needs updating
+ *
+ * Governors are recommended to use this function along with last_status,
+ * which allows other entities to reuse the last_status without affecting
+ * the values fetched later by governors.
*/
static inline int devfreq_update_stats(struct devfreq *df)
{