* [PATCH] PM / devfreq: add comments and Documentation
@ 2013-02-05 9:45 MyungJoo Ham
2013-02-05 15:02 ` Nishanth Menon
2013-02-05 15:41 ` Rajagopal Venkat
0 siblings, 2 replies; 3+ messages in thread
From: MyungJoo Ham @ 2013-02-05 9:45 UTC (permalink / raw)
To: linux-pm, linux-kernel
Cc: rafael.j.wysocki, rajagopal.venkat, nm, a.kesavan, jonghwa3.lee,
sangjung.woo, myungjoo.ham
- Added missing ABI documents
- Added comments to clarify the objectives of functions
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
---
Documentation/ABI/testing/sysfs-class-devfreq | 20 ++++++++++++++++++++
drivers/devfreq/devfreq.c | 10 ++++++++++
include/linux/devfreq.h | 2 ++
3 files changed, 32 insertions(+), 0 deletions(-)
diff --git a/Documentation/ABI/testing/sysfs-class-devfreq b/Documentation/ABI/testing/sysfs-class-devfreq
index 0ba6ea2..ee39aca 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>
Description:
The /sys/class/devfreq/.../available_governors shows
currently available governors in the system.
+
+What: /sys/class/devfreq/.../min_freq
+Date: January 2013
+Contact: MyungJoo Ham <myungjoo.ham@samsung.com>
+Description:
+ The /sys/class/devfreq/.../min_freq shows and stores
+ the minimum frequency requested by users. It is 0 if
+ the user does not care. min_freq overrides the
+ frequency requested by governors.
+
+What: /sys/class/devfreq/.../max_freq
+Date: January 2013
+Contact: MyungJoo Ham <myungjoo.ham@samsung.com>
+Description:
+ The /sys/class/devfreq/.../max_freq shows and stores
+ the maximum frequency requested by users. It is 0 if
+ the user does not care. max_freq overrides the
+ frequency requested by governors and min_freq.
+ The max_freq overrides min_freq because max_freq may be
+ used to throttle devices to avoid overheating.
diff --git a/drivers/devfreq/devfreq.c b/drivers/devfreq/devfreq.c
index abfa14d..44c4079 100644
--- a/drivers/devfreq/devfreq.c
+++ b/drivers/devfreq/devfreq.c
@@ -527,6 +527,8 @@ EXPORT_SYMBOL(devfreq_add_device);
/**
* devfreq_remove_device() - Remove devfreq feature from a device.
* @devfreq: the devfreq instance to be removed
+ *
+ * The opposite of devfreq_add_device().
*/
int devfreq_remove_device(struct devfreq *devfreq)
{
@@ -542,6 +544,10 @@ EXPORT_SYMBOL(devfreq_remove_device);
/**
* devfreq_suspend_device() - Suspend devfreq of a device.
* @devfreq: the devfreq instance to be suspended
+ *
+ * This function is intended to be called by the pm callbacks
+ * (e.g., runtime_suspend, suspend) of the device driver that
+ * holds the devfreq.
*/
int devfreq_suspend_device(struct devfreq *devfreq)
{
@@ -559,6 +565,10 @@ EXPORT_SYMBOL(devfreq_suspend_device);
/**
* devfreq_resume_device() - Resume devfreq of a device.
* @devfreq: the devfreq instance to be resumed
+ *
+ * This function is intended to be called by the pm callbacks
+ * (e.g., runtime_resume, resume) of the device driver that
+ * holds the devfreq.
*/
int devfreq_resume_device(struct devfreq *devfreq)
{
diff --git a/include/linux/devfreq.h b/include/linux/devfreq.h
index e83ef39..04ad61d 100644
--- a/include/linux/devfreq.h
+++ b/include/linux/devfreq.h
@@ -181,6 +181,8 @@ extern struct devfreq *devfreq_add_device(struct device *dev,
const char *governor_name,
void *data);
extern int devfreq_remove_device(struct devfreq *devfreq);
+
+/* Supposed to be called by PM_SLEEP/PM_RUNTIME callbacks */
extern int devfreq_suspend_device(struct devfreq *devfreq);
extern int devfreq_resume_device(struct devfreq *devfreq);
--
1.7.5.4
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH] PM / devfreq: add comments and Documentation
2013-02-05 9:45 [PATCH] PM / devfreq: add comments and Documentation MyungJoo Ham
@ 2013-02-05 15:02 ` Nishanth Menon
2013-02-05 15:41 ` Rajagopal Venkat
1 sibling, 0 replies; 3+ messages in thread
From: Nishanth Menon @ 2013-02-05 15:02 UTC (permalink / raw)
To: MyungJoo Ham
Cc: linux-pm, linux-kernel, rafael.j.wysocki, rajagopal.venkat,
a.kesavan, jonghwa3.lee, sangjung.woo, myungjoo.ham
On 18:45-20130205, MyungJoo Ham wrote:
> - 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>
--
Regards,
Nishanth Menon
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] PM / devfreq: add comments and Documentation
2013-02-05 9:45 [PATCH] PM / devfreq: add comments and Documentation MyungJoo Ham
2013-02-05 15:02 ` Nishanth Menon
@ 2013-02-05 15:41 ` Rajagopal Venkat
1 sibling, 0 replies; 3+ messages in thread
From: Rajagopal Venkat @ 2013-02-05 15:41 UTC (permalink / raw)
To: MyungJoo Ham
Cc: linux-pm, linux-kernel, rafael.j.wysocki, nm, a.kesavan,
jonghwa3.lee, sangjung.woo, myungjoo.ham
On 5 February 2013 15:15, MyungJoo Ham <myungjoo.ham@samsung.com> wrote:
> - Added missing ABI documents
> - Added comments to clarify the objectives of functions
>
> Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Acked-by: Rajagopal Venkat <rajagopal.venkat@linaro.org>
> ---
> Documentation/ABI/testing/sysfs-class-devfreq | 20 ++++++++++++++++++++
> drivers/devfreq/devfreq.c | 10 ++++++++++
> include/linux/devfreq.h | 2 ++
> 3 files changed, 32 insertions(+), 0 deletions(-)
>
> diff --git a/Documentation/ABI/testing/sysfs-class-devfreq b/Documentation/ABI/testing/sysfs-class-devfreq
> index 0ba6ea2..ee39aca 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>
> Description:
> The /sys/class/devfreq/.../available_governors shows
> currently available governors in the system.
> +
> +What: /sys/class/devfreq/.../min_freq
> +Date: January 2013
> +Contact: MyungJoo Ham <myungjoo.ham@samsung.com>
> +Description:
> + The /sys/class/devfreq/.../min_freq shows and stores
> + the minimum frequency requested by users. It is 0 if
> + the user does not care. min_freq overrides the
> + frequency requested by governors.
> +
> +What: /sys/class/devfreq/.../max_freq
> +Date: January 2013
> +Contact: MyungJoo Ham <myungjoo.ham@samsung.com>
> +Description:
> + The /sys/class/devfreq/.../max_freq shows and stores
> + the maximum frequency requested by users. It is 0 if
> + the user does not care. max_freq overrides the
> + frequency requested by governors and min_freq.
> + The max_freq overrides min_freq because max_freq may be
> + used to throttle devices to avoid overheating.
> diff --git a/drivers/devfreq/devfreq.c b/drivers/devfreq/devfreq.c
> index abfa14d..44c4079 100644
> --- a/drivers/devfreq/devfreq.c
> +++ b/drivers/devfreq/devfreq.c
> @@ -527,6 +527,8 @@ EXPORT_SYMBOL(devfreq_add_device);
> /**
> * devfreq_remove_device() - Remove devfreq feature from a device.
> * @devfreq: the devfreq instance to be removed
> + *
> + * The opposite of devfreq_add_device().
> */
> int devfreq_remove_device(struct devfreq *devfreq)
> {
> @@ -542,6 +544,10 @@ EXPORT_SYMBOL(devfreq_remove_device);
> /**
> * devfreq_suspend_device() - Suspend devfreq of a device.
> * @devfreq: the devfreq instance to be suspended
> + *
> + * This function is intended to be called by the pm callbacks
> + * (e.g., runtime_suspend, suspend) of the device driver that
> + * holds the devfreq.
> */
> int devfreq_suspend_device(struct devfreq *devfreq)
> {
> @@ -559,6 +565,10 @@ EXPORT_SYMBOL(devfreq_suspend_device);
> /**
> * devfreq_resume_device() - Resume devfreq of a device.
> * @devfreq: the devfreq instance to be resumed
> + *
> + * This function is intended to be called by the pm callbacks
> + * (e.g., runtime_resume, resume) of the device driver that
> + * holds the devfreq.
> */
> int devfreq_resume_device(struct devfreq *devfreq)
> {
> diff --git a/include/linux/devfreq.h b/include/linux/devfreq.h
> index e83ef39..04ad61d 100644
> --- a/include/linux/devfreq.h
> +++ b/include/linux/devfreq.h
> @@ -181,6 +181,8 @@ extern struct devfreq *devfreq_add_device(struct device *dev,
> const char *governor_name,
> void *data);
> extern int devfreq_remove_device(struct devfreq *devfreq);
> +
> +/* Supposed to be called by PM_SLEEP/PM_RUNTIME callbacks */
> extern int devfreq_suspend_device(struct devfreq *devfreq);
> extern int devfreq_resume_device(struct devfreq *devfreq);
>
> --
> 1.7.5.4
>
--
Regards,
Rajagopal
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-02-05 15:42 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-02-05 9:45 [PATCH] PM / devfreq: add comments and Documentation MyungJoo Ham
2013-02-05 15:02 ` Nishanth Menon
2013-02-05 15:41 ` Rajagopal Venkat
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox