mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-07 23:11:27 +00:00
Merge branch 'opp/genpd-pstate-updates' of git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm
Pull Operating Performance Points (OPP) library changes for v4.18 from Viresh Kumar. * 'opp/genpd-pstate-updates' of git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm: PM / OPP: Remove dev_pm_opp_{un}register_get_pstate_helper() PM / OPP: Get performance state using genpd helper PM / Domain: Implement of_genpd_opp_to_performance_state() PM / Domain: Add support to parse domain's OPP table PM / Domain: Add struct device to genpd PM / OPP: Implement dev_pm_opp_get_of_node() PM / OPP: Implement of_dev_pm_opp_find_required_opp() PM / OPP: Implement dev_pm_opp_of_add_table_indexed() PM / OPP: "opp-hz" is optional for power domains PM / OPP: dt-bindings: Make "opp-hz" optional for power domains PM / OPP: dt-bindings: Rename "required-opp" as "required-opps" soc/tegra: pmc: Don't allocate struct tegra_powergate on stack
This commit is contained in:
commit
8ad17c8eb1
10 changed files with 395 additions and 183 deletions
|
@ -47,8 +47,10 @@ struct genpd_power_state {
|
|||
};
|
||||
|
||||
struct genpd_lock_ops;
|
||||
struct dev_pm_opp;
|
||||
|
||||
struct generic_pm_domain {
|
||||
struct device dev;
|
||||
struct dev_pm_domain domain; /* PM domain operations */
|
||||
struct list_head gpd_list_node; /* Node in the global PM domains list */
|
||||
struct list_head master_links; /* Links with PM domain as a master */
|
||||
|
@ -67,6 +69,8 @@ struct generic_pm_domain {
|
|||
unsigned int performance_state; /* Aggregated max performance state */
|
||||
int (*power_off)(struct generic_pm_domain *domain);
|
||||
int (*power_on)(struct generic_pm_domain *domain);
|
||||
unsigned int (*opp_to_performance_state)(struct generic_pm_domain *genpd,
|
||||
struct dev_pm_opp *opp);
|
||||
int (*set_performance_state)(struct generic_pm_domain *genpd,
|
||||
unsigned int state);
|
||||
struct gpd_dev_ops dev_ops;
|
||||
|
@ -243,6 +247,8 @@ extern int of_genpd_add_subdomain(struct of_phandle_args *parent,
|
|||
extern struct generic_pm_domain *of_genpd_remove_last(struct device_node *np);
|
||||
extern int of_genpd_parse_idle_states(struct device_node *dn,
|
||||
struct genpd_power_state **states, int *n);
|
||||
extern unsigned int of_genpd_opp_to_performance_state(struct device *dev,
|
||||
struct device_node *opp_node);
|
||||
|
||||
int genpd_dev_pm_attach(struct device *dev);
|
||||
#else /* !CONFIG_PM_GENERIC_DOMAINS_OF */
|
||||
|
@ -278,6 +284,13 @@ static inline int of_genpd_parse_idle_states(struct device_node *dn,
|
|||
return -ENODEV;
|
||||
}
|
||||
|
||||
static inline unsigned int
|
||||
of_genpd_opp_to_performance_state(struct device *dev,
|
||||
struct device_node *opp_node)
|
||||
{
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
static inline int genpd_dev_pm_attach(struct device *dev)
|
||||
{
|
||||
return 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue