1
0
Fork 0

MLK-20011-2 usb: chipidea: delete DP pullup for secondary charger detection

Since the DP pullup can be finished at glue layer, we can delete
it at common code, but we still need to keep DP pulldown operation
since the DP may have already pulled up before.

Reviewed-by: Jun Li <jun.li@nxp.com>
Signed-off-by: Peter Chen <peter.chen@nxp.com>
pull/10/head
Peter Chen 2018-10-22 16:20:02 +08:00 committed by Jason Liu
parent fb089deaf9
commit 2ad3a74705
3 changed files with 4 additions and 15 deletions

View File

@ -1095,8 +1095,11 @@ static int ci_hdrc_probe(struct platform_device *pdev)
ci->role = ci_get_role(ci);
/* only update vbus status for peripheral */
if (ci->role == CI_ROLE_GADGET)
if (ci->role == CI_ROLE_GADGET) {
/* Let DP pull down if it isn't currently */
hw_write(ci, OP_USBCMD, USBCMD_RS, 0);
ci_handle_vbus_connected(ci);
}
if (!ci_otg_is_fsm_mode(ci)) {
ret = ci_role_start(ci, ci->role);

View File

@ -2023,20 +2023,8 @@ int ci_usb_charger_connect(struct ci_hdrc *ci, int is_active)
usb_phy_set_charger_state(ci->usb_phy, is_active ?
USB_CHARGER_PRESENT : USB_CHARGER_ABSENT);
} else if (ci->platdata->notify_event) {
if (is_active)
hw_write(ci, OP_USBCMD, USBCMD_RS, 0);
ret = ci->platdata->notify_event(ci,
CI_HDRC_CONTROLLER_VBUS_EVENT);
if (ret == CI_HDRC_NOTIFY_RET_DEFER_EVENT) {
hw_device_reset(ci);
/* Pull up dp */
hw_write(ci, OP_USBCMD, USBCMD_RS, USBCMD_RS);
ci->platdata->notify_event(ci,
CI_HDRC_CONTROLLER_CHARGER_POST_EVENT);
/* Pull down dp */
hw_write(ci, OP_USBCMD, USBCMD_RS, 0);
}
schedule_work(&ci->usb_phy->chg_work);
}
out:

View File

@ -70,8 +70,6 @@ struct ci_hdrc_platform_data {
#define CI_HDRC_CONTROLLER_RESET_EVENT 0
#define CI_HDRC_CONTROLLER_STOPPED_EVENT 1
#define CI_HDRC_CONTROLLER_VBUS_EVENT 2
#define CI_HDRC_NOTIFY_RET_DEFER_EVENT 3
#define CI_HDRC_CONTROLLER_CHARGER_POST_EVENT 4
#define CI_HDRC_IMX_HSIC_ACTIVE_EVENT 5
#define CI_HDRC_IMX_HSIC_SUSPEND_EVENT 6
#define CI_HDRC_IMX_TERM_SELECT_OVERRIDE_FS 7