summaryrefslogtreecommitdiff
path: root/packages/linux/linux-ezx/keypad-module.patch
diff options
context:
space:
mode:
Diffstat (limited to 'packages/linux/linux-ezx/keypad-module.patch')
-rw-r--r--packages/linux/linux-ezx/keypad-module.patch249
1 files changed, 249 insertions, 0 deletions
diff --git a/packages/linux/linux-ezx/keypad-module.patch b/packages/linux/linux-ezx/keypad-module.patch
new file mode 100644
index 0000000000..e6bae3aa16
--- /dev/null
+++ b/packages/linux/linux-ezx/keypad-module.patch
@@ -0,0 +1,249 @@
+Index: linux-2.6.16.5-ezx/drivers/misc/ezx/keypad.c
+===================================================================
+--- linux-2.6.16.5-ezx.orig/drivers/misc/ezx/keypad.c 2006-04-17 08:39:05.000000000 -0300
++++ linux-2.6.16.5-ezx/drivers/misc/ezx/keypad.c 2006-04-21 22:21:32.000000000 -0300
+@@ -207,7 +207,7 @@
+ return 0;
+ }
+
+-#if defined(CONFIG_KEYPAD_E680)
++#if defined(CONFIG_KEYPAD_E680) || defined(CONFIG_KEYPAD_E680_MODULE)
+ #ifdef CONFIG_PM
+ static int keypadI_pm_callback(struct pm_dev *pm_dev, pm_request_t req, void *data)
+ {
+@@ -236,7 +236,7 @@
+ #ifdef KDEBUG
+ printk(KERN_DEBUG "keypadI_open\n");
+ #endif
+-#if defined(CONFIG_KEYPAD_E680)
++#if defined(CONFIG_KEYPAD_E680) || defined (CONFIG_KEYPAD_E680_MODULE)
+ pxa_gpio_mode(GPIO_TC_MM_EN);
+ GPDR(GPIO_TC_MM_EN) |= GPIO_bit(GPIO_TC_MM_EN);
+ GPSR(GPIO_TC_MM_EN) = GPIO_bit(GPIO_TC_MM_EN);
+@@ -279,7 +279,7 @@
+ #ifdef KDEBUG
+ printk(KERN_DEBUG " keypadI_close\n");
+ #endif
+-#if defined(CONFIG_KEYPAD_E680)
++#if defined(CONFIG_KEYPAD_E680) || defined(CONFIG_KEYPAD_E680_MODULE)
+ pxa_gpio_mode(GPIO_TC_MM_EN);
+ GPDR(GPIO_TC_MM_EN) |= GPIO_bit(GPIO_TC_MM_EN);
+ GPSR(GPIO_TC_MM_EN) = GPIO_bit(GPIO_TC_MM_EN);
+@@ -315,7 +315,7 @@
+ * in column c, row r of the scan registers.
+ */
+
+-#if defined(CONFIG_KEYPAD_V700)
++#if defined(CONFIG_KEYPAD_V700) || defined (CONFIG_KEYPAD_V700_MODULE)
+ int
+ scanbit_to_keycode[] = {
+ /* col 0 */
+@@ -351,7 +351,7 @@
+ };
+
+ /* end CONFIG_E680_P4A */
+-#elif defined(CONFIG_KEYPAD_E680)
++#elif defined(CONFIG_KEYPAD_E680) || defined(CONFIG_KEYPAD_E680_MODULE)
+ int
+ scanbit_to_keycode[] = {
+ /* col 0 */
+@@ -369,7 +369,7 @@
+
+ };
+ /*end CONFIG_KEYPAD_E680 */
+-#elif defined(CONFIG_KEYPAD_A780)
++#elif defined(CONFIG_KEYPAD_A780) || defined(CONFIG_KEYPAD_A780_MODULE)
+ int
+ scanbit_to_keycode[] = {
+ /* col 0 */
+@@ -404,7 +404,7 @@
+ int row, col;
+ int bitnum;
+ unsigned long scanmap;
+-#if defined(CONFIG_KEYPAD_A780)
++#if defined(CONFIG_KEYPAD_A780) || defined(CONFIG_KEYPAD_A780_MODULE)
+ int keep;
+ #endif
+
+@@ -435,7 +435,7 @@
+ turn_on_bit (bitmap, scanbit_to_keycode[bitnum-1]);
+ scanmap &= ~(1<<(bitnum-1));
+ }
+-#if defined(CONFIG_KEYPAD_A780)
++#if defined(CONFIG_KEYPAD_A780) || defined(CONFIG_KEYPAD_A780_MODULE)
+ kpasmkp2 = KPASMKP2;
+ if ((kpasmkp1 & 0x180000) || (kpasmkp2 & 0x18))
+ keep = 1;
+@@ -638,7 +638,7 @@
+ #ifdef KDEBUG
+ printk (KERN_DEBUG "keypadI_ioctl: 0x%x\n", cmd);
+ #endif
+-#if defined(CONFIG_KEYPAD_E680)
++#if defined(CONFIG_KEYPAD_E680) || defined(CONFIG_KEYPAD_E680_MODULE)
+ if( cmd == KEYPADI_TURN_ON_LED )
+ {
+ GPCR(GPIO_TC_MM_EN) = GPIO_bit(GPIO_TC_MM_EN);
+@@ -806,7 +806,7 @@
+ turn_on_bit (keybitmap, KEYPAD_CAMERA_VOICE);
+ }
+ #endif
+-#if defined(CONFIG_KEYPAD_E680)
++#if defined(CONFIG_KEYPAD_E680) || defined(CONFIG_KEYPAD_E680_MODULE)
+ if (pksr & 0xee400) /*93 96 97 98 190 101 102 key is pressed */
+ {
+ apm_queue_event(KRNL_KEYPAD);
+@@ -818,7 +818,7 @@
+ turn_on_bit (keybitmap, KEYPAD_B);
+ }
+ #endif
+-#if defined(CONFIG_KEYPAD_A780)
++#if defined(CONFIG_KEYPAD_A780) || defined(CONFIG_KEYPAD_A780_MODULE)
+ printk("pksr = %x\n",pksr);
+ if (pksr & 0xec400) /* 93 97 98 100 101 102 key is pressed */
+ {
+@@ -987,7 +987,7 @@
+ turn_on_bit (keybitmap, KEYPAD_B);
+ }
+
+-#elif defined(CONFIG_KEYPAD_A780)
++#elif defined(CONFIG_KEYPAD_A780) || defined(CONFIG_KEYPAD_A780_MODULE)
+ if (kpdk & KPDK_DK0) /* voice/camera key is pressed */
+ {
+ turn_on_bit (keybitmap, KEYPAD_CAMERA_VOICE);
+@@ -1125,7 +1125,7 @@
+
+ copy_bitmap (oldkeybitmap, keybitmap);
+ scan_to_bitmap (kpas, kpasmkp0, kpasmkp1, keybitmap);
+-#if defined(CONFIG_E680_P4A)
++#if defined(CONFIG_E680_P4A) || defined(CONFIG_E680_P4A_MODULE)
+ if (kpdk & KPDK_DK0) /* screen lock key is pressed */
+ {
+ turn_on_bit (keybitmap, KEYPAD_CAMERA_VOICE);
+@@ -1135,7 +1135,7 @@
+ turn_on_bit (keybitmap, KEYPAD_POWER);
+ }
+ /* power key is connected to GPIO97 as GPIO input */
+-#elif defined(CONFIG_KEYPAD_E680)
++#elif defined(CONFIG_KEYPAD_E680) || defined(CONFIG_KEYPAD_E680_MODULE)
+ if (kpdk & KPDK_DK0) /* screen lock key is pressed */
+ {
+ turn_on_bit (keybitmap, KEYPAD_CAMERA_VOICE);
+@@ -1154,7 +1154,7 @@
+ turn_on_bit (keybitmap, KEYPAD_B);
+ }
+
+-#elif defined(CONFIG_KEYPAD_A780)
++#elif defined(CONFIG_KEYPAD_A780) || defined(CONFIG_KEYPAD_A780_MODULE)
+ if (kpdk & KPDK_DK0) /* voice/camera key is pressed */
+ {
+ turn_on_bit (keybitmap, KEYPAD_CAMERA_VOICE);
+@@ -1271,7 +1271,7 @@
+ set_bitmap_to_zero (lastioctlbitmap);
+
+ /* set up gpio */
+-#if defined (CONFIG_KEYPAD_V700)
++#if defined (CONFIG_KEYPAD_V700) || defined(CONFIG_KEYPAD_V700_MODULE)
+ pxa_gpio_mode(95 | GPIO_ALT_FN_1_IN); /* KP_MKIN<6> */
+ pxa_gpio_mode(97 | GPIO_ALT_FN_1_IN); /* KP_MKIN<3> */
+ pxa_gpio_mode(98 | GPIO_ALT_FN_1_IN); /* KP_MKIN<4> */
+@@ -1293,7 +1293,7 @@
+ 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> */
+-#elif defined(CONFIG_KEYPAD_E680)
++#elif defined(CONFIG_KEYPAD_E680) || defined(CONFIG_KEYPAD_E680_MODULE)
+ pxa_gpio_mode(93 | GPIO_ALT_FN_1_IN); /* KP_DKIN<0>, VR Key */
+ pxa_gpio_mode(96 | GPIO_ALT_FN_1_IN); /* KP_DKIN<3>, GAME_A */
+ pxa_gpio_mode(97 | GPIO_ALT_FN_1_IN); /* KP_DKIN<4>, power key */
+@@ -1309,7 +1309,7 @@
+ GPDR(GPIO_TC_MM_EN) |= GPIO_bit(GPIO_TC_MM_EN);
+ GPSR(GPIO_TC_MM_EN) = GPIO_bit(GPIO_TC_MM_EN);
+ PGSR3 |= GPIO_bit(GPIO_TC_MM_EN);
+-#elif defined (CONFIG_KEYPAD_A780)
++#elif defined (CONFIG_KEYPAD_A780) || defined (CONFIG_KEYPAD_A780_MODULE)
+ 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> */
+@@ -1321,7 +1321,7 @@
+ 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> */
+-#elif defined(CONFIG_KEYPAD_MAINSTONE)
++#elif defined(CONFIG_KEYPAD_MAINSTONE) || defined(CONFIG_KEYPAD_MAINSTONE_MODULE)
+ /* from Intel driver */
+ pxa_gpio_mode(93 | GPIO_ALT_FN_1_IN);
+ pxa_gpio_mode(94 | GPIO_ALT_FN_1_IN);
+@@ -1340,18 +1340,18 @@
+ /* set keypad control register */
+ KPC = (KPC_ASACT | /* automatic scan on activity */
+ KPC_ME | KPC_DE | /* matrix and direct keypad enabled */
+-#if defined (CONFIG_KEYPAD_V700)
++#if defined (CONFIG_KEYPAD_V700) || defined(CONFIG_KEYPAD_V700_MODULE)
+ (3<<23) | /* 4 columns */
+ (6<<26) | /* 7 rows */
+ #elif defined(CONFIG_E680_P4A)
+ (3<<23) | /* 4 columns */
+ (2<<26) | /* 3 rows */
+ (4<<6) | /* 4# direct key */
+-#elif defined(CONFIG_KEYPAD_E680)
++#elif defined(CONFIG_KEYPAD_E680) || defined(CONFIG_KEYPAD_E680_MODULE)
+ (5<<23) | /* 4 columns */
+ (4<<26) | /* 3 rows */
+ (5<<6) | /* 5# direct keys */
+-#elif defined(CONFIG_KEYPAD_A780)
++#elif defined(CONFIG_KEYPAD_A780) || defined(CONFIG_KEYPAD_A780_MODULE)
+ (4<<23) | /* 5 columns */
+ (4<<26) | /* 5 rows */
+ (0<<6) | /* 1# direct keys */
+@@ -1414,7 +1414,7 @@
+ {
+ turn_on_bit (keybitmap, KEYPAD_POWER);
+ }
+-#elif defined(CONFIG_KEYPAD_E680)
++#elif defined(CONFIG_KEYPAD_E680) || defined(CONFIG_KEYPAD_E680_MODULE)
+ if (kpdk & KPDK_DK0) /* VR key is pressed (switch on) */
+ {
+ turn_on_bit (keybitmap, KEYPAD_CAMERA_VOICE);
+@@ -1431,7 +1431,7 @@
+ {
+ turn_on_bit (keybitmap, KEYPAD_B);
+ }
+-#elif defined(CONFIG_KEYPAD_A780)
++#elif defined(CONFIG_KEYPAD_A780) || defined(CONFIG_KEYPAD_A780_MODULE)
+ if (kpdk & KPDK_DK0) /* voice/camera key is pressed */
+ {
+ turn_on_bit (keybitmap, KEYPAD_CAMERA_VOICE);
+@@ -1446,13 +1446,13 @@
+ /*103 104 105 106*/
+ PGSR3 |= 0x780;
+ #endif
+-#if defined(CONFIG_KEYPAD_E680)
++#if defined(CONFIG_KEYPAD_E680) || defined(CONFIG_KEYPAD_E680_MODULE)
+ /*93,96,97,98,100,101,102*/
+ PKWR = 0xee400;
+ /*103 104 105 106*/
+ PGSR3 |= 0x780;
+ #endif
+-#if defined(CONFIG_KEYPAD_A780)
++#if defined(CONFIG_KEYPAD_A780) || defined(CONFIG_KEYPAD_A780_MODULE)
+ /*93,97,98,100,101,102*/
+ PKWR = 0xec400;
+ /*103 104 105 106 107*/
+@@ -1460,7 +1460,7 @@
+ #endif
+ #endif
+
+-#if defined(CONFIG_KEYPAD_E680)
++#if defined(CONFIG_KEYPAD_E680) || defined(CONFIG_KEYPAD_E680_MODULE)
+ #ifdef CONFIG_PM
+ keypadI_pm_dev = pm_register(PM_SYS_DEV, 0, keypadI_pm_callback);
+ PGSR3 |= 0x8;
+@@ -1486,7 +1486,7 @@
+ pm_unregister(pm_dev);
+ #endif
+
+-#if defined(CONFIG_KEYPAD_E680)
++#if defined(CONFIG_KEYPAD_E680) || defined(CONFIG_KEYPAD_E680_MODULE)
+ #ifdef CONFIG_PM
+ pm_unregister(keypadI_pm_dev);
+ #endif