From: <p3t...@us...> - 2007-05-20 18:52:59
|
Revision: 985 http://svn.sourceforge.net/hackndev/?rev=985&view=rev Author: p3t3-dev Date: 2007-05-20 11:52:57 -0700 (Sun, 20 May 2007) Log Message: ----------- Treo650: power management wake-up modifications 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-05-20 18:49:06 UTC (rev 984) +++ linux4palm/linux/trunk/arch/arm/mach-pxa/palmt650/palmt650_pm.c 2007-05-20 18:52:57 UTC (rev 985) @@ -1,8 +1,9 @@ /************************************************************************ - * PalmOne Zire72 suspend/resume support * + * PalmOne treo650 suspend/resume support * * * - * Authors: Jan Herman <2h...@se...> * - * Sergey Lapin <sla...@gm...> * + * Authors: P3T3, Petr Blaha <pb...@p3...> * + * Jan Herman <2h...@se...> * + * Sergey Lapin <sla...@gm...> * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License version 2 as * @@ -24,7 +25,6 @@ #include <asm/arch/pxa-regs.h> #include <asm/arch/palmt650-gpio.h> -#include <asm/arch/pxa27x_keyboard.h> #ifdef CONFIG_PM static int palmt650_suspend(struct device *dev, pm_message_t state) @@ -32,8 +32,8 @@ /* Wake-Up on RTC event, etc. */ PWER |= PWER_RTC | PWER_WEP1; - /* Wakeup by keyboard :) */ - PKWR = 0xe0000; + /* Wakeup by keyboard :-) */ + PKWR = 0x01; /* Enabled Deep-Sleep mode */ PCFR |= PCFR_DS; @@ -47,15 +47,12 @@ /* Turn off LCD power */ SET_PALMT650_GPIO(LCD_POWER,0); - /* Turn screen off */ - SET_PALMT650_GPIO(LCD_SCREEN,0); /* Turn off USB power */ /* SET_PALMT650_GPIO(USB_POWER,0); */ - + /* disable GPIO reset - DO NOT REMOVE! */ PCFR = PCFR_GPROD; -/* PCFR &= PCFR_GPR_EN; */ return 0; } @@ -74,10 +71,8 @@ /* Turn on LCD power */ SET_PALMT650_GPIO(LCD_POWER,1); - /* Turn screen on */ - SET_PALMT650_GPIO(LCD_SCREEN,1); /* Turn on USB power */ -/* SET_PALMT650_GPIO(USB_POWER,1); */ +/* SET_PALMT650_GPIO(USB_POWER,1); */ return 0; } @@ -89,7 +84,7 @@ static void palmt650_pxa_ll_pm_suspend(unsigned long resume_addr) { /* For future */ - return; + return; } static void palmt650_pxa_ll_pm_resume(void) @@ -129,6 +124,6 @@ module_init(palmt650_pm_init); module_exit(palmt650_pm_exit); -MODULE_AUTHOR("Jan Herman <2h...@se...>, Sergey Lapin <sla...@gm...>"); +MODULE_AUTHOR("P3T3 Petr Blaha <pb...@p3...>, Jan Herman <2h...@se...>, Sergey Lapin <sla...@gm...>"); MODULE_DESCRIPTION("PalmOne Treo 650 power management driver"); MODULE_LICENSE("GPL"); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bob...@us...> - 2007-07-19 01:08:19
|
Revision: 1179 http://svn.sourceforge.net/hackndev/?rev=1179&view=rev Author: bobofdoom Date: 2007-07-18 18:08:06 -0700 (Wed, 18 Jul 2007) Log Message: ----------- PalmT650: Make wakeup from standby possible by replugging AC97. Haven't figure out how to get keypad wakeup to work yet. 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-19 01:06:17 UTC (rev 1178) +++ linux4palm/linux/trunk/arch/arm/mach-pxa/palmt650/palmt650_pm.c 2007-07-19 01:08:06 UTC (rev 1179) @@ -33,8 +33,12 @@ PWER |= PWER_RTC | PWER_WEP1; PWER |= 2 << 19; /* wake on SD */ + PWER |= 1; + PRER |= 1; + PFER |= 1; + /* Wakeup by keyboard :-) */ - PKWR = 0x01; + PKWR = 0xffffff; /* Enabled Deep-Sleep mode */ PCFR |= PCFR_DS; @@ -47,7 +51,7 @@ {} /* Turn off LCD power */ - SET_PALMT650_GPIO(LCD_POWER,0); + //SET_PALMT650_GPIO(LCD_POWER,0); /* Turn off USB power */ /* SET_PALMT650_GPIO(USB_POWER,0); */ @@ -71,7 +75,7 @@ /* Here are all of special to resume PalmOne treo 650 */ /* Turn on LCD power */ - SET_PALMT650_GPIO(LCD_POWER,1); + //SET_PALMT650_GPIO(LCD_POWER,1); /* Turn on USB power */ /* SET_PALMT650_GPIO(USB_POWER,1); */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
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. |