-
由 Andrey Smirnov 提交于
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. Reported-by: NSteev Klimaszewski <steev@kali.org> Fixes: 7a84e735 ("Revert "usb: dwc3: Don't switch OTG -> peripheral if extcon is present"") Cc: stable <stable@kernel.org> Reviewed-by: NThinh Nguyen <Thinh.Nguyen@synopsys.com> Signed-off-by: NAndrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: NSteev Klimaszewski <steev@kali.org> Acked-by: NThinh Nguyen <Thinh.Nguyen@synopsys.com> Link: https://lore.kernel.org/r/20221017233510.53336-1-andriy.shevchenko@linux.intel.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
d182c2e1