]> git.baikalelectronics.ru Git - kernel.git/commit
usb: dwc3: Don't switch OTG -> peripheral if extcon is present
authorAndrey Smirnov <andrew.smirnov@gmail.com>
Sun, 3 Apr 2022 16:49:07 +0000 (09:49 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 22 Apr 2022 08:29:35 +0000 (10:29 +0200)
commit192e7b4fa42cb5bf60baa1c22ba8c57be26c5378
tree8d810dd815ea83f5417c2768efdbfd7b54dbac4c
parent82d4ac5268826bfe30fc2fa29d0156387e8936e4
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 <balbi@kernel.org>
Cc: Thinh Nguyen <thinhn@synopsys.com>
Cc: linux-usb@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Reviewed-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Link: https://lore.kernel.org/r/20220403164907.662860-1-andrew.smirnov@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/dwc3/core.c
drivers/usb/dwc3/drd.c