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 omap-keypad by restoring old keypad.h without breaking omap2 boards that use matrix_keypad
Date: Thu, 22 Oct 2009 11:49:59 -0700 [thread overview]
Message-ID: <20091022184958.GS16230@atomide.com> (raw)
In-Reply-To: <200910212009.39066.jkrzyszt@tis.icnet.pl>
* Janusz Krzysztofik <jkrzyszt@tis.icnet.pl> [091021 11:10]:
> Wednesday 21 October 2009 17:59:40 Tony Lindgren napisał(a):
> > * 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.
> > ...
> >
> > Maybe we should add:
> >
> > #warning: Please update the board to use matrix_keypad.h instead
>
> Here you are.
>
> Created against linux-2.6.32-rc5.
> Compile tested with omap_3430sdp_defconfig and rx51_defconfig.
Thanks, adding this to omap-fixes.
Tony
> Signed-off-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>
>
> ---
> diff -upr linux-2.6.32-rc5.orig/arch/arm/mach-omap2/board-3430sdp.c linux-2.6.32-rc5.fixed/arch/arm/mach-omap2/board-3430sdp.c
> --- linux-2.6.32-rc5.orig/arch/arm/mach-omap2/board-3430sdp.c 2009-10-16 02:41:50.000000000 +0200
> +++ linux-2.6.32-rc5.fixed/arch/arm/mach-omap2/board-3430sdp.c 2009-10-21 19:28:48.000000000 +0200
> @@ -17,6 +17,7 @@
> #include <linux/platform_device.h>
> #include <linux/delay.h>
> #include <linux/input.h>
> +#include <linux/input/matrix_keypad.h>
> #include <linux/spi/spi.h>
> #include <linux/spi/ads7846.h>
> #include <linux/i2c/twl4030.h>
> @@ -38,7 +39,6 @@
> #include <mach/gpmc.h>
>
> #include <mach/control.h>
> -#include <mach/keypad.h>
> #include <mach/gpmc-smc91x.h>
>
> #include "sdram-qimonda-hyb18m512160af-6.h"
> diff -upr linux-2.6.32-rc5.orig/arch/arm/mach-omap2/board-ldp.c linux-2.6.32-rc5.fixed/arch/arm/mach-omap2/board-ldp.c
> --- linux-2.6.32-rc5.orig/arch/arm/mach-omap2/board-ldp.c 2009-10-16 02:41:50.000000000 +0200
> +++ linux-2.6.32-rc5.fixed/arch/arm/mach-omap2/board-ldp.c 2009-10-21 19:30:03.000000000 +0200
> @@ -16,6 +16,7 @@
> #include <linux/platform_device.h>
> #include <linux/delay.h>
> #include <linux/input.h>
> +#include <linux/input/matrix_keypad.h>
> #include <linux/gpio_keys.h>
> #include <linux/workqueue.h>
> #include <linux/err.h>
> @@ -41,7 +42,6 @@
> #include <asm/delay.h>
> #include <mach/control.h>
> #include <mach/usb.h>
> -#include <mach/keypad.h>
>
> #include "mmc-twl4030.h"
>
> diff -upr linux-2.6.32-rc5.orig/arch/arm/mach-omap2/board-omap3evm.c linux-2.6.32-rc5.fixed/arch/arm/mach-omap2/board-omap3evm.c
> --- linux-2.6.32-rc5.orig/arch/arm/mach-omap2/board-omap3evm.c 2009-10-16 02:41:50.000000000 +0200
> +++ linux-2.6.32-rc5.fixed/arch/arm/mach-omap2/board-omap3evm.c 2009-10-21 19:30:16.000000000 +0200
> @@ -20,6 +20,7 @@
> #include <linux/clk.h>
> #include <linux/gpio.h>
> #include <linux/input.h>
> +#include <linux/input/matrix_keypad.h>
> #include <linux/leds.h>
>
> #include <linux/spi/spi.h>
> @@ -37,7 +38,6 @@
> #include <mach/usb.h>
> #include <mach/common.h>
> #include <mach/mcspi.h>
> -#include <mach/keypad.h>
>
> #include "sdram-micron-mt46h32m32lf-6.h"
> #include "mmc-twl4030.h"
> diff -upr linux-2.6.32-rc5.orig/arch/arm/mach-omap2/board-omap3pandora.c linux-2.6.32-rc5.fixed/arch/arm/mach-omap2/board-omap3pandora.c
> --- linux-2.6.32-rc5.orig/arch/arm/mach-omap2/board-omap3pandora.c 2009-10-16 02:41:50.000000000 +0200
> +++ linux-2.6.32-rc5.fixed/arch/arm/mach-omap2/board-omap3pandora.c 2009-10-21 19:28:03.000000000 +0200
> @@ -27,6 +27,7 @@
> #include <linux/i2c/twl4030.h>
> #include <linux/leds.h>
> #include <linux/input.h>
> +#include <linux/input/matrix_keypad.h>
> #include <linux/gpio_keys.h>
>
> #include <asm/mach-types.h>
> @@ -39,7 +40,6 @@
> #include <mach/hardware.h>
> #include <mach/mcspi.h>
> #include <mach/usb.h>
> -#include <mach/keypad.h>
> #include <mach/mux.h>
>
> #include "sdram-micron-mt46h32m32lf-6.h"
> diff -upr linux-2.6.32-rc5.orig/arch/arm/mach-omap2/board-rx51-peripherals.c linux-2.6.32-rc5.fixed/arch/arm/mach-omap2/board-rx51-peripherals.c
> --- linux-2.6.32-rc5.orig/arch/arm/mach-omap2/board-rx51-peripherals.c 2009-10-16 02:41:50.000000000 +0200
> +++ linux-2.6.32-rc5.fixed/arch/arm/mach-omap2/board-rx51-peripherals.c 2009-10-21 19:29:31.000000000 +0200
> @@ -12,6 +12,7 @@
> #include <linux/init.h>
> #include <linux/platform_device.h>
> #include <linux/input.h>
> +#include <linux/input/matrix_keypad.h>
> #include <linux/spi/spi.h>
> #include <linux/i2c.h>
> #include <linux/i2c/twl4030.h>
> @@ -27,7 +28,6 @@
> #include <mach/common.h>
> #include <mach/dma.h>
> #include <mach/gpmc.h>
> -#include <mach/keypad.h>
> #include <mach/onenand.h>
> #include <mach/gpmc-smc91x.h>
>
> diff -upr linux-2.6.32-rc5.orig/arch/arm/mach-omap2/board-rx51.c linux-2.6.32-rc5.fixed/arch/arm/mach-omap2/board-rx51.c
> --- linux-2.6.32-rc5.orig/arch/arm/mach-omap2/board-rx51.c 2009-10-16 02:41:50.000000000 +0200
> +++ linux-2.6.32-rc5.fixed/arch/arm/mach-omap2/board-rx51.c 2009-10-21 19:25:33.000000000 +0200
> @@ -26,7 +26,6 @@
> #include <mach/mux.h>
> #include <mach/board.h>
> #include <mach/common.h>
> -#include <mach/keypad.h>
> #include <mach/dma.h>
> #include <mach/gpmc.h>
> #include <mach/usb.h>
> diff -upr linux-2.6.32-rc5.orig/arch/arm/mach-omap2/board-zoom2.c linux-2.6.32-rc5.fixed/arch/arm/mach-omap2/board-zoom2.c
> --- linux-2.6.32-rc5.orig/arch/arm/mach-omap2/board-zoom2.c 2009-10-16 02:41:50.000000000 +0200
> +++ linux-2.6.32-rc5.fixed/arch/arm/mach-omap2/board-zoom2.c 2009-10-21 19:29:52.000000000 +0200
> @@ -13,6 +13,7 @@
> #include <linux/init.h>
> #include <linux/platform_device.h>
> #include <linux/input.h>
> +#include <linux/input/matrix_keypad.h>
> #include <linux/gpio.h>
> #include <linux/i2c/twl4030.h>
> #include <linux/regulator/machine.h>
> @@ -22,7 +23,6 @@
>
> #include <mach/common.h>
> #include <mach/usb.h>
> -#include <mach/keypad.h>
>
> #include "mmc-twl4030.h"
> #include "sdram-micron-mt46h32m32lf-6.h"
> diff -upr linux-2.6.32-rc5.orig/arch/arm/plat-omap/include/mach/keypad.h linux-2.6.32-rc5.fixed/arch/arm/plat-omap/include/mach/keypad.h
> --- linux-2.6.32-rc5.orig/arch/arm/plat-omap/include/mach/keypad.h 2009-10-16 02:41:50.000000000 +0200
> +++ linux-2.6.32-rc5.fixed/arch/arm/plat-omap/include/mach/keypad.h 2009-10-21 19:41:35.000000000 +0200
> @@ -10,7 +10,7 @@
> #ifndef ASMARM_ARCH_KEYPAD_H
> #define ASMARM_ARCH_KEYPAD_H
>
> -#include <linux/input/matrix_keypad.h>
> +#warning: Please update the board to use matrix_keypad.h instead
>
> struct omap_kp_platform_data {
> int rows;
> @@ -37,6 +37,9 @@ struct omap_kp_platform_data {
>
> #define KEY_PERSISTENT 0x00800000
> #define KEYNUM_MASK 0x00EFFFFF
> +#define KEY(col, row, val) (((col) << 28) | ((row) << 24) | (val))
> +#define PERSISTENT_KEY(col, row) (((col) << 28) | ((row) << 24) | \
> + KEY_PERSISTENT)
>
> #endif
>
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
prev parent reply other threads:[~2009-10-22 18:49 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
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 [this message]
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=20091022184958.GS16230@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 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.