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

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

Merge "usb_bam: Set default BAM type as DWC3 if not specified"

parents e3670a4f e4fb980c
Loading
Loading
Loading
Loading
+4 −7
Original line number Diff line number Diff line
@@ -2876,7 +2876,7 @@ static struct msm_usb_bam_data *usb_bam_dt_to_data(
	struct device_node *node = pdev->dev.of_node;
	int rc = 0;
	u8 i = 0;
	u32 bam;
	u32 bam = DWC3_CTRL;
	u32 addr = 0;
	u32 threshold, max_connections = 0;
	static struct usb_bam_pipe_connect *usb_bam_connections;
@@ -2886,12 +2886,9 @@ static struct msm_usb_bam_data *usb_bam_dt_to_data(
	if (!usb_bam_data)
		return NULL;

	rc = of_property_read_u32(node, "qcom,bam-type", &bam);
	if (rc) {
		log_event_err("%s: bam type is missing in device tree\n",
			__func__);
		return NULL;
	}
	/* override bam-type if specified, default is dwc3 */
	of_property_read_u32(node, "qcom,bam-type", &bam);

	if (bam >= MAX_BAMS) {
		log_event_err("%s: Invalid bam type %d in device tree\n",
			__func__, bam);