Re: [PATCH v4 09/18] usb: dwc3: qcom: Override VBUS when using gpio_usb_connector

From: Bryan O'Donoghue
Date: Fri Feb 07 2020 - 05:50:43 EST


On 07/02/2020 10:36, Bryan O'Donoghue wrote:
On 07/02/2020 08:07, Jack Pham wrote:
Could the usb_role_switch class somehow be enhanced to support chaining
multiple "consumers" to support this case? Such that when the gpio-b
driver calls set_role() it could get handled both by drd.c and
dwc3-qcom.c?

It is probably necessary eventually, but, per my reading of the documents and working with the hardware, I couldn't justify the additional work.

However if you think this patchset needs the toggle, I can look into getting the indicator to toggle here too.

We'd need to add some sort of linked list of notifiers to the role switching logic and toggle them in order.

Similar to what is done in extcon now for the various notifer hooks.

Maybe I'm wrong...

Looking a bit closer at the role-switch code it might be possible to register multiple devices _as-is_ so long as you have a pointer to the relevant parent...

---
bod