diff options
author | Richard Purdie <rpurdie@rpsys.net> | 2006-06-19 15:46:05 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2006-06-19 15:46:05 -0400 |
commit | faed568413e89f87cd60aa8b292cc4b9996bae42 (patch) | |
tree | 366c9f3e75f5e35f6ebf3b42d26c82e39248f471 /arch/arm/mach-pxa/poodle.c | |
parent | f8703dc8cb10eca7f6fe6ef364d8e106fe07f034 (diff) |
[ARM] 3594/1: Poodle: Add touchscreen support + other updates
Patch from Richard Purdie
Poodle Updates:
* Update corgi_ssp to make the GPIO chip selects optional
* Enable corgi_ssp for use by poodle
* Add corgi touchscreen platform device for poodle
* Export locomo platform device.
* Set framebuffer device parent correctly
Signed-off-by: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mach-pxa/poodle.c')
-rw-r--r-- | arch/arm/mach-pxa/poodle.c | 69 |
1 files changed, 67 insertions, 2 deletions
diff --git a/arch/arm/mach-pxa/poodle.c b/arch/arm/mach-pxa/poodle.c index 234877a09dfb..9a9fa87cea9f 100644 --- a/arch/arm/mach-pxa/poodle.c +++ b/arch/arm/mach-pxa/poodle.c | |||
@@ -37,12 +37,15 @@ | |||
37 | #include <asm/arch/irda.h> | 37 | #include <asm/arch/irda.h> |
38 | #include <asm/arch/poodle.h> | 38 | #include <asm/arch/poodle.h> |
39 | #include <asm/arch/pxafb.h> | 39 | #include <asm/arch/pxafb.h> |
40 | #include <asm/arch/sharpsl.h> | ||
41 | #include <asm/arch/ssp.h> | ||
40 | 42 | ||
41 | #include <asm/hardware/scoop.h> | 43 | #include <asm/hardware/scoop.h> |
42 | #include <asm/hardware/locomo.h> | 44 | #include <asm/hardware/locomo.h> |
43 | #include <asm/mach/sharpsl_param.h> | 45 | #include <asm/mach/sharpsl_param.h> |
44 | 46 | ||
45 | #include "generic.h" | 47 | #include "generic.h" |
48 | #include "sharpsl.h" | ||
46 | 49 | ||
47 | static struct resource poodle_scoop_resources[] = { | 50 | static struct resource poodle_scoop_resources[] = { |
48 | [0] = { | 51 | [0] = { |
@@ -120,13 +123,71 @@ static struct resource locomo_resources[] = { | |||
120 | }, | 123 | }, |
121 | }; | 124 | }; |
122 | 125 | ||
123 | static struct platform_device locomo_device = { | 126 | struct platform_device poodle_locomo_device = { |
124 | .name = "locomo", | 127 | .name = "locomo", |
125 | .id = 0, | 128 | .id = 0, |
126 | .num_resources = ARRAY_SIZE(locomo_resources), | 129 | .num_resources = ARRAY_SIZE(locomo_resources), |
127 | .resource = locomo_resources, | 130 | .resource = locomo_resources, |
128 | }; | 131 | }; |
129 | 132 | ||
133 | EXPORT_SYMBOL(poodle_locomo_device); | ||
134 | |||
135 | /* | ||
136 | * Poodle SSP Device | ||
137 | */ | ||
138 | |||
139 | struct platform_device poodle_ssp_device = { | ||
140 | .name = "corgi-ssp", | ||
141 | .id = -1, | ||
142 | }; | ||
143 | |||
144 | struct corgissp_machinfo poodle_ssp_machinfo = { | ||
145 | .port = 1, | ||
146 | .cs_lcdcon = -1, | ||
147 | .cs_ads7846 = -1, | ||
148 | .cs_max1111 = -1, | ||
149 | .clk_lcdcon = 2, | ||
150 | .clk_ads7846 = 36, | ||
151 | .clk_max1111 = 2, | ||
152 | }; | ||
153 | |||
154 | |||
155 | /* | ||
156 | * Poodle Touch Screen Device | ||
157 | */ | ||
158 | static struct resource poodlets_resources[] = { | ||
159 | [0] = { | ||
160 | .start = POODLE_IRQ_GPIO_TP_INT, | ||
161 | .end = POODLE_IRQ_GPIO_TP_INT, | ||
162 | .flags = IORESOURCE_IRQ, | ||
163 | }, | ||
164 | }; | ||
165 | |||
166 | static unsigned long poodle_get_hsync_len(void) | ||
167 | { | ||
168 | return 0; | ||
169 | } | ||
170 | |||
171 | static void poodle_null_hsync(void) | ||
172 | { | ||
173 | } | ||
174 | |||
175 | static struct corgits_machinfo poodle_ts_machinfo = { | ||
176 | .get_hsync_len = poodle_get_hsync_len, | ||
177 | .put_hsync = poodle_null_hsync, | ||
178 | .wait_hsync = poodle_null_hsync, | ||
179 | }; | ||
180 | |||
181 | static struct platform_device poodle_ts_device = { | ||
182 | .name = "corgi-ts", | ||
183 | .dev = { | ||
184 | .platform_data = &poodle_ts_machinfo, | ||
185 | }, | ||
186 | .id = -1, | ||
187 | .num_resources = ARRAY_SIZE(poodlets_resources), | ||
188 | .resource = poodlets_resources, | ||
189 | }; | ||
190 | |||
130 | 191 | ||
131 | /* | 192 | /* |
132 | * MMC/SD Device | 193 | * MMC/SD Device |
@@ -259,8 +320,10 @@ static struct pxafb_mach_info poodle_fb_info __initdata = { | |||
259 | }; | 320 | }; |
260 | 321 | ||
261 | static struct platform_device *devices[] __initdata = { | 322 | static struct platform_device *devices[] __initdata = { |
262 | &locomo_device, | 323 | &poodle_locomo_device, |
263 | &poodle_scoop_device, | 324 | &poodle_scoop_device, |
325 | &poodle_ssp_device, | ||
326 | &poodle_ts_device, | ||
264 | }; | 327 | }; |
265 | 328 | ||
266 | static void poodle_poweroff(void) | 329 | static void poodle_poweroff(void) |
@@ -319,6 +382,7 @@ static void __init poodle_init(void) | |||
319 | GPSR1 = 0x00000000; | 382 | GPSR1 = 0x00000000; |
320 | GPSR2 = 0x00000000; | 383 | GPSR2 = 0x00000000; |
321 | 384 | ||
385 | set_pxa_fb_parent(&poodle_locomo_device.dev); | ||
322 | set_pxa_fb_info(&poodle_fb_info); | 386 | set_pxa_fb_info(&poodle_fb_info); |
323 | pxa_gpio_mode(POODLE_GPIO_USB_PULLUP | GPIO_OUT); | 387 | pxa_gpio_mode(POODLE_GPIO_USB_PULLUP | GPIO_OUT); |
324 | pxa_gpio_mode(POODLE_GPIO_IR_ON | GPIO_OUT); | 388 | pxa_gpio_mode(POODLE_GPIO_IR_ON | GPIO_OUT); |
@@ -332,6 +396,7 @@ static void __init poodle_init(void) | |||
332 | if (ret) { | 396 | if (ret) { |
333 | printk(KERN_WARNING "poodle: Unable to register LoCoMo device\n"); | 397 | printk(KERN_WARNING "poodle: Unable to register LoCoMo device\n"); |
334 | } | 398 | } |
399 | corgi_ssp_set_machinfo(&poodle_ssp_machinfo); | ||
335 | } | 400 | } |
336 | 401 | ||
337 | static void __init fixup_poodle(struct machine_desc *desc, | 402 | static void __init fixup_poodle(struct machine_desc *desc, |