diff options
author | Nishanth Menon <nm@ti.com> | 2012-10-29 16:01:43 -0400 |
---|---|---|
committer | MyungJoo Ham <myungjoo.ham@samsung.com> | 2012-11-20 04:46:12 -0500 |
commit | 3aa173b8db200bb96354481acc0a5b9e123119fe (patch) | |
tree | f24511e8b86dd4c482f8551317363ed07fb327a6 /include/linux/devfreq.h | |
parent | 2df5021fa9738905e8b1ab92fa0cd685430f54da (diff) |
PM / devfreq: provide hooks for governors to be registered
Add devfreq_add_governor and devfreq_remove_governor which
can be invoked by governors to register with devfreq.
This sets up the stage to dynamically switch governors and
allow governors to be dynamically loaded as well.
Cc: Rajagopal Venkat <rajagopal.venkat@linaro.org>
Cc: MyungJoo Ham <myungjoo.ham@samsung.com>
Cc: Kyungmin Park <kyungmin.park@samsung.com>
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: Kevin Hilman <khilman@ti.com>
Cc: linux-pm@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Nishanth Menon <nm@ti.com>
Acked-by: MyungJoo Ham <myungjoo.ham@samsung.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 bc35c4aee6a3..6484a3f8dda8 100644 --- a/include/linux/devfreq.h +++ b/include/linux/devfreq.h | |||
@@ -92,6 +92,7 @@ struct devfreq_dev_profile { | |||
92 | 92 | ||
93 | /** | 93 | /** |
94 | * struct devfreq_governor - Devfreq policy governor | 94 | * struct devfreq_governor - Devfreq policy governor |
95 | * @node: list node - contains registered devfreq governors | ||
95 | * @name: Governor's name | 96 | * @name: Governor's name |
96 | * @get_target_freq: Returns desired operating frequency for the device. | 97 | * @get_target_freq: Returns desired operating frequency for the device. |
97 | * Basically, get_target_freq will run | 98 | * Basically, get_target_freq will run |
@@ -107,6 +108,8 @@ struct devfreq_dev_profile { | |||
107 | * Note that the callbacks are called with devfreq->lock locked by devfreq. | 108 | * Note that the callbacks are called with devfreq->lock locked by devfreq. |
108 | */ | 109 | */ |
109 | struct devfreq_governor { | 110 | struct devfreq_governor { |
111 | struct list_head node; | ||
112 | |||
110 | const char name[DEVFREQ_NAME_LEN]; | 113 | const char name[DEVFREQ_NAME_LEN]; |
111 | int (*get_target_freq)(struct devfreq *this, unsigned long *freq); | 114 | int (*get_target_freq)(struct devfreq *this, unsigned long *freq); |
112 | int (*event_handler)(struct devfreq *devfreq, | 115 | int (*event_handler)(struct devfreq *devfreq, |