public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
From: Tony Lindgren <tony@atomide.com>
To: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>
Cc: "linux-omap@vger.kernel.org" <linux-omap@vger.kernel.org>,
	e3-hacking@earth.li
Subject: Re: [PATCH] OMAP: Fix broken omap-keypad
Date: Wed, 21 Oct 2009 08:59:40 -0700	[thread overview]
Message-ID: <20091021155940.GJ16230@atomide.com> (raw)
In-Reply-To: <200910211620.30538.jkrzyszt@tis.icnet.pl>

* Janusz Krzysztofik <jkrzyszt@tis.icnet.pl> [091021 07:21]:
> Hi,
> Commit 4f5433324d1e29cf234d5b1b14782c0fc2948298 had made machines that use new 
> matrix_keypad based drivers happy while breaking those that still use old
> omap-keypad driver. The patch fixes omap-keypad device for my Amstrad Delta
> (tested) and probably 11 more OMAP1 based machines. It leaves a potential
> similiar problem on OMAP2 H4 machine not addressed.
> 
> I would say that those new, matrix_keypad based drivers should be corrected to
> simply not include arch/arm/plat-omap/include/mach/keypad.h, which should keep
> serving omap-keypad based machines until they are all upgraded to use 
> matrix_keypad.

Hmm, yeah let's try to do that instead.

 
> Created against linux-2.6.32-rc5
> 
> Signed-off-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>
> 
> ---
> --- linux-2.6.32-rc5/arch/arm/plat-omap/include/mach/keypad.h.orig	2009-10-16 02:41:50.000000000 +0200
> +++ linux-2.6.32-rc5/arch/arm/plat-omap/include/mach/keypad.h	2009-10-21 15:32:37.000000000 +0200
> @@ -10,7 +10,9 @@
>  #ifndef ASMARM_ARCH_KEYPAD_H
>  #define ASMARM_ARCH_KEYPAD_H
>  
> +#ifndef CONFIG_ARCH_OMAP1
>  #include <linux/input/matrix_keypad.h>
> +#endif
>  
>  struct omap_kp_platform_data {
>  	int rows;

I guess we only need to patch a few board-*.c files currently,
maybe only board-rx51.c?


> @@ -38,5 +40,11 @@ struct omap_kp_platform_data {
>  #define KEY_PERSISTENT		0x00800000
>  #define KEYNUM_MASK		0x00EFFFFF
>  
> +#ifdef CONFIG_ARCH_OMAP1
> +#define KEY(col, row, val) (((col) << 28) | ((row) << 24) | (val))
> +#define PERSISTENT_KEY(col, row) (((col) << 28) | ((row) << 24) | \
> +						KEY_PERSISTENT)
> +#endif
> +
>  #endif
>  

Maybe we should add:

#warning: Please update the board to use matrix_keypad.h instead

Regards,

Tony

  reply	other threads:[~2009-10-21 15:59 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-21 14:20 [PATCH] OMAP: Fix broken omap-keypad Janusz Krzysztofik
2009-10-21 15:59 ` Tony Lindgren [this message]
2009-10-21 18:09   ` [PATCH] OMAP: Fix omap-keypad by restoring old keypad.h without breaking omap2 boards that use matrix_keypad Janusz Krzysztofik
2009-10-22 18:49     ` Tony Lindgren

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=20091021155940.GJ16230@atomide.com \
    --to=tony@atomide.com \
    --cc=e3-hacking@earth.li \
    --cc=jkrzyszt@tis.icnet.pl \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox