]> pilppa.org Git - familiar-h63xx-build.git/blob - org.handhelds.familiar/packages/linux/openzaurus-pxa-2.4.18-rmk7-pxa3-embedix20031107/apm_arrowkey.patch
OE tree imported from monotone branch org.openembedded.oz354fam083 at revision 8b12e3...
[familiar-h63xx-build.git] / org.handhelds.familiar / packages / linux / openzaurus-pxa-2.4.18-rmk7-pxa3-embedix20031107 / apm_arrowkey.patch
1 --- linux/arch/arm/mach-pxa/sharpsl_apm.c-original      2005-09-07 02:38:21.000000000 -0600
2 +++ linux/arch/arm/mach-pxa/sharpsl_apm.c       2005-09-08 01:11:56.000000000 -0600
3 @@ -89,6 +89,12 @@
4  #include <linux/ioctl.h>
5  #include <asm/sharp_apm.h>
6  #include <asm/sharp_char.h>
7 +#if defined(CONFIG_ARCH_PXA_POODLE)
8 +#include <asm-arm/arch-pxa/keyboard_poodle.h> /* blc */
9 +#elif defined(CONFIG_ARCH_PXA_TOSA)
10 +#include <asm-arm/arch-pxa/keyboard_tosa.h>
11 +#define        NR_KEYCODES     (KEYCODE(KB_ROWS-1,KB_COLS-1)+1)
12 +#endif
13  #include <linux/delay.h>
14  #include <asm/arch/ads7846_ts.h>
15  #include <linux/apm_bios.h>
16 @@ -155,6 +156,7 @@
17  /// ioctl 
18  #if defined(CONFIG_ARCH_PXA_POODLE) || defined(CONFIG_ARCH_PXA_CORGI) || defined(CONFIG_ARCH_PXA_TOSA)
19  static u32 apm_event_mask = (APM_EVT_POWER_BUTTON);
20 +extern kbd_keyinfo sharppda_kbdstate[(NR_KEYCODES+1)];
21  #else
22  static u32 apm_event_mask = (APM_EVT_POWER_BUTTON | APM_EVT_BATTERY_STATUS);
23  #endif
24 @@ -472,7 +474,7 @@
25         if (irq == IRQ_GPIO_ON_KEY) {   /* suspend */
26  
27                 DPRINTK("irq=%d count=%d sharpsl_suspend_request%d\n",irq, count, sharpsl_suspend_request);
28 -               if ( GPLR(GPIO_ON_KEY) & GPIO_bit(GPIO_ON_KEY) ) {
29 +               if ( GPLR(GPIO_ON_KEY) & GPIO_bit(GPIO_ON_KEY) || (!sharppda_kbdstate[1].in) ) { /* second half, if something other than cancel is pushed blc */
30                         /* release */
31                         count = 0;
32                 } else {