diff options
author | Rajagopal Venkat <rajagopal.venkat@linaro.org> | 2012-10-25 19:50:26 -0400 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2012-11-14 18:35:04 -0500 |
commit | 7f98a905dca6e4f144cdd4462edeac00c2bdc379 (patch) | |
tree | 4841af3592cbd0b21f50a40f17900dfc9fc40804 /include/linux/devfreq.h | |
parent | 206c30cfeb7c05dfb9fdfd81b1deb933627e43c1 (diff) |
PM / devfreq: Add current freq callback in device profile
Devfreq returns governor predicted frequency as current frequency
via sysfs interface. But device may not support all frequencies
that governor predicts. So add a callback in device profile to get
current freq from driver. Also add a new sysfs node to expose
governor predicted next target frequency.
Signed-off-by: Rajagopal Venkat <rajagopal.venkat@linaro.org>
Acked-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'include/linux/devfreq.h')
-rw-r--r-- | include/linux/devfreq.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/devfreq.h b/include/linux/devfreq.h index ee243a3229b8..7e2e2ea4a70f 100644 --- a/include/linux/devfreq.h +++ b/include/linux/devfreq.h | |||
@@ -66,6 +66,8 @@ struct devfreq_dev_status { | |||
66 | * explained above with "DEVFREQ_FLAG_*" macros. | 66 | * explained above with "DEVFREQ_FLAG_*" macros. |
67 | * @get_dev_status The device should provide the current performance | 67 | * @get_dev_status The device should provide the current performance |
68 | * status to devfreq, which is used by governors. | 68 | * status to devfreq, which is used by governors. |
69 | * @get_cur_freq The device should provide the current frequency | ||
70 | * at which it is operating. | ||
69 | * @exit An optional callback that is called when devfreq | 71 | * @exit An optional callback that is called when devfreq |
70 | * is removing the devfreq object due to error or | 72 | * is removing the devfreq object due to error or |
71 | * from devfreq_remove_device() call. If the user | 73 | * from devfreq_remove_device() call. If the user |
@@ -79,6 +81,7 @@ struct devfreq_dev_profile { | |||
79 | int (*target)(struct device *dev, unsigned long *freq, u32 flags); | 81 | int (*target)(struct device *dev, unsigned long *freq, u32 flags); |
80 | int (*get_dev_status)(struct device *dev, | 82 | int (*get_dev_status)(struct device *dev, |
81 | struct devfreq_dev_status *stat); | 83 | struct devfreq_dev_status *stat); |
84 | int (*get_cur_freq)(struct device *dev, unsigned long *freq); | ||
82 | void (*exit)(struct device *dev); | 85 | void (*exit)(struct device *dev); |
83 | }; | 86 | }; |
84 | 87 | ||