mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-10 21:07:02 +09:00
phy: phy-rockchip-naneng-usb2: update USB_DCP state if cable plug-out
The *USB_DCP* should be updated when the cable plug out from dedicated charging port. As a result, the charger could set the charging current by *EXTCON_CHG_USB_DCP*. Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com> Change-Id: I478e584552a627de928378c6da1e6392a8fb04c4
This commit is contained in:
@@ -951,8 +951,11 @@ static void rockchip_usb2phy_otg_sm_work(struct work_struct *work)
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
if (!rport->perip_connected)
|
||||
if (!rport->perip_connected) {
|
||||
if (extcon_get_state(rphy->edev, EXTCON_CHG_USB_DCP) > 0)
|
||||
extcon_set_state_sync(rphy->edev, EXTCON_CHG_USB_DCP, 0);
|
||||
return;
|
||||
}
|
||||
|
||||
dev_dbg(&rport->phy->dev, "usb peripheral disconnect\n");
|
||||
wake_unlock(&rport->wakelock);
|
||||
|
||||
Reference in New Issue
Block a user