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

Commit 2954522f authored by Robert Baldyga's avatar Robert Baldyga Committed by Felipe Balbi
Browse files

usb: dwc2: gadget: add ep capabilities support



Convert endpoint configuration to new capabilities model.

Signed-off-by: default avatarRobert Baldyga <r.baldyga@samsung.com>
Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
parent a7e3f141
Loading
Loading
Loading
Loading
+13 −0
Original line number Diff line number Diff line
@@ -3289,6 +3289,19 @@ static void s3c_hsotg_initep(struct dwc2_hsotg *hsotg,
	usb_ep_set_maxpacket_limit(&hs_ep->ep, epnum ? 1024 : EP0_MPS_LIMIT);
	hs_ep->ep.ops = &s3c_hsotg_ep_ops;

	if (epnum == 0) {
		hs_ep->ep.caps.type_control = true;
	} else {
		hs_ep->ep.caps.type_iso = true;
		hs_ep->ep.caps.type_bulk = true;
		hs_ep->ep.caps.type_int = true;
	}

	if (dir_in)
		hs_ep->ep.caps.dir_in = true;
	else
		hs_ep->ep.caps.dir_out = true;

	/*
	 * if we're using dma, we need to set the next-endpoint pointer
	 * to be something valid.