|
@@ -727,3 +727,22 @@ put_opp_table:
|
|
|
return opp;
|
|
|
}
|
|
|
EXPORT_SYMBOL_GPL(of_dev_pm_opp_find_required_opp);
|
|
|
+
|
|
|
+/**
|
|
|
+ * dev_pm_opp_get_of_node() - Gets the DT node corresponding to an opp
|
|
|
+ * @opp: opp for which DT node has to be returned for
|
|
|
+ *
|
|
|
+ * Return: DT node corresponding to the opp, else 0 on success.
|
|
|
+ *
|
|
|
+ * The caller needs to put the node with of_node_put() after using it.
|
|
|
+ */
|
|
|
+struct device_node *dev_pm_opp_get_of_node(struct dev_pm_opp *opp)
|
|
|
+{
|
|
|
+ if (IS_ERR_OR_NULL(opp)) {
|
|
|
+ pr_err("%s: Invalid parameters\n", __func__);
|
|
|
+ return NULL;
|
|
|
+ }
|
|
|
+
|
|
|
+ return of_node_get(opp->np);
|
|
|
+}
|
|
|
+EXPORT_SYMBOL_GPL(dev_pm_opp_get_of_node);
|