aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMyungJoo Ham <myungjoo.ham@samsung.com>2013-02-05 04:40:17 -0500
committerMyungJoo Ham <myungjoo.ham@samsung.com>2013-06-03 07:20:29 -0400
commitde9c739435b47e7d39e448b2cc4c8154cabc9e5a (patch)
tree6b73c608b15534359040ccc702088870c1d86cef
parent39688ce6facd63de796def41a0b9012882b5cc14 (diff)
PM / devfreq: add comments and Documentation
- Added missing ABI documents - Added comments to clarify the objectives of functions Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com> Acked-by: Nishanth Menon <nm@ti.com> Acked-by: Rajagopal Venkat <rajagopal.venkat@linaro.org>
-rw-r--r--Documentation/ABI/testing/sysfs-class-devfreq20
-rw-r--r--drivers/devfreq/devfreq.c10
-rw-r--r--include/linux/devfreq.h2
3 files changed, 32 insertions, 0 deletions
diff --git a/Documentation/ABI/testing/sysfs-class-devfreq b/Documentation/ABI/testing/sysfs-class-devfreq
index 0ba6ea2f89d9..ee39acacf6f8 100644
--- a/Documentation/ABI/testing/sysfs-class-devfreq
+++ b/Documentation/ABI/testing/sysfs-class-devfreq
@@ -78,3 +78,23 @@ Contact: Nishanth Menon <nm@ti.com>
78Description: 78Description:
79 The /sys/class/devfreq/.../available_governors shows 79 The /sys/class/devfreq/.../available_governors shows
80 currently available governors in the system. 80 currently available governors in the system.
81
82What: /sys/class/devfreq/.../min_freq
83Date: January 2013
84Contact: MyungJoo Ham <myungjoo.ham@samsung.com>
85Description:
86 The /sys/class/devfreq/.../min_freq shows and stores
87 the minimum frequency requested by users. It is 0 if
88 the user does not care. min_freq overrides the
89 frequency requested by governors.
90
91What: /sys/class/devfreq/.../max_freq
92Date: January 2013
93Contact: MyungJoo Ham <myungjoo.ham@samsung.com>
94Description:
95 The /sys/class/devfreq/.../max_freq shows and stores
96 the maximum frequency requested by users. It is 0 if
97 the user does not care. max_freq overrides the
98 frequency requested by governors and min_freq.
99 The max_freq overrides min_freq because max_freq may be
100 used to throttle devices to avoid overheating.
diff --git a/drivers/devfreq/devfreq.c b/drivers/devfreq/devfreq.c
index abfa14dd8b4c..44c407986f64 100644
--- a/drivers/devfreq/devfreq.c
+++ b/drivers/devfreq/devfreq.c
@@ -527,6 +527,8 @@ EXPORT_SYMBOL(devfreq_add_device);
527/** 527/**
528 * devfreq_remove_device() - Remove devfreq feature from a device. 528 * devfreq_remove_device() - Remove devfreq feature from a device.
529 * @devfreq: the devfreq instance to be removed 529 * @devfreq: the devfreq instance to be removed
530 *
531 * The opposite of devfreq_add_device().
530 */ 532 */
531int devfreq_remove_device(struct devfreq *devfreq) 533int devfreq_remove_device(struct devfreq *devfreq)
532{ 534{
@@ -542,6 +544,10 @@ EXPORT_SYMBOL(devfreq_remove_device);
542/** 544/**
543 * devfreq_suspend_device() - Suspend devfreq of a device. 545 * devfreq_suspend_device() - Suspend devfreq of a device.
544 * @devfreq: the devfreq instance to be suspended 546 * @devfreq: the devfreq instance to be suspended
547 *
548 * This function is intended to be called by the pm callbacks
549 * (e.g., runtime_suspend, suspend) of the device driver that
550 * holds the devfreq.
545 */ 551 */
546int devfreq_suspend_device(struct devfreq *devfreq) 552int devfreq_suspend_device(struct devfreq *devfreq)
547{ 553{
@@ -559,6 +565,10 @@ EXPORT_SYMBOL(devfreq_suspend_device);
559/** 565/**
560 * devfreq_resume_device() - Resume devfreq of a device. 566 * devfreq_resume_device() - Resume devfreq of a device.
561 * @devfreq: the devfreq instance to be resumed 567 * @devfreq: the devfreq instance to be resumed
568 *
569 * This function is intended to be called by the pm callbacks
570 * (e.g., runtime_resume, resume) of the device driver that
571 * holds the devfreq.
562 */ 572 */
563int devfreq_resume_device(struct devfreq *devfreq) 573int devfreq_resume_device(struct devfreq *devfreq)
564{ 574{
diff --git a/include/linux/devfreq.h b/include/linux/devfreq.h
index fe8c4476f7e4..5f1ab92107e6 100644
--- a/include/linux/devfreq.h
+++ b/include/linux/devfreq.h
@@ -181,6 +181,8 @@ extern struct devfreq *devfreq_add_device(struct device *dev,
181 const char *governor_name, 181 const char *governor_name,
182 void *data); 182 void *data);
183extern int devfreq_remove_device(struct devfreq *devfreq); 183extern int devfreq_remove_device(struct devfreq *devfreq);
184
185/* Supposed to be called by PM_SLEEP/PM_RUNTIME callbacks */
184extern int devfreq_suspend_device(struct devfreq *devfreq); 186extern int devfreq_suspend_device(struct devfreq *devfreq);
185extern int devfreq_resume_device(struct devfreq *devfreq); 187extern int devfreq_resume_device(struct devfreq *devfreq);
186 188