All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Brownell <david-b@pacbell.net>
To: hartleys <hartleys@visionengravers.com>
Cc: linux-input@vger.kernel.org, OMAP <linux-omap@vger.kernel.org>
Subject: Re: [patch/rfc 2.6.28-rc2] input: twl4030_keypad driver
Date: Thu, 29 Jan 2009 16:57:49 -0800	[thread overview]
Message-ID: <200901291657.50008.david-b@pacbell.net> (raw)
In-Reply-To: <BD79186B4FD85F4B8E60E381CAEE1909011A527A@mi8nycmail19.Mi8.com>

On Thursday 29 January 2009, hartleys wrote:
> > +/* Boards have uniqe mappings of {col, row} --> keycode.
> > + * Column and row are 4 bits, but range only from 0..7;
> > + * a PERSISTENT_KEY is "always on" and never reported.
> > + */
> > +#define KEY_PERSISTENT               0x00800000
> > +#define KEY(col, row, keycode)       (((col) << 28) | ((row) << 24) |
> (keycode))
> 
> The same KEY macro is defined in:
> 
> arch/arm/mach-pxa/include/mach/pxa27x_keypad.h
> arch/arm/plat-omap/include/mach/keypad.h

I copied it from the OMAP version as part of removing
needless OMAP dependencies from this driver.

 
> I also have a keypad driver for the ep93xx that uses the same macro.
> 
> Shouldn't/couldn't this be generalized and added to the
> include/linux/input.h file?  Allowing 4-bits for row/col gives a maximum
> key matrix of 16x16 keys which should be enough for just about anything.

Makes sense.  But that's not what this patch is
about, and I also think the KEY prefix is probably
too generic.

I'd support an overall cleanup patch that fixes
all those things at once.

- Dave

--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2009-01-30  0:57 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-22  0:13 [patch/rfc 2.6.28-rc2] input: twl4030_keypad driver David Brownell
2009-01-22  7:09 ` Trilok Soni
2009-01-22 17:42   ` David Brownell
2009-01-22 17:57     ` Trilok Soni
2009-01-30  0:17 ` hartleys
2009-01-30  0:57   ` David Brownell [this message]
2009-01-30 17:13     ` hartleys
2009-02-06  1:11       ` David Brownell

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=200901291657.50008.david-b@pacbell.net \
    --to=david-b@pacbell.net \
    --cc=hartleys@visionengravers.com \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    /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.