LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Vojtech Pavlik <vojtech@suse.cz>
To: Javier Herrero <jherrero@hvsistemas.es>
Cc: Bryan Wu <bryan.wu@analog.com>,
	Will Newton <will.newton@gmail.com>,
	dmitry.torokhov@gmail.com, linux-input@atrey.karlin.mff.cuni.cz,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/1 try#2] [INPUT] keypad driver: Added support for OpenCores Keyboard Controller
Date: Tue, 5 Feb 2008 12:22:42 +0100	[thread overview]
Message-ID: <20080205112242.GA5398@suse.cz> (raw)
In-Reply-To: <47A845F7.8030102@hvsistemas.es>

On Tue, Feb 05, 2008 at 12:18:15PM +0100, Javier Herrero wrote:
> Dear Vojtech,
>
> I think that a 1:1 mapping between linux keycodes and what keyboard sends 
> is right, because the scan code to key code conversion is already 
> programmed and done inside the FPGA code.

And the FPGA code changes with different keyboards attached?

> Best regards,
>
> Javier
>
> Vojtech Pavlik escribió:
>> On Thu, Jan 31, 2008 at 01:18:22AM +0800, Bryan Wu wrote:
>>
>>> +static irqreturn_t opencores_kbd_isr(int irq, void *dev_id)
>>> +{
>>> +	unsigned char c;
>>> +	struct platform_device *pdev = dev_id;
>>> +	struct opencores_kbd *opencores_kbd = platform_get_drvdata(pdev);
>>> +	struct input_dev *input = opencores_kbd->input;
>>> +
>>> +	c = readb(opencores_kbd->addr_res->start);
>>> +	input_report_key(input, c & 0x7f, c & 0x80 ? 0 : 1);
>>> +	input_sync(input);
>>> +
>>> +	return IRQ_HANDLED;
>>> +}
>>  This looks utterly wrong: It assumes 1:1 mapping between Linux keycodes
>> and what the keyboard sends, which I can't believe is the case.
>>
>
> -- 
> ------------------------------------------------------------------------
> 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 

-- 
Vojtech Pavlik
Director SuSE Labs

  reply	other threads:[~2008-02-05 11:22 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-30  9:50 [PATCH 1/1] " Bryan Wu
2008-01-30 11:53 ` Will Newton
2008-01-30 17:07   ` Bryan Wu
2008-01-30 17:18   ` [PATCH 1/1 try#2] " Bryan Wu
2008-02-05 10:42     ` Vojtech Pavlik
2008-02-05 11:18       ` Javier Herrero
2008-02-05 11:22         ` Vojtech Pavlik [this message]
2008-02-05 11:33           ` Javier Herrero
2008-05-12  5:50             ` Bryan Wu

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=20080205112242.GA5398@suse.cz \
    --to=vojtech@suse.cz \
    --cc=bryan.wu@analog.com \
    --cc=dmitry.torokhov@gmail.com \
    --cc=jherrero@hvsistemas.es \
    --cc=linux-input@atrey.karlin.mff.cuni.cz \
    --cc=linux-kernel@vger.kernel.org \
    --cc=will.newton@gmail.com \
    --subject='Re: [PATCH 1/1 try#2] [INPUT] keypad driver: Added support for OpenCores Keyboard Controller' \
    /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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).