From: <bob...@us...> - 2007-07-20 15:51:08
|
Revision: 1188 http://svn.sourceforge.net/hackndev/?rev=1188&view=rev Author: bobofdoom Date: 2007-07-20 08:51:04 -0700 (Fri, 20 Jul 2007) Log Message: ----------- PalmT650: Wake-up on keypad now works properly. - Currently only enabled for the red phone/power button but can be configured to work for any key. - Thanks to Sergey Lapin for pointing out that you need to give a good value for PKWR. Modified Paths: -------------- linux4palm/linux/trunk/arch/arm/mach-pxa/palmt650/palmt650_pm.c Modified: linux4palm/linux/trunk/arch/arm/mach-pxa/palmt650/palmt650_pm.c =================================================================== --- linux4palm/linux/trunk/arch/arm/mach-pxa/palmt650/palmt650_pm.c 2007-07-20 14:50:59 UTC (rev 1187) +++ linux4palm/linux/trunk/arch/arm/mach-pxa/palmt650/palmt650_pm.c 2007-07-20 15:51:04 UTC (rev 1188) @@ -53,23 +53,33 @@ | PWER_GPIO1 | (1 << 20); /* SD detect */ - /* wake-up by keypad (not working yet) */ - PKWR = 0xffffffff; + /* wake-up by keypad */ + //PKWR = PKWR_MKIN0 | PKWR_MKIN1 | PKWR_MKIN2 | PKWR_MKIN3 | + // PKWR_MKIN4 | PKWR_MKIN5 | PKWR_MKIN6 | PKWR_MKIN7; + + /* disable all inputs and outputs except in 5 and out 0. + * this means only the power button will wake us up; + * not any key. + */ + PKWR = PKWR_MKIN5; + pxa_gpio_mode(GPIO_NR_PALMT650_KP_MKOUT1 | GPIO_OUT); + pxa_gpio_mode(GPIO_NR_PALMT650_KP_MKOUT2 | GPIO_OUT); + pxa_gpio_mode(GPIO_NR_PALMT650_KP_MKOUT3 | GPIO_OUT); + pxa_gpio_mode(GPIO_NR_PALMT650_KP_MKOUT4 | GPIO_OUT); + pxa_gpio_mode(GPIO_NR_PALMT650_KP_MKOUT5 | GPIO_OUT); + pxa_gpio_mode(GPIO_NR_PALMT650_KP_MKOUT6 | GPIO_OUT); + SET_PALMT650_GPIO(KP_MKOUT1, 0); + SET_PALMT650_GPIO(KP_MKOUT2, 0); + SET_PALMT650_GPIO(KP_MKOUT3, 0); + SET_PALMT650_GPIO(KP_MKOUT4, 0); + SET_PALMT650_GPIO(KP_MKOUT5, 0); + SET_PALMT650_GPIO(KP_MKOUT6, 0); + KPC &= ~KPC_ASACT; KPC |= KPC_AS; KPC &= ~KPC_MIE; /* matrix keypad interrupt disabled */ - PKWR; PKSR = 0xffffffff; /* clear */ - PSLR |= 0xF08; - /* hacky alternate method for keypad wake - * at least allows some way. Press I, K, M, R-Alt or R-Shift to wake - */ - pxa_gpio_mode(GPIO_NR_PALMT650_KP_MKIN7 | GPIO_IN); - PWER |= PWER_GPIO13; - PRER |= PWER_GPIO13; - PFER |= PWER_GPIO13; - /* ensure USB connection is broken */ SET_PALMT650_GPIO(USB_PULLUP, 0); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |