[RFC v3 05/10] opp: of: export _opp_of_get_opp_desc_node

From: Sibi Sankar
Date: Mon Jan 27 2020 - 15:04:53 EST


Export _opp_of_get_opp_desc_node in preparation for attaching multiple
opp_table per device.

Signed-off-by: Sibi Sankar <sibis@xxxxxxxxxxxxxx>
---
drivers/opp/of.c | 3 +--
drivers/opp/opp.h | 2 ++
2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/opp/of.c b/drivers/opp/of.c
index 43acf54934be7..015ee9ab09485 100644
--- a/drivers/opp/of.c
+++ b/drivers/opp/of.c
@@ -25,8 +25,7 @@
* Returns opp descriptor node for a device node, caller must
* do of_node_put().
*/
-static struct device_node *_opp_of_get_opp_desc_node(struct device_node *np,
- int index)
+struct device_node *_opp_of_get_opp_desc_node(struct device_node *np, int index)
{
/* "operating-points-v2" can be an array for power domain providers */
return of_parse_phandle(np, "operating-points-v2", index);
diff --git a/drivers/opp/opp.h b/drivers/opp/opp.h
index 9e021f819acca..6f56ff6038605 100644
--- a/drivers/opp/opp.h
+++ b/drivers/opp/opp.h
@@ -226,12 +226,14 @@ void _put_opp_list_kref(struct opp_table *opp_table);
void _of_init_opp_table(struct opp_table *opp_table, struct device *dev, int index);
void _of_clear_opp_table(struct opp_table *opp_table);
struct opp_table *_managed_opp(struct device *dev, int index);
+struct device_node *_opp_of_get_opp_desc_node(struct device_node *np, int index);
void _of_opp_free_required_opps(struct opp_table *opp_table,
struct dev_pm_opp *opp);
#else
static inline void _of_init_opp_table(struct opp_table *opp_table, struct device *dev, int index) {}
static inline void _of_clear_opp_table(struct opp_table *opp_table) {}
static inline struct opp_table *_managed_opp(struct device *dev, int index) { return NULL; }
+static inline struct device_node *_opp_of_get_opp_desc_node(struct device_node *np, int index) { return NULL; }
static inline void _of_opp_free_required_opps(struct opp_table *opp_table,
struct dev_pm_opp *opp) {}
#endif
--
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project