Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 424ba5c3 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "USB: dwc3-msm: Do not schedule resume work if id state is not changed"

parents 483d513f 89329c49
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -2318,11 +2318,16 @@ static int dwc3_msm_power_set_property_usb(struct power_supply *psy,
								usb_psy);
	struct dwc3 *dwc = platform_get_drvdata(mdwc->dwc3);
	int ret;
	enum dwc3_id_state id;

	switch (psp) {
	case POWER_SUPPLY_PROP_USB_OTG:
		id = val->intval ? DWC3_ID_GROUND : DWC3_ID_FLOAT;
		if (mdwc->id_state == id)
			break;

		/* Let OTG know about ID detection */
		mdwc->id_state = val->intval ? DWC3_ID_GROUND : DWC3_ID_FLOAT;
		mdwc->id_state = id;
		dbg_event(0xFF, "id_state", mdwc->id_state);
		if (dwc->is_drd)
			queue_delayed_work(mdwc->dwc3_wq,