Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757270AbYBEKmv (ORCPT ); Tue, 5 Feb 2008 05:42:51 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754474AbYBEKmo (ORCPT ); Tue, 5 Feb 2008 05:42:44 -0500 Received: from styx.suse.cz ([82.119.242.94]:58206 "EHLO mail.suse.cz" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753775AbYBEKmn (ORCPT ); Tue, 5 Feb 2008 05:42:43 -0500 Date: Tue, 5 Feb 2008 11:42:42 +0100 From: Vojtech Pavlik To: Bryan Wu Cc: Will Newton , dmitry.torokhov@gmail.com, linux-input@atrey.karlin.mff.cuni.cz, linux-kernel@vger.kernel.org, Javier Herrero Subject: Re: [PATCH 1/1 try#2] [INPUT] keypad driver: Added support for OpenCores Keyboard Controller Message-ID: <20080205104242.GA11437@suse.cz> References: <1201686610-31458-1-git-send-email-bryan.wu@analog.com> <87a5b0800801300353l196b39bekad6af6ccdbd49d5b@mail.gmail.com> <1201713502.8345.1.camel@roc-laptop> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1201713502.8345.1.camel@roc-laptop> X-Bounce-Cookie: It's a lemon tree, dear Watson! User-Agent: Mutt/1.5.16 (2007-06-09) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 899 Lines: 27 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. -- Vojtech Pavlik Director SuSE Labs -- 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/