Browse Source

usb: isp1760: udc: add ep capabilities support

Convert endpoint configuration to new capabilities model.

Signed-off-by: Robert Baldyga <r.baldyga@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Robert Baldyga 10 years ago
parent
commit
eb4cbc1952
1 changed files with 11 additions and 0 deletions
  1. 11 0
      drivers/usb/isp1760/isp1760-udc.c

+ 11 - 0
drivers/usb/isp1760/isp1760-udc.c

@@ -1383,13 +1383,24 @@ static void isp1760_udc_init_eps(struct isp1760_udc *udc)
 		 */
 		 */
 		if (ep_num == 0) {
 		if (ep_num == 0) {
 			usb_ep_set_maxpacket_limit(&ep->ep, 64);
 			usb_ep_set_maxpacket_limit(&ep->ep, 64);
+			ep->ep.caps.type_control = true;
+			ep->ep.caps.dir_in = true;
+			ep->ep.caps.dir_out = true;
 			ep->maxpacket = 64;
 			ep->maxpacket = 64;
 			udc->gadget.ep0 = &ep->ep;
 			udc->gadget.ep0 = &ep->ep;
 		} else {
 		} else {
 			usb_ep_set_maxpacket_limit(&ep->ep, 512);
 			usb_ep_set_maxpacket_limit(&ep->ep, 512);
+			ep->ep.caps.type_iso = true;
+			ep->ep.caps.type_bulk = true;
+			ep->ep.caps.type_int = true;
 			ep->maxpacket = 0;
 			ep->maxpacket = 0;
 			list_add_tail(&ep->ep.ep_list, &udc->gadget.ep_list);
 			list_add_tail(&ep->ep.ep_list, &udc->gadget.ep_list);
 		}
 		}
+
+		if (is_in)
+			ep->ep.caps.dir_in = true;
+		else
+			ep->ep.caps.dir_out = true;
 	}
 	}
 }
 }