summaryrefslogtreecommitdiff
path: root/include/linux/pm_domain.h
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2018-05-15 00:12:48 +0300
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2018-05-15 00:12:48 +0300
commit8ad17c8eb1b57f2395e2a9e43b71665d89de4f34 (patch)
tree9f407dc97c9fdf8db6116528aae5b750eb9d6c32 /include/linux/pm_domain.h
parent71f277a7bf0b0e65e9571940057c70efc4326bc5 (diff)
parent28fa4aca262ce0865d27788ebc480e643117d7ab (diff)
downloadlinux-8ad17c8eb1b57f2395e2a9e43b71665d89de4f34.tar.xz
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
Diffstat (limited to 'include/linux/pm_domain.h')
-rw-r--r--include/linux/pm_domain.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/include/linux/pm_domain.h b/include/linux/pm_domain.h
index ab1854863a8c..4e5764083fd8 100644
--- a/include/linux/pm_domain.h
+++ b/include/linux/pm_domain.h
@@ -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;