diff options
author | Tony Lindgren <tony@atomide.com> | 2009-04-23 14:10:40 -0400 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2009-04-23 14:10:40 -0400 |
commit | ba16ec7cabb3f1aa7bbcb7b9982c4402a2e8ec02 (patch) | |
tree | b7b083aaa98df9b746b1a9731d73a5dfaee47ade /arch/arm/mach-omap1 | |
parent | da1b94e6a68e1bdeb9cdda016cceb17228b37d25 (diff) |
ARM: OMAP: Remove old dead gpio expander code
This should be done with GPIO calls. Patches against the
mainline tree welcome to add the necessary working functionality
back.
Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm/mach-omap1')
-rw-r--r-- | arch/arm/mach-omap1/board-h3.c | 101 |
1 files changed, 0 insertions, 101 deletions
diff --git a/arch/arm/mach-omap1/board-h3.c b/arch/arm/mach-omap1/board-h3.c index 4695965114c4..f597968733b4 100644 --- a/arch/arm/mach-omap1/board-h3.c +++ b/arch/arm/mach-omap1/board-h3.c | |||
@@ -39,12 +39,10 @@ | |||
39 | #include <asm/mach/flash.h> | 39 | #include <asm/mach/flash.h> |
40 | #include <asm/mach/map.h> | 40 | #include <asm/mach/map.h> |
41 | 41 | ||
42 | #include <mach/gpioexpander.h> | ||
43 | #include <mach/irqs.h> | 42 | #include <mach/irqs.h> |
44 | #include <mach/mux.h> | 43 | #include <mach/mux.h> |
45 | #include <mach/tc.h> | 44 | #include <mach/tc.h> |
46 | #include <mach/nand.h> | 45 | #include <mach/nand.h> |
47 | #include <mach/irda.h> | ||
48 | #include <mach/usb.h> | 46 | #include <mach/usb.h> |
49 | #include <mach/keypad.h> | 47 | #include <mach/keypad.h> |
50 | #include <mach/dma.h> | 48 | #include <mach/dma.h> |
@@ -276,104 +274,6 @@ static struct platform_device h3_kp_device = { | |||
276 | .resource = h3_kp_resources, | 274 | .resource = h3_kp_resources, |
277 | }; | 275 | }; |
278 | 276 | ||
279 | |||
280 | /* Select between the IrDA and aGPS module | ||
281 | */ | ||
282 | static int h3_select_irda(struct device *dev, int state) | ||
283 | { | ||
284 | unsigned char expa; | ||
285 | int err = 0; | ||
286 | |||
287 | if ((err = read_gpio_expa(&expa, 0x26))) { | ||
288 | printk(KERN_ERR "Error reading from I/O EXPANDER \n"); | ||
289 | return err; | ||
290 | } | ||
291 | |||
292 | /* 'P6' enable/disable IRDA_TX and IRDA_RX */ | ||
293 | if (state & IR_SEL) { /* IrDA */ | ||
294 | if ((err = write_gpio_expa(expa | 0x40, 0x26))) { | ||
295 | printk(KERN_ERR "Error writing to I/O EXPANDER \n"); | ||
296 | return err; | ||
297 | } | ||
298 | } else { | ||
299 | if ((err = write_gpio_expa(expa & ~0x40, 0x26))) { | ||
300 | printk(KERN_ERR "Error writing to I/O EXPANDER \n"); | ||
301 | return err; | ||
302 | } | ||
303 | } | ||
304 | return err; | ||
305 | } | ||
306 | |||
307 | static void set_trans_mode(struct work_struct *work) | ||
308 | { | ||
309 | struct omap_irda_config *irda_config = | ||
310 | container_of(work, struct omap_irda_config, gpio_expa.work); | ||
311 | int mode = irda_config->mode; | ||
312 | unsigned char expa; | ||
313 | int err = 0; | ||
314 | |||
315 | if ((err = read_gpio_expa(&expa, 0x27)) != 0) { | ||
316 | printk(KERN_ERR "Error reading from I/O expander\n"); | ||
317 | } | ||
318 | |||
319 | expa &= ~0x03; | ||
320 | |||
321 | if (mode & IR_SIRMODE) { | ||
322 | expa |= 0x01; | ||
323 | } else { /* MIR/FIR */ | ||
324 | expa |= 0x03; | ||
325 | } | ||
326 | |||
327 | if ((err = write_gpio_expa(expa, 0x27)) != 0) { | ||
328 | printk(KERN_ERR "Error writing to I/O expander\n"); | ||
329 | } | ||
330 | } | ||
331 | |||
332 | static int h3_transceiver_mode(struct device *dev, int mode) | ||
333 | { | ||
334 | struct omap_irda_config *irda_config = dev->platform_data; | ||
335 | |||
336 | irda_config->mode = mode; | ||
337 | cancel_delayed_work(&irda_config->gpio_expa); | ||
338 | PREPARE_DELAYED_WORK(&irda_config->gpio_expa, set_trans_mode); | ||
339 | schedule_delayed_work(&irda_config->gpio_expa, 0); | ||
340 | |||
341 | return 0; | ||
342 | } | ||
343 | |||
344 | static struct omap_irda_config h3_irda_data = { | ||
345 | .transceiver_cap = IR_SIRMODE | IR_MIRMODE | IR_FIRMODE, | ||
346 | .transceiver_mode = h3_transceiver_mode, | ||
347 | .select_irda = h3_select_irda, | ||
348 | .rx_channel = OMAP_DMA_UART3_RX, | ||
349 | .tx_channel = OMAP_DMA_UART3_TX, | ||
350 | .dest_start = UART3_THR, | ||
351 | .src_start = UART3_RHR, | ||
352 | .tx_trigger = 0, | ||
353 | .rx_trigger = 0, | ||
354 | }; | ||
355 | |||
356 | static struct resource h3_irda_resources[] = { | ||
357 | [0] = { | ||
358 | .start = INT_UART3, | ||
359 | .end = INT_UART3, | ||
360 | .flags = IORESOURCE_IRQ, | ||
361 | }, | ||
362 | }; | ||
363 | |||
364 | static u64 irda_dmamask = 0xffffffff; | ||
365 | |||
366 | static struct platform_device h3_irda_device = { | ||
367 | .name = "omapirda", | ||
368 | .id = 0, | ||
369 | .dev = { | ||
370 | .platform_data = &h3_irda_data, | ||
371 | .dma_mask = &irda_dmamask, | ||
372 | }, | ||
373 | .num_resources = ARRAY_SIZE(h3_irda_resources), | ||
374 | .resource = h3_irda_resources, | ||
375 | }; | ||
376 | |||
377 | static struct platform_device h3_lcd_device = { | 277 | static struct platform_device h3_lcd_device = { |
378 | .name = "lcd_h3", | 278 | .name = "lcd_h3", |
379 | .id = -1, | 279 | .id = -1, |
@@ -395,7 +295,6 @@ static struct platform_device *devices[] __initdata = { | |||
395 | &nand_device, | 295 | &nand_device, |
396 | &smc91x_device, | 296 | &smc91x_device, |
397 | &intlat_device, | 297 | &intlat_device, |
398 | &h3_irda_device, | ||
399 | &h3_kp_device, | 298 | &h3_kp_device, |
400 | &h3_lcd_device, | 299 | &h3_lcd_device, |
401 | }; | 300 | }; |