]> err.no Git - linux-2.6/commitdiff
[ARM] 3069/1: Add spitz irda platform support
authorRichard Purdie <rpurdie@rpsys.net>
Sun, 30 Oct 2005 14:50:25 +0000 (14:50 +0000)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Sun, 30 Oct 2005 14:50:25 +0000 (14:50 +0000)
Patch from Richard Purdie

Add spitz irda platform support

Signed-off-by: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
arch/arm/mach-pxa/spitz.c

index d0ab428c2d7d3dadc6a94f4785d31b571e0e07e2..b838842b6a2050438cc351698cbf63a54ae68778 100644 (file)
@@ -34,6 +34,7 @@
 
 #include <asm/arch/pxa-regs.h>
 #include <asm/arch/irq.h>
+#include <asm/arch/irda.h>
 #include <asm/arch/mmc.h>
 #include <asm/arch/udc.h>
 #include <asm/arch/pxafb.h>
@@ -276,6 +277,23 @@ static struct pxamci_platform_data spitz_mci_platform_data = {
 };
 
 
+/*
+ * Irda
+ */
+static void spitz_irda_transceiver_mode(struct device *dev, int mode)
+{
+       if (mode & IR_OFF)
+               set_scoop_gpio(&spitzscoop2_device.dev, SPITZ_SCP2_IR_ON);
+       else
+               reset_scoop_gpio(&spitzscoop2_device.dev, SPITZ_SCP2_IR_ON);
+}
+
+static struct pxaficp_platform_data spitz_ficp_platform_data = {
+       .transceiver_cap  = IR_SIRMODE | IR_OFF,
+       .transceiver_mode = spitz_irda_transceiver_mode,
+};
+
+
 /*
  * Spitz PXA Framebuffer
  */
@@ -326,6 +344,7 @@ static void __init common_init(void)
 
        platform_add_devices(devices, ARRAY_SIZE(devices));
        pxa_set_mci_info(&spitz_mci_platform_data);
+       pxa_set_ficp_info(&spitz_ficp_platform_data);
        set_pxa_fb_parent(&spitzssp_device.dev);
        set_pxa_fb_info(&spitz_pxafb_info);
 }