diff options
author | Nicolas Pitre <nico@org.rmk.(none)> | 2005-06-16 16:23:56 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2005-06-16 16:23:56 -0400 |
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 dd012d6e2f5c..f2c9e0d2b24b 100644 --- a/arch/arm/mach-pxa/lubbock.c +++ b/arch/arm/mach-pxa/lubbock.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/kernel.h> | 15 | #include <linux/kernel.h> |
16 | #include <linux/init.h> | 16 | #include <linux/init.h> |
17 | #include <linux/device.h> | 17 | #include <linux/device.h> |
18 | #include <linux/sysdev.h> | ||
18 | #include <linux/major.h> | 19 | #include <linux/major.h> |
19 | #include <linux/fb.h> | 20 | #include <linux/fb.h> |
20 | #include <linux/interrupt.h> | 21 | #include <linux/interrupt.h> |
@@ -106,6 +107,35 @@ static void __init lubbock_init_irq(void) | |||
106 | set_irq_type(IRQ_GPIO(0), IRQT_FALLING); | 107 | set_irq_type(IRQ_GPIO(0), IRQT_FALLING); |
107 | } | 108 | } |
108 | 109 | ||
110 | #ifdef CONFIG_PM | ||
111 | |||
112 | static int lubbock_irq_resume(struct sys_device *dev) | ||
113 | { | ||
114 | LUB_IRQ_MASK_EN = lubbock_irq_enabled; | ||
115 | return 0; | ||
116 | } | ||
117 | |||
118 | static struct sysdev_class lubbock_irq_sysclass = { | ||
119 | set_kset_name("cpld_irq"), | ||
120 | .resume = lubbock_irq_resume, | ||
121 | }; | ||
122 | |||
123 | static struct sys_device lubbock_irq_device = { | ||
124 | .cls = &lubbock_irq_sysclass, | ||
125 | }; | ||
126 | |||
127 | static int __init lubbock_irq_device_init(void) | ||
128 | { | ||
129 | int ret = sysdev_class_register(&lubbock_irq_sysclass); | ||
130 | if (ret == 0) | ||
131 | ret = sysdev_register(&lubbock_irq_device); | ||
132 | return ret; | ||
133 | } | ||
134 | |||
135 | device_initcall(lubbock_irq_device_init); | ||
136 | |||
137 | #endif | ||
138 | |||
109 | static int lubbock_udc_is_connected(void) | 139 | static int lubbock_udc_is_connected(void) |
110 | { | 140 | { |
111 | return (LUB_MISC_RD & (1 << 9)) == 0; | 141 | return (LUB_MISC_RD & (1 << 9)) == 0; |