diff options
Diffstat (limited to 'arch/arm/mach-pxa/spitz.c')
-rw-r--r-- | arch/arm/mach-pxa/spitz.c | 46 |
1 files changed, 4 insertions, 42 deletions
diff --git a/arch/arm/mach-pxa/spitz.c b/arch/arm/mach-pxa/spitz.c index c4b8305b66a4..f9dc59c054b3 100644 --- a/arch/arm/mach-pxa/spitz.c +++ b/arch/arm/mach-pxa/spitz.c | |||
@@ -560,50 +560,10 @@ static struct pxaohci_platform_data spitz_ohci_platform_data = { | |||
560 | /* | 560 | /* |
561 | * Irda | 561 | * Irda |
562 | */ | 562 | */ |
563 | static int spitz_irda_startup(struct device *dev) | ||
564 | { | ||
565 | int rc; | ||
566 | |||
567 | rc = gpio_request(SPITZ_GPIO_IR_ON, "IrDA on"); | ||
568 | if (rc) | ||
569 | goto err; | ||
570 | |||
571 | rc = gpio_direction_output(SPITZ_GPIO_IR_ON, 1); | ||
572 | if (rc) | ||
573 | goto err_dir; | ||
574 | |||
575 | return 0; | ||
576 | |||
577 | err_dir: | ||
578 | gpio_free(SPITZ_GPIO_IR_ON); | ||
579 | err: | ||
580 | return rc; | ||
581 | } | ||
582 | |||
583 | static void spitz_irda_shutdown(struct device *dev) | ||
584 | { | ||
585 | gpio_free(SPITZ_GPIO_IR_ON); | ||
586 | } | ||
587 | |||
588 | static void spitz_irda_transceiver_mode(struct device *dev, int mode) | ||
589 | { | ||
590 | gpio_set_value(SPITZ_GPIO_IR_ON, mode & IR_OFF); | ||
591 | pxa2xx_transceiver_mode(dev, mode); | ||
592 | } | ||
593 | |||
594 | #ifdef CONFIG_MACH_AKITA | ||
595 | static void akita_irda_transceiver_mode(struct device *dev, int mode) | ||
596 | { | ||
597 | gpio_set_value(AKITA_GPIO_IR_ON, mode & IR_OFF); | ||
598 | pxa2xx_transceiver_mode(dev, mode); | ||
599 | } | ||
600 | #endif | ||
601 | 563 | ||
602 | static struct pxaficp_platform_data spitz_ficp_platform_data = { | 564 | static struct pxaficp_platform_data spitz_ficp_platform_data = { |
565 | /* .gpio_pwdown is set in spitz_init() and akita_init() accordingly */ | ||
603 | .transceiver_cap = IR_SIRMODE | IR_OFF, | 566 | .transceiver_cap = IR_SIRMODE | IR_OFF, |
604 | .transceiver_mode = spitz_irda_transceiver_mode, | ||
605 | .startup = spitz_irda_startup, | ||
606 | .shutdown = spitz_irda_shutdown, | ||
607 | }; | 567 | }; |
608 | 568 | ||
609 | 569 | ||
@@ -782,6 +742,8 @@ static void __init common_init(void) | |||
782 | #if defined(CONFIG_MACH_SPITZ) || defined(CONFIG_MACH_BORZOI) | 742 | #if defined(CONFIG_MACH_SPITZ) || defined(CONFIG_MACH_BORZOI) |
783 | static void __init spitz_init(void) | 743 | static void __init spitz_init(void) |
784 | { | 744 | { |
745 | spitz_ficp_platform_data.gpio_pwdown = SPITZ_GPIO_IR_ON; | ||
746 | |||
785 | platform_scoop_config = &spitz_pcmcia_config; | 747 | platform_scoop_config = &spitz_pcmcia_config; |
786 | 748 | ||
787 | common_init(); | 749 | common_init(); |
@@ -824,7 +786,7 @@ static struct nand_ecclayout akita_oobinfo = { | |||
824 | 786 | ||
825 | static void __init akita_init(void) | 787 | static void __init akita_init(void) |
826 | { | 788 | { |
827 | spitz_ficp_platform_data.transceiver_mode = akita_irda_transceiver_mode; | 789 | spitz_ficp_platform_data.gpio_pwdown = AKITA_GPIO_IR_ON; |
828 | 790 | ||
829 | sharpsl_nand_platform_data.badblock_pattern = &sharpsl_akita_bbt; | 791 | sharpsl_nand_platform_data.badblock_pattern = &sharpsl_akita_bbt; |
830 | sharpsl_nand_platform_data.ecc_layout = &akita_oobinfo; | 792 | sharpsl_nand_platform_data.ecc_layout = &akita_oobinfo; |