lkml.org 
[lkml]   [2019]   [Feb]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [PATCH v2 6/9] usb: roles: Find the muxes by also matching against the device node
On Mon, Feb 11, 2019 at 09:58:04AM +0000, Jun Li wrote:
> Hi Heikki,
>
> > @@ -84,7 +85,12 @@ enum usb_role usb_role_switch_get_role(struct
> > usb_role_switch *sw) } EXPORT_SYMBOL_GPL(usb_role_switch_get_role);
> >
> > -static int __switch_match(struct device *dev, const void *name)
> > +static int switch_fwnode_match(struct device *dev, const void *fwnode)
> > +{
> > + return dev_fwnode(dev) == fwnode;
>
> You missed the comment
> https://lkml.org/lkml/2019/1/22/437
>
> return dev_fwnode(dev->parent) == fwnode;

That's actually not the case. struct usb_role_switch_desc has a member
for fwnode, and that's what we use with the actual mux device. Check
usb_role_switch_register():

...
sw->dev.fwnode = desc->fwnode;
...

Sorry for not realizing it before.

thanks,

--
heikki

\
 
 \ /
  Last update: 2019-02-11 11:47    [W:0.057 / U:3.960 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site