From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: Amit Kucheria <amit.kucheria@verdurent.com>,
linux-input@vger.kernel.org, linux-omap@vger.kernel.org,
Tony Lindgren <tony@atomide.com>
Subject: Re: Buffer overrun in the TWL4030 keypad driver with Nokia RX51
Date: Tue, 20 Jul 2010 13:06:08 +0200 [thread overview]
Message-ID: <201007201306.10505.laurent.pinchart@ideasonboard.com> (raw)
In-Reply-To: <20100717213705.GA22477@core.coreip.homeip.net>
Hi Dmitry,
On Saturday 17 July 2010 23:37:05 Dmitry Torokhov wrote:
> On Fri, Jul 16, 2010 at 05:28:43PM +0200, Laurent Pinchart wrote:
> >
> > I've spent the day debugging a kernel crash in the USB networking code to
> > find out the problem was caused by a buffer overrun in the TWL4030
> > keypad driver.
> >
> > The Nokia RX51 board code (arch/arm/mach-omap2/board-rx51-peripherals.c)
> > defines a key map for the matrix keypad keyboard. The hardware seems to
> > use all of the 8 rows and 8 columns of the keypad, although not all
> > possible locations are used.
> >
> > The TWL4030 supports keypads with at most 8 rows and 8 columns. Most keys
> > are defined with a row and column number between 0 and 7, except
> >
> > KEY(0xff, 2, KEY_F9),
> > KEY(0xff, 4, KEY_F10),
> > KEY(0xff, 5, KEY_F11),
> >
> > The row number is set to 0xff. As the generic matrix keypad support
> > (include/linux/input/matrix_keypad.h) supports at most 16 rows and 16
> > columns, it masks all but the lower 4 bits of the row and column numbers
> > in the KEY macro.
>
> [..snipped..]
>
> Thanks for the report. Could yo uplease try the patch below and let me
> know if it works.
The patch fixes the crash at startup, but the F9, F10 and F11 key events are
never reported. That might be because those keys are not wired up to anything
though. All keys on the keyboard, as well as the F7 and F8 keys (volume up and
down on the of the case) generate the proper events. All other "keys"
(keyboard slider switch, power button, focus button, lock switch, proximity
sensor) report events through other devices.
> I have some concerns with the keymap assignments, I see that Amit
> changed them during KEY(col, row) -> KEY(row, col) conversion. I marked
> the entries I am concerned with with XXX.
F7, F8, right alt and left shift are properly mapped. I don't know what F9,
F10 and F11 are supposed to be.
--
Regards,
Laurent Pinchart
next prev parent reply other threads:[~2010-07-20 11:06 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-16 15:28 Buffer overrun in the TWL4030 keypad driver with Nokia RX51 Laurent Pinchart
2010-07-17 21:37 ` Dmitry Torokhov
2010-07-20 11:06 ` Laurent Pinchart [this message]
2010-07-20 18:07 ` Dmitry Torokhov
2010-07-21 15:52 ` Laurent Pinchart
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=201007201306.10505.laurent.pinchart@ideasonboard.com \
--to=laurent.pinchart@ideasonboard.com \
--cc=amit.kucheria@verdurent.com \
--cc=dmitry.torokhov@gmail.com \
--cc=linux-input@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=tony@atomide.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox