Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

+32
+20
Documentation/ABI/testing/sysfs-class-devfreq
··· 78 78 Description: 79 79 The /sys/class/devfreq/.../available_governors shows 80 80 currently available governors in the system. 81 + 82 + What: /sys/class/devfreq/.../min_freq 83 + Date: January 2013 84 + Contact: MyungJoo Ham <myungjoo.ham@samsung.com> 85 + Description: 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 + 91 + What: /sys/class/devfreq/.../max_freq 92 + Date: January 2013 93 + Contact: MyungJoo Ham <myungjoo.ham@samsung.com> 94 + Description: 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.
+10
drivers/devfreq/devfreq.c
··· 527 527 /** 528 528 * devfreq_remove_device() - Remove devfreq feature from a device. 529 529 * @devfreq: the devfreq instance to be removed 530 + * 531 + * The opposite of devfreq_add_device(). 530 532 */ 531 533 int devfreq_remove_device(struct devfreq *devfreq) 532 534 { ··· 544 542 /** 545 543 * devfreq_suspend_device() - Suspend devfreq of a device. 546 544 * @devfreq: the devfreq instance to be suspended 545 + * 546 + * This function is intended to be called by the pm callbacks 547 + * (e.g., runtime_suspend, suspend) of the device driver that 548 + * holds the devfreq. 547 549 */ 548 550 int devfreq_suspend_device(struct devfreq *devfreq) 549 551 { ··· 565 559 /** 566 560 * devfreq_resume_device() - Resume devfreq of a device. 567 561 * @devfreq: the devfreq instance to be resumed 562 + * 563 + * This function is intended to be called by the pm callbacks 564 + * (e.g., runtime_resume, resume) of the device driver that 565 + * holds the devfreq. 568 566 */ 569 567 int devfreq_resume_device(struct devfreq *devfreq) 570 568 {
+2
include/linux/devfreq.h
··· 181 181 const char *governor_name, 182 182 void *data); 183 183 extern int devfreq_remove_device(struct devfreq *devfreq); 184 + 185 + /* Supposed to be called by PM_SLEEP/PM_RUNTIME callbacks */ 184 186 extern int devfreq_suspend_device(struct devfreq *devfreq); 185 187 extern int devfreq_resume_device(struct devfreq *devfreq); 186 188