@@ -382,6 +382,16 @@ static int cros_typec_init_ports(struct cros_typec_data *typec)
return -EINVAL;
}
+ /*
+ * OF graph may have set up some device links with switches, since
+ * connectors have their own compatible. Purge these to avoid a deadlock
+ * in switch probe (the switch mistakenly assumes the connector is a
+ * supplier).
+ */
+ if (dev->of_node)
+ device_for_each_child_node(dev, fwnode)
+ fw_devlink_purge_absent_suppliers(fwnode);
+
/* DT uses "reg" to specify port number. */
port_prop = dev->of_node ? "reg" : "port-number";
device_for_each_child_node(dev, fwnode) {