mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 19:08:57 +09:00
phy: phy-rockchip-inno-usb2: add EXTCON_USB_HOST working as peripheral
We previously registered two extcon notifier in dwc3/dwc3_rockchip.c in kernel-4.4, EXTCON_USB and EXTCON_USB_HOST respectively, so we only need to send EXTCON_USB notifications when acting as a peripheral. In the new kernel 4.19 code, only EXTCON_USB_HOST is registered in dwc3/drd.c. In order to be notified to dwc3 controller as a peripheral, we need to send a EXTCON_USB_HOST notification at the same time. Change-Id: I7507b90c94d35877ce704222a49e8e673a49a162 Signed-off-by: Jianing Ren <jianing.ren@rock-chips.com>
This commit is contained in:
@@ -1121,11 +1121,12 @@ static void rockchip_usb2phy_otg_sm_work(struct work_struct *work)
|
||||
|
||||
if (rphy->edev_self &&
|
||||
(extcon_get_state(rphy->edev, EXTCON_USB) !=
|
||||
rport->perip_connected))
|
||||
rport->perip_connected)) {
|
||||
extcon_set_state_sync(rphy->edev,
|
||||
EXTCON_USB,
|
||||
rport->perip_connected);
|
||||
|
||||
extcon_sync(rphy->edev, EXTCON_USB_HOST);
|
||||
}
|
||||
if (sch_work)
|
||||
schedule_delayed_work(&rport->otg_sm_work, delay);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user