usb: dwc3: Don't switch OTG -> peripheral if extcon is present
If the extcon device exists, get the mode from the extcon device. If
the controller is DRD and the driver is unable to determine the mode,
only then default the dr_mode to USB_DR_MODE_PERIPHERAL.
Cc: Felipe Balbi <[email protected]>
Cc: Thinh Nguyen <[email protected]>
Cc: [email protected]
Cc: [email protected]
Reviewed-by: Thinh Nguyen <[email protected]>
Signed-off-by: Andrey Smirnov <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>