All of lore.kernel.org
 help / color / mirror / Atom feed
From: Javier Herrero <jherrero@hvsistemas.es>
To: Mike Frysinger <vapier.adi@gmail.com>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>,
	linux-input@vger.kernel.org, linux-kernel@vger.kernel.org,
	Bryan Wu <cooloney@kernel.org>
Subject: Re: [PATCH v3] input/keyboard: new OpenCores Keyboard Controller driver
Date: Mon, 14 Sep 2009 20:18:48 +0200	[thread overview]
Message-ID: <4AAE8908.1000104@hvsistemas.es> (raw)
In-Reply-To: <8bd0f97a0909141102l5fa309f4ua1bedd0f1ac99295@mail.gmail.com>

Hello,

It has a bit long since last time I touched the driver, so I should also 
try to refresh my memory about it :). I suppose that you're right in the 
double allocation issue (I took another keyboard driver as a starting 
point and probably the double allocation was already there...), so feel 
free to introduce the change and I will test it as soon as I can.

About the exact scancode - key mapping, the reason is that since the 
FPGA opencores device already implements a translation table, I found 
that another translation table sounded a bit redundant.

Best regards,

Javier

Mike Frysinger escribió:
> 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
>
>

-- 
------------------------------------------------------------------------
Javier Herrero                            EMAIL: jherrero@hvsistemas.com
HV Sistemas S.L.                          PHONE:         +34 949 336 806
Los Charcones, 17A                        FAX:           +34 949 336 792
19170 El Casar - Guadalajara - Spain      WEB: http://www.hvsistemas.com

  reply	other threads:[~2009-09-14 18:18 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-14  2:17 [PATCH] input/keyboard: new OpenCores Keyboard Controller driver Mike Frysinger
2009-09-14  6:17 ` Andrey Panin
2009-09-14  7:04 ` [PATCH v2] " Mike Frysinger
2009-09-14  7:25   ` Joe Perches
2009-09-14 17:40   ` [PATCH v3] " Mike Frysinger
2009-09-14 17:49     ` Dmitry Torokhov
2009-09-14 18:02       ` Mike Frysinger
2009-09-14 18:02         ` Mike Frysinger
2009-09-14 18:18         ` Javier Herrero [this message]
2009-09-15  5:52           ` Dmitry Torokhov
2009-09-15 11:16             ` Mike Frysinger
2009-09-15 11:16               ` Mike Frysinger
2009-09-15 16:23               ` Dmitry Torokhov
2009-09-15 16:23                 ` Dmitry Torokhov
2009-09-15 16:39                 ` Mike Frysinger
2009-09-15 16:39                   ` Mike Frysinger
2009-09-16  2:00             ` [PATCH v4] " Mike Frysinger
2009-09-16  3:45               ` Dmitry Torokhov
2009-09-16  3:57                 ` Mike Frysinger
2009-09-16  3:57                   ` Mike Frysinger
2009-09-16  4:10                 ` [PATCH v5] " Mike Frysinger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4AAE8908.1000104@hvsistemas.es \
    --to=jherrero@hvsistemas.es \
    --cc=cooloney@kernel.org \
    --cc=dmitry.torokhov@gmail.com \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=vapier.adi@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.