Skip to content

Commit 20ce30f

Browse files
bebarinoGeorgi Djakov
authored andcommitted
interconnect: Restore sync state by ignoring ipa-virt in provider count
Ignore compatible strings for the IPA virt drivers that were removed in commits 2fb251c ("interconnect: qcom: sdx55: Drop IP0 interconnects") and 2f37249 ("interconnect: qcom: sc7180: Drop IP0 interconnects") so that the sync state logic can kick in again. Otherwise all the interconnects in the system will stay pegged at max speeds because 'providers_count' is always going to be one larger than the number of drivers that will ever probe on sc7180 or sdx55. This fixes suspend on sc7180 and sdx55 devices when you don't have a devicetree patch to remove the ipa-virt compatible node. Cc: Bjorn Andersson <[email protected]> Cc: Doug Anderson <[email protected]> Cc: Alex Elder <[email protected]> Cc: Taniya Das <[email protected]> Cc: Mike Tipton <[email protected]> Fixes: 2fb251c ("interconnect: qcom: sdx55: Drop IP0 interconnects") Fixes: 2f37249 ("interconnect: qcom: sc7180: Drop IP0 interconnects") Signed-off-by: Stephen Boyd <[email protected]> Reviewed-by: Alex Elder <[email protected]> Reviewed-by: Douglas Anderson <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Georgi Djakov <[email protected]>
1 parent 2fb251c commit 20ce30f

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

drivers/interconnect/core.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1087,9 +1087,15 @@ static int of_count_icc_providers(struct device_node *np)
10871087
{
10881088
struct device_node *child;
10891089
int count = 0;
1090+
const struct of_device_id __maybe_unused ignore_list[] = {
1091+
{ .compatible = "qcom,sc7180-ipa-virt" },
1092+
{ .compatible = "qcom,sdx55-ipa-virt" },
1093+
{}
1094+
};
10901095

10911096
for_each_available_child_of_node(np, child) {
1092-
if (of_property_read_bool(child, "#interconnect-cells"))
1097+
if (of_property_read_bool(child, "#interconnect-cells") &&
1098+
likely(!of_match_node(ignore_list, child)))
10931099
count++;
10941100
count += of_count_icc_providers(child);
10951101
}

0 commit comments

Comments
 (0)