Re: [PATCH v2 6/6] usb: typec: Link all ports during connector registration

2021-03-29 Thread Greg Kroah-Hartman
On Mon, Mar 29, 2021 at 12:19:36PM +0300, Heikki Krogerus wrote: > > I could make a stub for the usb_for_each_port() function in case > > CONFIG_USB is not enable. Would that work? > > Ah, I think that's what you meant :-) Yes, that's what I meant :) thanks, greg k-h

Re: [PATCH v2 6/6] usb: typec: Link all ports during connector registration

2021-03-29 Thread Heikki Krogerus
> I could make a stub for the usb_for_each_port() function in case > CONFIG_USB is not enable. Would that work? Ah, I think that's what you meant :-) I'll fix it. thaks, -- heikki

Re: [PATCH v2 6/6] usb: typec: Link all ports during connector registration

2021-03-29 Thread Heikki Krogerus
On Mon, Mar 29, 2021 at 10:48:19AM +0200, Greg Kroah-Hartman wrote: > On Mon, Mar 29, 2021 at 11:44:26AM +0300, Heikki Krogerus wrote: > > +#ifdef CONFIG_USB > > This feels odd in a file under drivers/usb/ is it still relevant? Will > this code get built for non-USB systems (i.e. gadget only?) Y

Re: [PATCH v2 6/6] usb: typec: Link all ports during connector registration

2021-03-29 Thread Greg Kroah-Hartman
On Mon, Mar 29, 2021 at 11:44:26AM +0300, Heikki Krogerus wrote: > +#ifdef CONFIG_USB This feels odd in a file under drivers/usb/ is it still relevant? Will this code get built for non-USB systems (i.e. gadget only?) > +static int each_port(struct device *port, void *connector) > +{ > + stru

[PATCH v2 6/6] usb: typec: Link all ports during connector registration

2021-03-29 Thread Heikki Krogerus
The connectors may be registered after the ports, so the "connector" links need to be created for the ports also when ever a new connector gets registered. Signed-off-by: Heikki Krogerus --- drivers/usb/typec/class.c | 9 +++-- drivers/usb/typec/class.h | 4 +- drivers/usb/typec/po