lkml.org 
[lkml]   [2012]   [Aug]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH] usb: gadget: lpc32xx_udc: Port to new start/stop interface
    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


    \
     
     \ /
      Last update: 2012-08-17 14:21    [W:0.023 / U:92.800 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site