diff options
author | Chanwoo Choi <cw00.choi@samsung.com> | 2020-10-05 14:48:01 +0900 |
---|---|---|
committer | Chanwoo Choi <cw00.choi@samsung.com> | 2020-10-26 10:54:41 +0900 |
commit | 0dd25a0d12a134cd2ba950d8c0530d4ece05c63b (patch) | |
tree | 2e2a3b99a7f47fb5b195233604a8aa96a0656ec1 /drivers/devfreq/governor_passive.c | |
parent | cab477d0d4fbae1ed68d3db0b52cb5449a3c5868 (diff) | |
download | linux-0dd25a0d12a134cd2ba950d8c0530d4ece05c63b.tar.gz |
PM / devfreq: Add governor feature flag
The devfreq governor is able to have the specific flag as follows
in order to implement the specific feature. For example, devfreq allows
user to change the governors on runtime via sysfs interface.
But, if devfreq device uses 'passive' governor, don't allow user to change
the governor. For this case, define the DEVFREQ_GOV_FLAG_IMMUTABLE
and set it to flag of passive governor.
[Definition for governor flag]
- DEVFREQ_GOV_FLAG_IMMUTABLE
: If immutable flag is set, governor is never changeable to other governors.
- DEVFREQ_GOV_FLAG_IRQ_DRIVEN
: Devfreq core won't schedule polling work for this governor if value is set.
[Table of governor flag for devfreq governors]
------------------------------------------------------------------------------
| simple | perfor | power | user | passive | tegra30
| ondemand | mance | save | space| |
------------------------------------------------------------------------------
immutable | X | X | X | X | O | O
interrupt_driven | X(polling)| X | X | X | X | O (irq)
------------------------------------------------------------------------------
Reviewed-by: Dmitry Osipenko <digetx@gmail.com>
Tested-by: Dmitry Osipenko <digetx@gmail.com>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Diffstat (limited to 'drivers/devfreq/governor_passive.c')
-rw-r--r-- | drivers/devfreq/governor_passive.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/devfreq/governor_passive.c b/drivers/devfreq/governor_passive.c index 53a1b1596232..63332e4a65ae 100644 --- a/drivers/devfreq/governor_passive.c +++ b/drivers/devfreq/governor_passive.c @@ -158,7 +158,7 @@ static int devfreq_passive_event_handler(struct devfreq *devfreq, static struct devfreq_governor devfreq_passive = { .name = DEVFREQ_GOV_PASSIVE, - .immutable = 1, + .flags = DEVFREQ_GOV_FLAG_IMMUTABLE, .get_target_freq = devfreq_passive_get_target_freq, .event_handler = devfreq_passive_event_handler, }; |