William Wu fc50ca8555 usb: dwc3: drd: Avoid host enter runtime suspend during probe
On rockchip platforms, if the dr_mode supports otg, it will
allow dwc3 pm runtime and put the dwc3 in runtime suspend
synchronously at the end of dwc3 probe. It works well in most
scenarios with USB-C or USB-A interface.

However, for USB Micro interface with ID pin, if ID pin is
pull to low by OTG to Host cable during probe, the drd_work
which called from the dwc3_core_init_mode() maybe scheduled
before pm_runtime_put_sync_suspend. In this case, the dwc->
current_dr_role is DWC3_GCTL_PRTCAP_HOST when enter runtime
suspend.

Later in xhci_plat_probe, it try to do pm runtime resume, but
it fail to do dwc3_core_init_for_resume() in the dwc3_resume_common()
because the condition "!PMSG_IS_AUTO(msg)" is not true for the
current_dr_role DWC3_GCTL_PRTCAP_HOST, so it can't initialize
the dwc3 core.

This patch do dwc3_set_mode after pm_runtime_put_sync_suspend
if EXTCON_USB_HOST state is true, it can avoid host enter runtime
suspend during probe.

With this patch, it can fix otg host mode fail to detect device
using a Micro OTG cable at system boot time.

Change-Id: I8b71f8c2490988b51a89bad5c880fe3cdeba2bfa
Signed-off-by: William Wu <william.wu@rock-chips.com>
2024-05-08 19:05:32 +08:00
2024-05-08 11:14:32 +08:00
2024-05-08 11:14:32 +08:00
2024-05-08 11:14:32 +08:00
2024-05-08 11:14:32 +08:00
2024-05-08 11:14:32 +08:00
2024-05-08 11:14:32 +08:00
2024-05-08 11:14:32 +08:00
2024-05-08 11:14:32 +08:00
2024-05-08 11:14:32 +08:00
2024-05-08 11:14:32 +08:00
2024-05-08 11:14:32 +08:00
2022-09-28 09:02:20 +02:00
2024-01-25 15:27:52 -08:00

Linux kernel
============

There are several guides for kernel developers and users. These guides can
be rendered in a number of formats, like HTML and PDF. Please read
Documentation/admin-guide/README.rst first.

In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``.  The formatted documentation can also be read online at:

    https://www.kernel.org/doc/html/latest/

There are various text files in the Documentation/ subdirectory,
several of them using the Restructured Text markup notation.

Please read the Documentation/process/changes.rst file, as it contains the
requirements for building and running the kernel, and information about
the problems which may result by upgrading your kernel.
Description
No description provided
Readme 7.9 GiB
Languages
C 97.7%
Assembly 1.6%
Makefile 0.3%
Perl 0.1%