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

Commit 7fb1a1d1 authored by Ajay Agarwal's avatar Ajay Agarwal Committed by Gerrit - the friendly Code Review server
Browse files

usb: gadget: Setup DMA ops for OTG's gadget devices



A device that is not probed via DT nodes needs to setup its DMA
operations with an explicit call to arch_setup_dma_ops. The child
and grandchild gadget devices of msm_otg are not populated via DT
nodes. This patch adds the above method for these devices.

Change-Id: Ida9d63dce2cbb8c61c65cb95e0ea5f10860e8edc
Signed-off-by: default avatarAjay Agarwal <ajaya@codeaurora.org>
parent 423b7b2f
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -1213,6 +1213,10 @@ int usb_add_gadget_udc_release(struct device *parent, struct usb_gadget *gadget,
	INIT_WORK(&gadget->work, usb_gadget_state_work);
	gadget->dev.parent = parent;

	dma_set_coherent_mask(&gadget->dev, parent->coherent_dma_mask);
	gadget->dev.dma_parms = parent->dma_parms;
	gadget->dev.dma_mask = parent->dma_mask;

	if (release)
		gadget->dev.release = release;
	else