summaryrefslogtreecommitdiffstats
path: root/include/linux/devfreq.h
diff options
context:
space:
mode:
authorJonghwa Lee <jonghwa3.lee@samsung.com>2012-08-23 20:00:46 +0900
committerMyungJoo Ham <myungjoo.ham@samsung.com>2012-11-20 16:05:44 +0900
commite552bbaf5b987f57c43e6981a452b8a3c700b1ae (patch)
treed48111ab3d5c71ea4ed9e8ae3cb7bfb32b06bdec /include/linux/devfreq.h
parentd287de855f97c56ca7146ff627e652bd7cd64f3f (diff)
downloadblackbird-op-linux-e552bbaf5b987f57c43e6981a452b8a3c700b1ae.tar.gz
blackbird-op-linux-e552bbaf5b987f57c43e6981a452b8a3c700b1ae.zip
PM / devfreq: Add sysfs node for representing frequency transition information.
This patch adds sysfs node which can be used to get information of frequency transition. It represents transition table which contains total number of transition of each freqeuncy state and time spent. It is inspired CPUFREQ's status driver. Signed-off-by: Jonghwa Lee <jonghwa3.lee@samsung.com> [Added Documentation/ABI entry, updated kernel-doc, and resolved merge conflict] Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Diffstat (limited to 'include/linux/devfreq.h')
-rw-r--r--include/linux/devfreq.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/include/linux/devfreq.h b/include/linux/devfreq.h
index 1461fb2355ad..bc35c4aee6a3 100644
--- a/include/linux/devfreq.h
+++ b/include/linux/devfreq.h
@@ -73,6 +73,8 @@ struct devfreq_dev_status {
* from devfreq_remove_device() call. If the user
* has registered devfreq->nb at a notifier-head,
* this is the time to unregister it.
+ * @freq_table: Optional list of frequencies to support statistics.
+ * @max_state: The size of freq_table.
*/
struct devfreq_dev_profile {
unsigned long initial_freq;
@@ -83,6 +85,9 @@ struct devfreq_dev_profile {
struct devfreq_dev_status *stat);
int (*get_cur_freq)(struct device *dev, unsigned long *freq);
void (*exit)(struct device *dev);
+
+ unsigned int *freq_table;
+ unsigned int max_state;
};
/**
@@ -127,6 +132,10 @@ struct devfreq_governor {
* @min_freq: Limit minimum frequency requested by user (0: none)
* @max_freq: Limit maximum frequency requested by user (0: none)
* @stop_polling: devfreq polling status of a device.
+ * @total_trans: Number of devfreq transitions
+ * @trans_table: Statistics of devfreq transitions
+ * @time_in_state: Statistics of devfreq states
+ * @last_stat_updated: The last time stat updated
*
* This structure stores the devfreq information for a give device.
*
@@ -153,6 +162,12 @@ struct devfreq {
unsigned long min_freq;
unsigned long max_freq;
bool stop_polling;
+
+ /* information for device freqeuncy transition */
+ unsigned int total_trans;
+ unsigned int *trans_table;
+ unsigned long *time_in_state;
+ unsigned long last_stat_updated;
};
#if defined(CONFIG_PM_DEVFREQ)
OpenPOWER on IntegriCloud