@@ -338,6 +338,21 @@ int dev_pm_opp_of_find_icc_paths(struct device *dev,
struct device_node *np;
int ret = 0, i, count, num_paths;
struct icc_path **paths;
+ struct property *prop;
+
+ /* Check for bandwidth values on the first OPP node */
+ if (opp_table && opp_table->np) {
+ np = of_get_next_available_child(opp_table->np, NULL);
+ if (!np) {
+ dev_err(dev, "Empty OPP table\n");
+ return 0;
+ }
+
+ prop = of_find_property(np, "opp-peak-kBps", NULL);
+ of_node_put(np);
+ if (!prop || !prop->length)
+ return 0;
+ }
np = of_node_get(dev->of_node);
if (!np)
Prevent the core from creating and voting on icc paths when the opp-table does not have the bandwidth values populated. Currently this check is performed on the first OPP node. Signed-off-by: Sibi Sankar <sibis@codeaurora.org> --- drivers/opp/of.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+)