diff options
author | Nicolas Pitre <nico@org.rmk.(none)> | 2005-06-16 21:23:56 +0100 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2005-06-16 21:23:56 +0100 |
commit | 22f11c4e662ef0bdd87f09370a76c83ed738d5fd (patch) | |
tree | 3b3c2df768eacbd59240cd4be8d9922ab4a0ba7d /arch/arm/mach-pxa/lubbock.c | |
parent | 95220a2ea334b5ff2168cc9bf31c0e08b29bae21 (diff) |
[PATCH] ARM: 2715/1: restore CPLD interrupts upon resume for Lubbock and Mainstone
Patch from Nicolas Pitre
Without this some devices fail to work again after a suspend event.
Signed-off-by: Nicolas Pitre
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mach-pxa/lubbock.c')
-rw-r--r-- | arch/arm/mach-pxa/lubbock.c | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/arch/arm/mach-pxa/lubbock.c b/arch/arm/mach-pxa/lubbock.c index dd012d6e2f5..f2c9e0d2b24 100644 --- a/arch/arm/mach-pxa/lubbock.c +++ b/arch/arm/mach-pxa/lubbock.c @@ -15,6 +15,7 @@ #include <linux/kernel.h> #include <linux/init.h> #include <linux/device.h> +#include <linux/sysdev.h> #include <linux/major.h> #include <linux/fb.h> #include <linux/interrupt.h> @@ -106,6 +107,35 @@ static void __init lubbock_init_irq(void) set_irq_type(IRQ_GPIO(0), IRQT_FALLING); } +#ifdef CONFIG_PM + +static int lubbock_irq_resume(struct sys_device *dev) +{ + LUB_IRQ_MASK_EN = lubbock_irq_enabled; + return 0; +} + +static struct sysdev_class lubbock_irq_sysclass = { + set_kset_name("cpld_irq"), + .resume = lubbock_irq_resume, +}; + +static struct sys_device lubbock_irq_device = { + .cls = &lubbock_irq_sysclass, +}; + +static int __init lubbock_irq_device_init(void) +{ + int ret = sysdev_class_register(&lubbock_irq_sysclass); + if (ret == 0) + ret = sysdev_register(&lubbock_irq_device); + return ret; +} + +device_initcall(lubbock_irq_device_init); + +#endif + static int lubbock_udc_is_connected(void) { return (LUB_MISC_RD & (1 << 9)) == 0; |