Re: [RFC][PATCH 2/3] usb: roles: Add usb role switch notifier.

From: John Stultz
Date: Tue Oct 15 2019 - 03:04:00 EST


On Sun, Oct 6, 2019 at 8:22 AM Hans de Goede <hdegoede@xxxxxxxxxx> wrote:
>
> Anyways back the code to add a usb role switch notifier. I do
> not think that this is a good idea, this is making "core" changes
> to deal with a special case. If you are going to use a notfier for
> this then IMHO the notifier should be part of the hikey960 usb role
> swtich driver and not be in the usb-role-switch class code, since
> this is very much a device specific hack.

Ok, that sounds fair. I still need to find some way to hook into the
role-switch path between the tcpm and the dwc3 in order to switch to
the hub, but I guess I can try to add a hook somewhere in the dwc3
code itself. I'll dig on this a bit.

thanks
-john