Re: [PATCH v2 6/9] usb: roles: Find the muxes by also matching against the device node

2019-02-12 Thread Heikki Krogerus
Hi, On Tue, Feb 12, 2019 at 10:41:28AM +, Jun Li wrote: > > @@ -32,6 +32,7 @@ typedef enum usb_role (*usb_role_switch_get_t)(struct > > device *dev); > > * usb_role_switch_register() before registering the switch. > > */ > > struct usb_role_switch_desc { > > + struct fwnode_handle

RE: [PATCH v2 6/9] usb: roles: Find the muxes by also matching against the device node

2019-02-12 Thread Jun Li
Hi > -Original Message- > From: Heikki Krogerus > Sent: 2019年2月12日 16:51 > To: Jun Li > Cc: Greg Kroah-Hartman ; Andy Shevchenko > ; Chen Yu ; Hans de > Goede ; linux-...@vger.kernel.org; > linux-kernel@vger.kernel.org > Subject: Re: [PATCH v2 6/9] usb: roles: Find the muxes by also

Re: [PATCH v2 6/9] usb: roles: Find the muxes by also matching against the device node

2019-02-12 Thread Heikki Krogerus
Hi, On Tue, Feb 12, 2019 at 06:03:42AM +, Jun Li wrote: > > > 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():

RE: [PATCH v2 6/9] usb: roles: Find the muxes by also matching against the device node

2019-02-11 Thread Jun Li
> -Original Message- > From: Heikki Krogerus > Sent: 2019年2月11日 18:46 > To: Jun Li > Cc: Greg Kroah-Hartman ; Andy Shevchenko > ; Chen Yu ; Hans de > Goede ; linux-...@vger.kernel.org; > linux-kernel@vger.kernel.org > Subject: Re: [PATCH v2 6/9] usb: roles: Find the muxes by also

Re: [PATCH v2 6/9] usb: roles: Find the muxes by also matching against the device node

2019-02-11 Thread Heikki Krogerus
On Mon, Feb 11, 2019 at 12:46:29PM +0200, Heikki Krogerus wrote: > On Mon, Feb 11, 2019 at 09:58:04AM +, 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); > > > >

Re: [PATCH v2 6/9] usb: roles: Find the muxes by also matching against the device node

2019-02-11 Thread Heikki Krogerus
On Mon, Feb 11, 2019 at 09:58:04AM +, 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) > >

RE: [PATCH v2 6/9] usb: roles: Find the muxes by also matching against the device node

2019-02-11 Thread Jun Li
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) >