On 08/17/2012 01:32 PM, Roland Stigge wrote:
How about the following: Below, I show how the initialization of the current controller is done (statically). Removing this struct initialization completely would make the code much uglier, introducing many individual assignments.
I said what I had to say, I leave it up to Felipe.
static struct lpc32xx_udc controller = { .gadget = { .ops =&lpc32xx_udc_ops, .ep0 =&controller.ep[0].ep, .name = driver_name, .dev = { .init_name = "gadget", .release = nop_release, } }, .ep[0] = { .ep = { .name = "ep0", .ops =&lpc32xx_ep_ops, }, .udc =&controller, .maxpacket = 64, .hwep_num_base = 0, .hwep_num = 0, /* Can be 0 or 1, has special handling */
Can it be 0 or 1 or has it to be 0? Who would change and why?
.lep = 0, .eptype = EP_CTL_TYPE, }, .ep[1] = { .ep = { .name = "ep1-int", .ops =&lpc32xx_ep_ops, }, .udc =&controller, .maxpacket = 64, .hwep_num_base = 2, .hwep_num = 0, /* 2 or 3, will be set later */
Why not now?
.lep = 1, .eptype = EP_INT_TYPE,
Do you have any restrictions on these endpoints? I mean can you pick any endpoints for BULK/INT/ISO or have they been pre-defined by HW? Sebastian -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html