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

Commit ec99371d 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: Add USB host OTG capability"

parents 50ee124e 4fe4c35a
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -2180,6 +2180,17 @@ static int dwc3_msm_power_set_property_usb(struct power_supply *psy,
								usb_psy);

	switch (psp) {
	case POWER_SUPPLY_PROP_USB_OTG:
		/* Let OTG know about ID detection */
		mdwc->id_state = val->intval ? DWC3_ID_GROUND : DWC3_ID_FLOAT;
		if (mdwc->otg_xceiv && !mdwc->ext_inuse &&
		    (mdwc->ext_xceiv.otg_capability)) {
			mdwc->ext_xceiv.id = mdwc->id_state;
			queue_delayed_work(system_nrt_wq,
							&mdwc->resume_work, 12);
		}

		break;
	case POWER_SUPPLY_PROP_SCOPE:
		mdwc->scope = val->intval;
		if (mdwc->scope == POWER_SUPPLY_SCOPE_SYSTEM) {