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

Commit 4a3c144d authored by qctecmdr Service's avatar qctecmdr Service Committed by Gerrit - the friendly Code Review server
Browse files

Merge "usb: pd: Notify USB controller every time Rp changes"

parents ffdd9561 b8802df0
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -1785,6 +1785,7 @@ static void dwc3_msm_notify_event(struct dwc3 *dwc, unsigned int event,
{
	struct dwc3_msm *mdwc = dev_get_drvdata(dwc->dev->parent);
	struct dwc3_event_buffer *evt;
	union extcon_property_value val;
	u32 reg;
	int i;

@@ -1855,6 +1856,16 @@ static void dwc3_msm_notify_event(struct dwc3 *dwc, unsigned int event,
					PWR_EVNT_LPM_OUT_L1_MASK, 1);

		atomic_set(&dwc->in_lpm, 0);

		if (mdwc->extcon &&
			!extcon_get_property(mdwc->extcon[mdwc->ext_idx].edev,
					EXTCON_USB,
					EXTCON_PROP_USB_TYPEC_MED_HIGH_CURRENT,
					&val))
			dwc->gadget.is_selfpowered = val.intval;
		else
			dwc->gadget.is_selfpowered = 0;

		break;
	case DWC3_CONTROLLER_NOTIFY_OTG_EVENT:
		dev_dbg(mdwc->dev, "DWC3_CONTROLLER_NOTIFY_OTG_EVENT received\n");
+2 −0
Original line number Diff line number Diff line
@@ -3582,6 +3582,8 @@ static void dwc3_gadget_interrupt(struct dwc3 *dwc,
			if (dwc->gadget.state >= USB_STATE_CONFIGURED)
				dwc3_gadget_suspend_interrupt(dwc,
						event->event_info);
			else
				usb_gadget_vbus_draw(&dwc->gadget, 2);
		}
		break;
	case DWC3_DEVICE_EVENT_SOF:
+339 −94

File changed.

Preview size limit exceeded, changes collapsed.