Re: [PATCH] Revert "tcpm: allow looking for role_sw device in the main node"
From: Xu Yang
Date: Mon Mar 09 2026 - 03:44:47 EST
On Fri, Mar 06, 2026 at 05:24:43PM +0100, Arnaud Ferraris wrote:
> >
> > Anyway, it should be another potential issue. Can you test whether below
> > patch fix your issue?
> >
> > diff --git a/drivers/usb/roles/class.c b/drivers/usb/roles/class.c
> > index b8e28ceca51e..edec139b68b5 100644
> > --- a/drivers/usb/roles/class.c
> > +++ b/drivers/usb/roles/class.c
> > @@ -139,9 +139,14 @@ static void *usb_role_switch_match(const struct fwnode_handle *fwnode, const cha
> > static struct usb_role_switch *
> > usb_role_switch_is_parent(struct fwnode_handle *fwnode)
> > {
> > - struct fwnode_handle *parent = fwnode_get_parent(fwnode);
> > + struct fwnode_handle *parent;
> > struct device *dev;
> >
> > + if (!fwnode_device_is_compatible(fwnode, "usb-b-connector"))
> > + return NULL;
> > +
> > + parent = fwnode_get_parent(fwnode);
> > +
> > if (!fwnode_property_present(parent, "usb-role-switch")) {
> > fwnode_handle_put(parent);
> > return NULL;
>
> I can confirm that reverting 1366cd228b0 and applying the above works on
> this device.
Good to know.
Thank you!
Best Regards,
Xu Yang