mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 18:41:58 +09:00
fc50ca8555d9abc2bfaf5423809810d2cc9cd4e0
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>
Merge tag 'mm-hotfixes-stable-2022-12-10-1' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
…
…
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
Languages
C
97.7%
Assembly
1.6%
Makefile
0.3%
Perl
0.1%