William Wu 915826d691 phy: rockchip: inno-usb2: Clear charger state in host mode
Test on RK3576 Tablet Android 14 GKI, when plug in U disk,
it will trigger the usb2 phy to do charging detection logic
in the following process.

1. Type-C PD controller chip (e.g HUSB311) detect DFP mode;

2. Type-C tcpm call usb_role_switch_set_role() to notify
   the usb controller to set USB_ROLE_HOST;

3. The usb dwc3 controller driver do dwc3_set_mode() to
   initialize the controller and phy for host mode;

4. In the __dwc3_set_mode(), it do pm_runtime_get_sync()
   -> dwc3_runtime_resume() -> dwc3_resume_common() ->
   dwc3_core_init() -> phy_init(dwc->usb2_generic_phy);

5. In the usb2 phy driver, it do rockchip_usb2phy_init()
   -> schedule otg_sm_work -> rockchip_chg_detect_work()

6. Detect dcp cable is connected, and call extcon_set_state_sync()
   to send charger notification with true state.

Later, if plug out the U disk and plug in a USB charger,
it will fail to send charger notification because its
extcon state still in true state.

To fix this issue, we need to clear the charger state
in the otg_sm_work if it's already in host mode.

Signed-off-by: William Wu <william.wu@rock-chips.com>
Change-Id: I6a30429162290927cae3e5f3495f51db61bf15b6
2024-05-30 20:32:44 +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%