summaryrefslogtreecommitdiff
path: root/drivers/opp
diff options
context:
space:
mode:
authorViresh Kumar <viresh.kumar@linaro.org>2021-01-27 14:23:45 +0530
committerViresh Kumar <viresh.kumar@linaro.org>2021-02-02 10:27:26 +0530
commit559fef0dfd91145b59b7c61061504f344ecf9ad8 (patch)
tree949f10a8e49be6e94f536c6b429710c4c32122b7 /drivers/opp
parent32439ac7535a8eddfa016c62ca66ce33b7df1573 (diff)
opp: Add dev_pm_opp_of_add_table_noclk()
A few drivers have device's clk but they don't want the OPP core to handle that. Add a new helper for them, dev_pm_opp_of_add_table_noclk(). Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> Tested-by: Dmitry Osipenko <digetx@gmail.com>
Diffstat (limited to 'drivers/opp')
-rw-r--r--drivers/opp/of.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/drivers/opp/of.c b/drivers/opp/of.c
index d4b51b2e384f..a905497c75f8 100644
--- a/drivers/opp/of.c
+++ b/drivers/opp/of.c
@@ -1030,6 +1030,24 @@ int dev_pm_opp_of_add_table_indexed(struct device *dev, int index)
}
EXPORT_SYMBOL_GPL(dev_pm_opp_of_add_table_indexed);
+/**
+ * dev_pm_opp_of_add_table_noclk() - Initialize indexed opp table from device
+ * tree without getting clk for device.
+ * @dev: device pointer used to lookup OPP table.
+ * @index: Index number.
+ *
+ * Register the initial OPP table with the OPP library for given device only
+ * using the "operating-points-v2" property. Do not try to get the clk for the
+ * device.
+ *
+ * Return: Refer to dev_pm_opp_of_add_table() for return values.
+ */
+int dev_pm_opp_of_add_table_noclk(struct device *dev, int index)
+{
+ return _of_add_table_indexed(dev, index, false);
+}
+EXPORT_SYMBOL_GPL(dev_pm_opp_of_add_table_noclk);
+
/* CPU device specific helpers */
/**