diff options
author | Rajendra Nayak <rnayak@codeaurora.org> | 2015-12-01 21:42:11 +0530 |
---|---|---|
committer | Stephen Boyd <sboyd@codeaurora.org> | 2016-02-11 16:24:00 -0800 |
commit | c2c7f0a47493ae23f9a76fabdbdd4f25e1de0925 (patch) | |
tree | 504a0b0db5ca155532ddd9445ec7be343c8bee40 /drivers/clk/qcom/gdsc.h | |
parent | 7e0810c9485ce696df3813574bca44139f6eb0c8 (diff) |
clk: qcom: gdsc: Add support for hierarchical power domains
Some qcom SoCs' can have hierarchical power domains. Let the gdsc structs
specify the parents (if any) and the driver add genpd subdomains for them.
Signed-off-by: Rajendra Nayak <rnayak@codeaurora.org>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Diffstat (limited to 'drivers/clk/qcom/gdsc.h')
-rw-r--r-- | drivers/clk/qcom/gdsc.h | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/drivers/clk/qcom/gdsc.h b/drivers/clk/qcom/gdsc.h index 5ded26884f08..4e9dfc11ef57 100644 --- a/drivers/clk/qcom/gdsc.h +++ b/drivers/clk/qcom/gdsc.h @@ -41,6 +41,7 @@ struct reset_controller_dev; */ struct gdsc { struct generic_pm_domain pd; + struct generic_pm_domain *parent; struct regmap *regmap; unsigned int gdscr; unsigned int *cxcs; @@ -51,18 +52,24 @@ struct gdsc { unsigned int reset_count; }; +struct gdsc_desc { + struct device *dev; + struct gdsc **scs; + size_t num; +}; + #ifdef CONFIG_QCOM_GDSC -int gdsc_register(struct device *, struct gdsc **, size_t n, - struct reset_controller_dev *, struct regmap *); -void gdsc_unregister(struct device *); +int gdsc_register(struct gdsc_desc *desc, struct reset_controller_dev *, + struct regmap *); +void gdsc_unregister(struct gdsc_desc *desc); #else -static inline int gdsc_register(struct device *d, struct gdsc **g, size_t n, +static inline int gdsc_register(struct gdsc_desc *desc, struct reset_controller_dev *rcdev, struct regmap *r) { return -ENOSYS; } -static inline void gdsc_unregister(struct device *d) {}; +static inline void gdsc_unregister(struct gdsc_desc *desc) {}; #endif /* CONFIG_QCOM_GDSC */ #endif /* __QCOM_GDSC_H__ */ |