Skip to content

Commit

Permalink
omap: Fix omap-keypad by restoring old keypad.h without breaking omap…
Browse files Browse the repository at this point in the history
…2 boards that use matrix_keypad

Only mach-omap2 boards are currently using matrix_keypad. Allow
mach-omap1 boards to use the old style keypad.h without breaking.

Created against linux-2.6.32-rc5.
Compile tested with omap_3430sdp_defconfig and rx51_defconfig.

Signed-off-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>
Signed-off-by: Tony Lindgren <tony@atomide.com>
  • Loading branch information
Janusz Krzysztofik authored and Tony Lindgren committed Oct 22, 2009
1 parent 012abee commit 6135434
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 8 deletions.
2 changes: 1 addition & 1 deletion arch/arm/mach-omap2/board-3430sdp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand All @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-omap2/board-ldp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand All @@ -41,7 +42,6 @@
#include <asm/delay.h>
#include <mach/control.h>
#include <mach/usb.h>
#include <mach/keypad.h>

#include "mmc-twl4030.h"

Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-omap2/board-omap3evm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand All @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-omap2/board-omap3pandora.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand All @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-omap2/board-rx51-peripherals.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand All @@ -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>

Expand Down
1 change: 0 additions & 1 deletion arch/arm/mach-omap2/board-rx51.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-omap2/board-zoom2.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand All @@ -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"
Expand Down
5 changes: 4 additions & 1 deletion arch/arm/plat-omap/include/mach/keypad.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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

0 comments on commit 6135434

Please sign in to comment.