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

Commit c8730406 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: Enable multiple UDC support"

parents 0a176741 411ce1fd
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -52,6 +52,7 @@ Optional properties :
  runtimePM state of host.
- qcom,psy-not-used: If present then driver won't be registering usb power_supply.
  Without usb_psy, user should be able to change modes using sysfs.
- qcom,usb-core-id: Differentiates between primary and secondary controller.

Sub nodes:
- Sub node for "DWC3- USB3 controller".
+6 −0
Original line number Diff line number Diff line
@@ -783,6 +783,7 @@ static int dwc3_probe(struct platform_device *pdev)
	u8			lpm_nyet_threshold;
	u8			hird_threshold;
	u32			num_evt_buffs;
	u32			core_id;
	int			irq;

	int			ret;
@@ -896,6 +897,11 @@ static int dwc3_probe(struct platform_device *pdev)
		if (!ret)
			dwc->num_gsi_event_buffers = num_evt_buffs;

		ret = of_property_read_u32(node,
				"qcom,usb-core-id", &core_id);
		if (!ret)
			dwc->core_id = core_id;

		if (dwc->enable_bus_suspend) {
			pm_runtime_set_autosuspend_delay(dev, 500);
			pm_runtime_use_autosuspend(dev);
+1 −0
Original line number Diff line number Diff line
@@ -881,6 +881,7 @@ struct dwc3 {
	u32			num_event_buffers;
	u32			num_normal_event_buffers;
	u32			num_gsi_event_buffers;
	u32			core_id;

	u32			u1;
	u32			u1u2;
+10 −0
Original line number Diff line number Diff line
@@ -3249,6 +3249,16 @@ static int dwc3_msm_probe(struct platform_device *pdev)
		dwc3_ext_event_notify(mdwc);
	}

	/* If the controller is in DRD mode and USB power supply
	 * is not used make the default mode of contoller as HOST
	 * mode. User can change it later using sysfs
	 */
	if (dwc->is_drd && mdwc->psy_not_used) {
		dev_dbg(&pdev->dev, "DWC3 in host mode\n");
		mdwc->id_state = DWC3_ID_GROUND;
		dwc3_ext_event_notify(mdwc);
	}

	return 0;

put_dwc3:
+3 −0
Original line number Diff line number Diff line
@@ -3690,6 +3690,9 @@ int dwc3_gadget_init(struct dwc3 *dwc)
	 * sure we're starting from a well known location.
	 */

	dwc->gadget.usb_core_id = dwc->core_id;
	dev_dbg(dwc->dev, "%s core_id : %d\n", __func__, dwc->core_id);

	ret = dwc3_gadget_init_endpoints(dwc);
	if (ret)
		goto err4;