usb: Import Xiaomi changes
Change-Id: I3d2f755729bfc5dc8d6c88d58ededdf93db0adfb
This commit is contained in:
parent
d53b31c054
commit
73606279f7
@ -5738,6 +5738,9 @@ static int dwc3_msm_gadget_vbus_draw(struct dwc3_msm *mdwc, unsigned int mA)
|
||||
if (mdwc->apsd_source == IIO && chg_type != POWER_SUPPLY_TYPE_USB)
|
||||
return 0;
|
||||
|
||||
if (mA < 100)
|
||||
return 0;
|
||||
|
||||
/* Set max current limit in uA */
|
||||
pval.intval = 1000 * mA;
|
||||
|
||||
|
@ -314,7 +314,7 @@ void dwc3_gadget_giveback(struct dwc3_ep *dep, struct dwc3_request *req,
|
||||
spin_lock(&dwc->lock);
|
||||
}
|
||||
|
||||
#define DWC_CMD_TIMEOUT 5000
|
||||
#define DWC_CMD_TIMEOUT 6000
|
||||
/**
|
||||
* dwc3_send_gadget_generic_command - issue a generic command for the controller
|
||||
* @dwc: pointer to the controller context
|
||||
|
@ -3428,6 +3428,7 @@ static void gsi_unbind(struct usb_configuration *c, struct usb_function *f)
|
||||
mbim_gsi_string_defs[0].id = 0;
|
||||
qdss_gsi_string_defs[0].id = 0;
|
||||
gsi->func_wakeup_pending = false;
|
||||
atomic_set(&gsi->connected, 0);
|
||||
if (gsi->prot_id == IPA_USB_RNDIS) {
|
||||
gsi->d_port.sm_state = STATE_UNINITIALIZED;
|
||||
rndis_deregister(gsi->params);
|
||||
|
@ -1145,6 +1145,9 @@ int xhci_resume(struct xhci_hcd *xhci, bool hibernated)
|
||||
bool pending_portevent = false;
|
||||
bool reinit_xhc = false;
|
||||
|
||||
if (!hcd)
|
||||
return 0;
|
||||
|
||||
if (!hcd->state)
|
||||
return 0;
|
||||
|
||||
|
@ -719,11 +719,6 @@ static int ucsi_dr_swap(struct typec_port *port, enum typec_data_role role)
|
||||
|
||||
mutex_lock(&con->lock);
|
||||
|
||||
if (!con->partner) {
|
||||
ret = -ENOTCONN;
|
||||
goto out_unlock;
|
||||
}
|
||||
|
||||
partner_type = UCSI_CONSTAT_PARTNER_TYPE(con->status.flags);
|
||||
if ((partner_type == UCSI_CONSTAT_PARTNER_TYPE_DFP &&
|
||||
role == TYPEC_DEVICE) ||
|
||||
|
Loading…
Reference in New Issue
Block a user