diff options
| author | Lina Iyer <[email protected]> | 2016-10-14 10:47:49 -0700 |
|---|---|---|
| committer | Rafael J. Wysocki <[email protected]> | 2016-10-21 22:19:36 +0200 |
| commit | 59d65b73a23cee48e6f3e44686f199d79b7ee854 (patch) | |
| tree | 6950b8245adb5d2bd2b102a7b621f4945e71209c /include/linux | |
| parent | 1001354ca34179f3db924eb66672442a173147dc (diff) | |
PM / Domains: Make genpd state allocation dynamic
Allow PM Domain states to be defined dynamically by the drivers. This
removes the limitation on the maximum number of states possible for a
domain.
Suggested-by: Ulf Hansson <[email protected]>
Signed-off-by: Lina Iyer <[email protected]>
Acked-by: Ulf Hansson <[email protected]>
Reviewed-by: Kevin Hilman <[email protected]>
Signed-off-by: Rafael J. Wysocki <[email protected]>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/pm_domain.h | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/include/linux/pm_domain.h b/include/linux/pm_domain.h index a09fe5c009c8..de1d8f331b03 100644 --- a/include/linux/pm_domain.h +++ b/include/linux/pm_domain.h @@ -19,8 +19,6 @@ /* Defines used for the flags field in the struct generic_pm_domain */ #define GENPD_FLAG_PM_CLK (1U << 0) /* PM domain uses PM clk */ -#define GENPD_MAX_NUM_STATES 8 /* Number of possible low power states */ - enum gpd_status { GPD_STATE_ACTIVE = 0, /* PM domain is active */ GPD_STATE_POWER_OFF, /* PM domain is off */ @@ -70,9 +68,10 @@ struct generic_pm_domain { void (*detach_dev)(struct generic_pm_domain *domain, struct device *dev); unsigned int flags; /* Bit field of configs for genpd */ - struct genpd_power_state states[GENPD_MAX_NUM_STATES]; + struct genpd_power_state *states; unsigned int state_count; /* number of states */ unsigned int state_idx; /* state that genpd will go to when off */ + void *free; /* Free the state that was allocated for default */ }; |