diff options
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; |