linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: MyungJoo Ham <myungjoo.ham@samsung.com>
To: "linux-pm@vger.kernel.org" <linux-pm@vger.kernel.org>
Cc: javi.merino@arm.com
Subject: [PATCH] PM / devfreq: comments for get_dev_status usage updated
Date: Tue, 18 Aug 2015 04:52:45 +0000 (GMT)	[thread overview]
Message-ID: <134989511.192481439873565434.JavaMail.weblogic@ep2mlwas01a> (raw)


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>
---
 include/linux/devfreq.h | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/include/linux/devfreq.h b/include/linux/devfreq.h
index 70a1c60..68030e2 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)
 {
-- 
1.9.1


             reply	other threads:[~2015-08-18  4:52 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-18  4:52 MyungJoo Ham [this message]
2015-08-19 17:43 ` [PATCH] PM / devfreq: comments for get_dev_status usage updated Javi Merino

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=134989511.192481439873565434.JavaMail.weblogic@ep2mlwas01a \
    --to=myungjoo.ham@samsung.com \
    --cc=javi.merino@arm.com \
    --cc=linux-pm@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).