]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/arm/mach-omap1/board-sx1.c
Merge current mainline tree into linux-omap tree
[linux-2.6-omap-h63xx.git] / arch / arm / mach-omap1 / board-sx1.c
index 130bcc6fd082b4a7fa5745e3bb0d3c27b059f68b..d3156b8451daabc5c63a28298a31cb93b437b12a 100644 (file)
@@ -33,6 +33,7 @@
 #include <asm/mach/map.h>
 
 #include <mach/gpio.h>
+#include <mach/gpio-switch.h>
 #include <mach/mux.h>
 #include <mach/irda.h>
 #include <mach/usb.h>
@@ -419,6 +420,18 @@ static struct omap_board_config_kernel sx1_config[] __initdata = {
        { OMAP_TAG_UART,        &sx1_uart_config },
 };
 
+static struct omap_gpio_switch sx1_gpio_switches[] __initdata = {
+       {
+               .name                   = "mmc_slot",
+               .gpio                   = OMAP_MPUIO(3),
+               .type                   = OMAP_GPIO_SWITCH_TYPE_COVER,
+               .debounce_rising        = 100,
+               .debounce_falling       = 0,
+               .notify                 = sx1_mmc_slot_cover_handler,
+               .notify_data            = NULL,
+       },
+};
+
 /*-----------------------------------------*/
 
 static void __init omap_sx1_init(void)
@@ -430,6 +443,8 @@ static void __init omap_sx1_init(void)
        omap_serial_init();
        omap_register_i2c_bus(1, 100, NULL, 0);
        sx1_mmc_init();
+       omap_register_gpio_switches(sx1_gpio_switches,
+                                   ARRAY_SIZE(sx1_gpio_switches));
 
        /* turn on USB power */
        /* sx1_setusbpower(1); cant do it here because i2c is not ready */