mirror of
https://github.com/torvalds/linux.git
synced 2026-06-09 15:12:59 +02:00
phy: rockchip-inno-usb2: reinit charge state when usb disconnect
When detect the usb peripheral disconnect from PC usb host port or usb charger, we need to reinit the charge state immediately, then it can do usb battery charge detect work to get correct charge type if usb re-plug in again in a short time. Change-Id: I187f1d23a11b00f57e0a3699b6174cd7a59be3f1 Signed-off-by: William Wu <william.wu@rock-chips.com>
This commit is contained in:
parent
16efe6c228
commit
6e3c63017e
|
|
@ -1035,6 +1035,8 @@ static void rockchip_usb2phy_otg_sm_work(struct work_struct *work)
|
|||
dev_dbg(&rport->phy->dev, "usb disconnect\n");
|
||||
rport->state = OTG_STATE_B_IDLE;
|
||||
rport->perip_connected = false;
|
||||
rphy->chg_state = USB_CHG_STATE_UNDEFINED;
|
||||
rphy->chg_type = POWER_SUPPLY_TYPE_UNKNOWN;
|
||||
delay = OTG_SCHEDULE_DELAY * 2;
|
||||
wake_unlock(&rport->wakelock);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user