summaryrefslogtreecommitdiff
path: root/packages/linux/linux-ezx-2.6.21/a780-kbd.patch
diff options
context:
space:
mode:
authorKoen Kooi <koen@openembedded.org>2007-05-19 09:38:22 +0000
committerKoen Kooi <koen@openembedded.org>2007-05-19 09:38:22 +0000
commitc50fe0c5f0eb2e243a4921e8576ba49db26483fc (patch)
tree45fbe157b566abc7dc092d7d1b5d34d0cdfec4ba /packages/linux/linux-ezx-2.6.21/a780-kbd.patch
parenta338dfb607b7a17292b6ec719c2db6528e6a87ad (diff)
linux-ezx 2.6.21: update to r2011:
r2011: call send_readurb on bp_rdy signal from BP to keep BP communication active add asoc pxa2xx-ssp.c driver from asoc-v0.13rc3 r2010: * pxa-kbd.patch: Fix pxakbd bug: direct keys were not passed to userspace * a780-kbd.patch: Cleanup keycodes definition for a780, use unique keycodes so to avoid the double event problem occurring when the same keycode is used more than once. r2003: core: EZX subsystem ezx-phone.c file for each phone BP handshake code on a platform_driver (and another .patch) pm: fully functional suspend/resume (except for BP) reboot/poweroff new: a780 flip e680 lock switch bp: Kconfig entry to disable BP handshake (the watchdog dont start if we dont try to handshake) other: delete obsolete files r2002: * Implement vibrator handling for a780 using the leds class. r1999: * Port and readapt ezx-backlight patch. Let's use again the backlight class to handle lcd brightness. r1998: * Port leds patches for A780 and E680 (we still pollute ezx.c for now)
Diffstat (limited to 'packages/linux/linux-ezx-2.6.21/a780-kbd.patch')
-rw-r--r--packages/linux/linux-ezx-2.6.21/a780-kbd.patch90
1 files changed, 90 insertions, 0 deletions
diff --git a/packages/linux/linux-ezx-2.6.21/a780-kbd.patch b/packages/linux/linux-ezx-2.6.21/a780-kbd.patch
new file mode 100644
index 0000000000..383839d639
--- /dev/null
+++ b/packages/linux/linux-ezx-2.6.21/a780-kbd.patch
@@ -0,0 +1,90 @@
+Index: linux-2.6.21/arch/arm/mach-pxa/ezx-a780.c
+===================================================================
+--- linux-2.6.21.orig/arch/arm/mach-pxa/ezx-a780.c 2007-05-17 22:04:57.000000000 +0200
++++ linux-2.6.21/arch/arm/mach-pxa/ezx-a780.c 2007-05-17 22:05:05.000000000 +0200
+@@ -16,18 +16,21 @@
+ #include <linux/fb.h>
+ #include <linux/mmc/host.h>
+ #include <linux/irq.h>
++#include <linux/input.h>
+
+ #include <asm/mach-types.h>
+ #include <asm/mach/arch.h>
+ #include <asm/arch/pxa-regs.h>
+ #include <asm/arch/pxafb.h>
+ #include <asm/arch/mmc.h>
++#include <asm/arch/kbd.h>
+
+ #include "generic.h"
+ #include "ezx.h"
+
+ extern void ezx_lcd_power(int, struct fb_var_screeninfo *);
+ extern void ezx_backlight_power(int);
++extern void __init pxa_set_kbd_info(struct pxakbd_platform_data *);
+
+ #ifdef CONFIG_EZX_PCAP
+ extern int ezx_pcap_mmcsd_power(int);
+@@ -141,6 +144,55 @@
+ .pxafb_lcd_power = &ezx_lcd_power,
+ };
+
++static unsigned char a780_keycode[] = {
++ /* row 0 */
++ KEY_PHONE, KEY_MENU, KEY_CANCEL, KEY_PAGEUP, KEY_UP,
++ /* row 1 */
++ KEY_KP1, KEY_KP2, KEY_KP3, KEY_ENTER, KEY_KPENTER, /*center joypad */
++ /* row 2 */
++ KEY_KP4, KEY_KP5, KEY_KP6, KEY_RECORD, KEY_LEFT,
++ /* row 3 */
++ KEY_KP7, KEY_KP8, KEY_KP9, KEY_HOME, KEY_RIGHT,
++ /* row 4 */
++ KEY_KPASTERISK, KEY_KP0, KEY_KPDOT, KEY_PAGEDOWN, KEY_DOWN,
++};
++
++static unsigned char a780_direct_keycode[] = {
++ KEY_CAMERA,
++};
++
++static int a780_kbd_init(void)
++{
++ pxa_gpio_mode(93 | GPIO_ALT_FN_1_IN); /* KP_DKIN<0>, voice_rec */
++ pxa_gpio_mode(97 | GPIO_ALT_FN_3_IN); /* KP_MKIN<3> */
++ pxa_gpio_mode(98 | GPIO_ALT_FN_3_IN); /* KP_MKIN<4> */
++ pxa_gpio_mode(100 | GPIO_ALT_FN_1_IN); /* KP_MKIN<0> */
++ pxa_gpio_mode(101 | GPIO_ALT_FN_1_IN); /* KP_MKIN<1> */
++ pxa_gpio_mode(102 | GPIO_ALT_FN_1_IN); /* KP_MKIN<2> */
++ pxa_gpio_mode(103 | GPIO_ALT_FN_2_OUT); /* KP_MKOUT<0> */
++ pxa_gpio_mode(104 | GPIO_ALT_FN_2_OUT); /* KP_MKOUT<1> */
++ pxa_gpio_mode(105 | GPIO_ALT_FN_2_OUT); /* KP_MKOUT<2> */
++ pxa_gpio_mode(106 | GPIO_ALT_FN_2_OUT); /* KP_MKOUT<3> */
++ pxa_gpio_mode(107 | GPIO_ALT_FN_2_OUT); /* KP_MKOUT<4> */
++ PKWR = 0xec400;
++ PGSR3 |= 0xf80;
++ return 0;
++}
++
++static struct pxakbd_platform_data a780_kbd_platform_data = {
++ .init = &a780_kbd_init,
++ .scan_interval = HZ/40,
++ .matrix = {
++ .keycode = a780_keycode,
++ .cols = 5,
++ .rows = 5,
++ },
++ .direct = {
++ .keycode = a780_direct_keycode,
++ .num = 1,
++ },
++};
++
+ static struct platform_device *devices[] __initdata = {
+ };
+
+@@ -159,6 +211,7 @@
+
+ set_pxa_fb_info(&a780_fb_info);
+ pxa_set_mci_info(&a780_mci_platform_data);
++ pxa_set_kbd_info(&a780_kbd_platform_data);
+
+ platform_add_devices(devices, ARRAY_SIZE(devices));
+ }