lkml.org 
[lkml]   [2009]   [Sep]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    Date
    SubjectRe: [PATCH v3] input/keyboard: new OpenCores Keyboard Controller driver
    On Mon, Sep 14, 2009 at 13:49, Dmitry Torokhov wrote:
    > On Monday 14 September 2009 10:40:03 am Mike Frysinger wrote:
    >> +struct opencores_kbd {
    >> +     struct input_dev *input;
    >> +     struct resource *addr_res;
    >> +     struct resource *irq_res;
    >> +     unsigned short *keycode;
    >> +};
    >
    > Why do we allocate keycode table separately form the main structure?

    the double alloc looked a little funny, but i didnt dive deep into the
    details. but as you point this out, it seems to make sense to me.
    any problems with that change Javier ?

    i.e. we do:
    struct ... { ... unsigned short keycode[NUM_KEYS]; }
    rather than doing two calls to kmalloc
    > I think I still have some reservations with the notion that we can just
    > have exact "scancode" - KEY_* mapping and hardware producers will adjust
    > the hardware to follow the deriver but I guess it's OK...

    considering this is a piece of "hardware" implemented in FPGAs, i
    think it's ok too. if someone really needs more flexibility, then
    they're free to extend the driver and submit a patch :).
    -mike
    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2009-09-14 20:49    [from the cache]
    ©2003-2014 Jasper Spaans. Advertise on this site