From: <z7...@us...> - 2007-01-18 08:26:49
|
Revision: 762 http://svn.sourceforge.net/hackndev/?rev=762&view=rev Author: z72ka Date: 2007-01-18 00:25:56 -0800 (Thu, 18 Jan 2007) Log Message: ----------- Palmz72: Added suspend/resume support Added Paths: ----------- linux4palm/linux/trunk/arch/arm/mach-pxa/palmz72/palmz72_pm.c Added: linux4palm/linux/trunk/arch/arm/mach-pxa/palmz72/palmz72_pm.c =================================================================== --- linux4palm/linux/trunk/arch/arm/mach-pxa/palmz72/palmz72_pm.c (rev 0) +++ linux4palm/linux/trunk/arch/arm/mach-pxa/palmz72/palmz72_pm.c 2007-01-18 08:25:56 UTC (rev 762) @@ -0,0 +1,71 @@ +/* + * PalmOne Zire72 suspend/resume support + * + * Author: Jan Herman <2h...@se...> + * + * 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 + * published by the Free Software Foundation. + * + */ + +#include <linux/kernel.h> +#include <linux/device.h> +#include <linux/pm.h> + +#include <asm/arch/pxa-pm_ll.h> +#include <asm/arch/hardware.h> +#include <asm/arch/pxa-regs.h> + +#include <asm/arch/palmz72-gpio.h> + + +static void palmz72_pxa_ll_pm_suspend(unsigned long resume_addr) +{ + + /* Wake up on Voice Memo button*/ + PWER |= PWER_GPIO13; + /* Wake up on RTC alaram is possibile */ + //PWER |= PWER_RTC; + PRER |= PWER_GPIO13; + + /* USB, in theory this can even wake us from deep sleep */ + PWER |= PWER_GPIO15; + PFER |= PWER_GPIO15; + PRER |= PWER_GPIO15; + + /* Turn off LCD power */ + SET_PALMZ72_GPIO(LCD_POWER,0); + /* Turn off USB power */ + SET_PALMZ72_GPIO(USB_POWER,0); + + + /* disable GPIO reset, palm bootloader will hang us */ + //PCFR |= PCFR_GPR_EN | PCFR_OPDE; + PCFR &= PCFR_GPR_EN; + + return; +} + +static void palmz72_pxa_ll_pm_resume(void) +{ + + /* re-enable GPIO reset */ + PCFR |= PCFR_GPR_EN; + + /* Turn on LCD power */ + SET_PALMZ72_GPIO(LCD_POWER,1); + + /* Turn on USB power */ + SET_PALMZ72_GPIO(USB_POWER,1); +} + +struct pxa_ll_pm_ops palmz72_ll_pm_ops = { + .suspend = palmz72_pxa_ll_pm_suspend, + .resume = palmz72_pxa_ll_pm_resume, +}; + +MODULE_AUTHOR("Jan Herman <2h...@se...>"); +MODULE_DESCRIPTION("PalmOne Zire72 suspend/resume support driver"); +MODULE_LICENSE("GPL"); + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |