]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commitdiff
Merge branch 'fixes-gpio-to-irq' into fixes
authorTony Lindgren <tony@atomide.com>
Thu, 29 Mar 2012 17:16:04 +0000 (10:16 -0700)
committerTony Lindgren <tony@atomide.com>
Thu, 29 Mar 2012 17:16:04 +0000 (10:16 -0700)
Conflicts:
arch/arm/mach-omap1/board-htcherald.c
arch/arm/mach-omap2/board-rx51-peripherals.c
arch/arm/plat-omap/include/plat/gpio.h
drivers/input/serio/ams_delta_serio.c

19 files changed:
1  2 
arch/arm/mach-omap1/board-h2.c
arch/arm/mach-omap1/board-h3.c
arch/arm/mach-omap1/board-htcherald.c
arch/arm/mach-omap1/board-innovator.c
arch/arm/mach-omap1/board-nokia770.c
arch/arm/mach-omap1/board-osk.c
arch/arm/mach-omap1/board-palmte.c
arch/arm/mach-omap1/board-palmtt.c
arch/arm/mach-omap1/board-palmz71.c
arch/arm/mach-omap2/board-2430sdp.c
arch/arm/mach-omap2/board-4430sdp.c
arch/arm/mach-omap2/board-devkit8000.c
arch/arm/mach-omap2/board-omap3evm.c
arch/arm/mach-omap2/board-omap4panda.c
arch/arm/mach-omap2/board-rx51-peripherals.c
arch/arm/mach-omap2/board-zoom-peripherals.c
arch/arm/mach-omap2/common-board-devices.c
arch/arm/plat-omap/include/plat/gpio.h
drivers/input/serio/ams_delta_serio.c

index c3068622fdcbe8f06377a6f38984af5c39e77656,3768088fa5cc265c614ca6f538ba5b441b96a097..553a2e535764b54b83635ba7161e5f67fd1c0c1d
@@@ -30,7 -30,6 +30,7 @@@
  #include <linux/input.h>
  #include <linux/i2c/tps65010.h>
  #include <linux/smc91x.h>
 +#include <linux/omapfb.h>
  
  #include <asm/mach-types.h>
  #include <asm/mach/arch.h>
@@@ -245,8 -244,6 +245,6 @@@ static struct resource h2_smc91x_resour
                .flags  = IORESOURCE_MEM,
        },
        [1] = {
-               .start  = OMAP_GPIO_IRQ(0),
-               .end    = OMAP_GPIO_IRQ(0),
                .flags  = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWEDGE,
        },
  };
@@@ -326,12 -323,18 +324,12 @@@ static struct platform_device h2_irda_d
        .resource       = h2_irda_resources,
  };
  
 -static struct platform_device h2_lcd_device = {
 -      .name           = "lcd_h2",
 -      .id             = -1,
 -};
 -
  static struct platform_device *h2_devices[] __initdata = {
        &h2_nor_device,
        &h2_nand_device,
        &h2_smc91x_device,
        &h2_irda_device,
        &h2_kp_device,
 -      &h2_lcd_device,
  };
  
  static void __init h2_init_smc91x(void)
@@@ -359,11 -362,9 +357,9 @@@ static struct tps65010_board tps_board 
  static struct i2c_board_info __initdata h2_i2c_board_info[] = {
        {
                I2C_BOARD_INFO("tps65010", 0x48),
-               .irq            = OMAP_GPIO_IRQ(58),
                .platform_data  = &tps_board,
        }, {
                I2C_BOARD_INFO("isp1301_omap", 0x2d),
-               .irq            = OMAP_GPIO_IRQ(2),
        },
  };
  
@@@ -386,6 -387,10 +382,6 @@@ static struct omap_lcd_config h2_lcd_co
        .ctrl_name      = "internal",
  };
  
 -static struct omap_board_config_kernel h2_config[] __initdata = {
 -      { OMAP_TAG_LCD,         &h2_lcd_config },
 -};
 -
  static void __init h2_init(void)
  {
        h2_init_smc91x();
        omap_cfg_reg(E19_1610_KBR4);
        omap_cfg_reg(N19_1610_KBR5);
  
+       h2_smc91x_resources[1].start = gpio_to_irq(0);
+       h2_smc91x_resources[1].end = gpio_to_irq(0);
        platform_add_devices(h2_devices, ARRAY_SIZE(h2_devices));
 -      omap_board_config = h2_config;
 -      omap_board_config_size = ARRAY_SIZE(h2_config);
        omap_serial_init();
+       h2_i2c_board_info[0].irq = gpio_to_irq(58);
+       h2_i2c_board_info[1].irq = gpio_to_irq(2);
        omap_register_i2c_bus(1, 100, h2_i2c_board_info,
                              ARRAY_SIZE(h2_i2c_board_info));
        omap1_usb_init(&h2_usb_config);
        h2_mmc_init();
 +
 +      omapfb_set_lcd_config(&h2_lcd_config);
  }
  
  MACHINE_START(OMAP_H2, "TI-H2")
index 64b8584f64cea13ba471b66890726d5199fd545f,09e85824be0301436cd684d4417bbaad8a3d0fe8..4c19f4c06851ff2c15c41a93807f33d73364fbe3
@@@ -30,7 -30,6 +30,7 @@@
  #include <linux/spi/spi.h>
  #include <linux/i2c/tps65010.h>
  #include <linux/smc91x.h>
 +#include <linux/omapfb.h>
  
  #include <asm/setup.h>
  #include <asm/page.h>
@@@ -247,8 -246,6 +247,6 @@@ static struct resource smc91x_resources
                .flags  = IORESOURCE_MEM,
        },
        [1] = {
-               .start  = OMAP_GPIO_IRQ(40),
-               .end    = OMAP_GPIO_IRQ(40),
                .flags  = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWEDGE,
        },
  };
@@@ -338,7 -335,6 +336,6 @@@ static struct spi_board_info h3_spi_boa
                .modalias       = "tsc2101",
                .bus_num        = 2,
                .chip_select    = 0,
-               .irq            = OMAP_GPIO_IRQ(H3_TS_GPIO),
                .max_speed_hz   = 16000000,
                /* .platform_data       = &tsc_platform_data, */
        },
@@@ -371,14 -367,16 +368,12 @@@ static struct omap_lcd_config h3_lcd_co
        .ctrl_name      = "internal",
  };
  
 -static struct omap_board_config_kernel h3_config[] __initdata = {
 -      { OMAP_TAG_LCD,         &h3_lcd_config },
 -};
 -
  static struct i2c_board_info __initdata h3_i2c_board_info[] = {
         {
                I2C_BOARD_INFO("tps65013", 0x48),
-                /* .irq         = OMAP_GPIO_IRQ(??), */
         },
        {
                I2C_BOARD_INFO("isp1301_omap", 0x2d),
-               .irq            = OMAP_GPIO_IRQ(14),
        },
  };
  
@@@ -420,16 -418,20 +415,20 @@@ static void __init h3_init(void
        omap_cfg_reg(E19_1610_KBR4);
        omap_cfg_reg(N19_1610_KBR5);
  
+       smc91x_resources[1].start = gpio_to_irq(40);
+       smc91x_resources[1].end = gpio_to_irq(40);
        platform_add_devices(devices, ARRAY_SIZE(devices));
+       h3_spi_board_info[0].irq = gpio_to_irq(H3_TS_GPIO);
        spi_register_board_info(h3_spi_board_info,
                                ARRAY_SIZE(h3_spi_board_info));
 -      omap_board_config = h3_config;
 -      omap_board_config_size = ARRAY_SIZE(h3_config);
        omap_serial_init();
+       h3_i2c_board_info[1].irq = gpio_to_irq(14);
        omap_register_i2c_bus(1, 100, h3_i2c_board_info,
                              ARRAY_SIZE(h3_i2c_board_info));
        omap1_usb_init(&h3_usb_config);
        h3_mmc_init();
 +
 +      omapfb_set_lcd_config(&h3_lcd_config);
  }
  
  MACHINE_START(OMAP_H3, "TI OMAP1710 H3 board")
index 827d83a96af83a8510a9e680fbb3ad802b22e2ad,797bbd6815641e076169f58948143ec04289d7a5..60c06ee23855d018198698dbd74110611447d8e6
@@@ -36,7 -36,6 +36,7 @@@
  #include <linux/leds.h>
  #include <linux/spi/spi.h>
  #include <linux/spi/ads7846.h>
 +#include <linux/omapfb.h>
  
  #include <asm/mach-types.h>
  #include <asm/mach/arch.h>
@@@ -324,8 -323,6 +324,6 @@@ static struct platform_device gpio_leds
  
  static struct resource htcpld_resources[] = {
        [0] = {
-               .start  = OMAP_GPIO_IRQ(HTCHERALD_GIRQ_BTNS),
-               .end    = OMAP_GPIO_IRQ(HTCHERALD_GIRQ_BTNS),
                .flags  = IORESOURCE_IRQ,
        },
  };
@@@ -398,6 -395,10 +396,6 @@@ static struct omap_lcd_config htcherald
        .ctrl_name      = "internal",
  };
  
 -static struct omap_board_config_kernel htcherald_config[] __initdata = {
 -      { OMAP_TAG_LCD, &htcherald_lcd_config },
 -};
 -
  static struct platform_device lcd_device = {
        .name           = "lcd_htcherald",
        .id             = -1,
@@@ -450,7 -451,6 +448,6 @@@ static struct spi_board_info __initdat
        {
                .modalias               = "ads7846",
                .platform_data          = &htcherald_ts_platform_data,
-               .irq                    = OMAP_GPIO_IRQ(HTCHERALD_GPIO_TS),
                .max_speed_hz           = 2500000,
                .bus_num                = 2,
                .chip_select            = 1,
@@@ -576,6 -576,10 +573,8 @@@ static void __init htcherald_init(void
        printk(KERN_INFO "HTC Herald init.\n");
  
        /* Do board initialization before we register all the devices */
 -      omap_board_config = htcherald_config;
 -      omap_board_config_size = ARRAY_SIZE(htcherald_config);
+       htcpld_resources[0].start = gpio_to_irq(HTCHERALD_GIRQ_BTNS);
+       htcpld_resources[0].end = gpio_to_irq(HTCHERALD_GIRQ_BTNS);
        platform_add_devices(devices, ARRAY_SIZE(devices));
  
        htcherald_disable_watchdog();
        htcherald_usb_enable();
        omap1_usb_init(&htcherald_usb_config);
  
+       htcherald_spi_board_info[0].irq = gpio_to_irq(HTCHERALD_GPIO_TS);
        spi_register_board_info(htcherald_spi_board_info,
                ARRAY_SIZE(htcherald_spi_board_info));
  
        htc_mmc_data[0] = &htc_mmc1_data;
        omap1_init_mmc(htc_mmc_data, 1);
  #endif
 +
 +      omapfb_set_lcd_config(&htcherald_lcd_config);
  }
  
  MACHINE_START(HERALD, "HTC Herald")
index 61219182d16a5def3427d5b65c7812a36f8ba044,315c0214eed3e4b8794f66cbc10a4803510bc8f9..67d7fd57a692b7d7c209b01859ad0a97cc8c86f0
@@@ -25,7 -25,6 +25,7 @@@
  #include <linux/mtd/physmap.h>
  #include <linux/input.h>
  #include <linux/smc91x.h>
 +#include <linux/omapfb.h>
  
  #include <asm/mach-types.h>
  #include <asm/mach/arch.h>
@@@ -248,8 -247,6 +248,6 @@@ static struct resource innovator1610_sm
                .flags  = IORESOURCE_MEM,
        },
        [1] = {
-               .start  = OMAP_GPIO_IRQ(0),
-               .end    = OMAP_GPIO_IRQ(0),
                .flags  = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWEDGE,
        },
  };
@@@ -374,6 -371,10 +372,6 @@@ static inline void innovator_mmc_init(v
  }
  #endif
  
 -static struct omap_board_config_kernel innovator_config[] = {
 -      { OMAP_TAG_LCD,         NULL },
 -};
 -
  static void __init innovator_init(void)
  {
        if (cpu_is_omap1510())
  #endif
  #ifdef CONFIG_ARCH_OMAP16XX
        if (!cpu_is_omap1510()) {
+               innovator1610_smc91x_resources[1].start = gpio_to_irq(0);
+               innovator1610_smc91x_resources[1].end = gpio_to_irq(0);
                platform_add_devices(innovator1610_devices, ARRAY_SIZE(innovator1610_devices));
        }
  #endif
  #ifdef CONFIG_ARCH_OMAP15XX
        if (cpu_is_omap1510()) {
                omap1_usb_init(&innovator1510_usb_config);
 -              innovator_config[1].data = &innovator1510_lcd_config;
 +              omapfb_set_lcd_config(&innovator1510_lcd_config);
        }
  #endif
  #ifdef CONFIG_ARCH_OMAP16XX
        if (cpu_is_omap1610()) {
                omap1_usb_init(&h2_usb_config);
 -              innovator_config[1].data = &innovator1610_lcd_config;
 +              omapfb_set_lcd_config(&innovator1610_lcd_config);
        }
  #endif
 -      omap_board_config = innovator_config;
 -      omap_board_config_size = ARRAY_SIZE(innovator_config);
        omap_serial_init();
        omap_register_i2c_bus(1, 100, NULL, 0);
        innovator_mmc_init();
index fe95ec5f6f03f3597511be1a54c8cf8b90d464c8,1d8733266a8356cea5057d6f56d774372b079225..d21dcc2fbc5af3a3b53477e8e735aa5bcb428447
@@@ -29,6 -29,7 +29,6 @@@
  #include <plat/usb.h>
  #include <plat/board.h>
  #include <plat/keypad.h>
 -#include <plat/hwa742.h>
  #include <plat/lcd_mipid.h>
  #include <plat/mmc.h>
  #include <plat/clock.h>
@@@ -100,16 -101,15 +100,16 @@@ static struct mipid_platform_data nokia
        .shutdown = mipid_shutdown,
  };
  
 +static struct omap_lcd_config nokia770_lcd_config __initdata = {
 +      .ctrl_name      = "hwa742",
 +};
 +
  static void __init mipid_dev_init(void)
  {
 -      const struct omap_lcd_config *conf;
 +      nokia770_mipid_platform_data.nreset_gpio = 13;
 +      nokia770_mipid_platform_data.data_lines = 16;
  
 -      conf = omap_get_config(OMAP_TAG_LCD, struct omap_lcd_config);
 -      if (conf != NULL) {
 -              nokia770_mipid_platform_data.nreset_gpio = conf->nreset_gpio;
 -              nokia770_mipid_platform_data.data_lines = conf->data_lines;
 -      }
 +      omapfb_set_lcd_config(&nokia770_lcd_config);
  }
  
  static void __init ads7846_dev_init(void)
@@@ -147,14 -147,18 +147,13 @@@ static struct spi_board_info nokia770_s
                .bus_num        = 2,
                .chip_select    = 0,
                .max_speed_hz   = 2500000,
-               .irq            = OMAP_GPIO_IRQ(15),
                .platform_data  = &nokia770_ads7846_platform_data,
        },
  };
  
 -static struct hwa742_platform_data nokia770_hwa742_platform_data = {
 -      .te_connected           = 1,
 -};
 -
  static void __init hwa742_dev_init(void)
  {
        clk_add_alias("hwa_sys_ck", NULL, "bclk", NULL);
 -      omapfb_set_ctrl_platform_data(&nokia770_hwa742_platform_data);
  }
  
  /* assume no Mini-AB port */
@@@ -237,6 -241,7 +236,7 @@@ static void __init omap_nokia770_init(v
        omap_writew((omap_readw(0xfffb5004) & ~2), 0xfffb5004);
  
        platform_add_devices(nokia770_devices, ARRAY_SIZE(nokia770_devices));
+       nokia770_spi_board_info[1].irq = gpio_to_irq(15);
        spi_register_board_info(nokia770_spi_board_info,
                                ARRAY_SIZE(nokia770_spi_board_info));
        omap_serial_init();
index 1fe347396f4d05a4b694f0e9476445c81a908417,a0c1a1c15e756752f06b5eeb173ba315f237fafc..a5f85dda3f6924ce84dce90270a704edfafd6962
@@@ -34,7 -34,6 +34,7 @@@
  #include <linux/i2c.h>
  #include <linux/leds.h>
  #include <linux/smc91x.h>
 +#include <linux/omapfb.h>
  #include <linux/mtd/mtd.h>
  #include <linux/mtd/partitions.h>
  #include <linux/mtd/physmap.h>
@@@ -129,8 -128,6 +129,6 @@@ static struct resource osk5912_smc91x_r
                .flags  = IORESOURCE_MEM,
        },
        [1] = {
-               .start  = OMAP_GPIO_IRQ(0),
-               .end    = OMAP_GPIO_IRQ(0),
                .flags  = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE,
        },
  };
@@@ -147,8 -144,6 +145,6 @@@ static struct platform_device osk5912_s
  
  static struct resource osk5912_cf_resources[] = {
        [0] = {
-               .start  = OMAP_GPIO_IRQ(62),
-               .end    = OMAP_GPIO_IRQ(62),
                .flags  = IORESOURCE_IRQ,
        },
  };
@@@ -240,7 -235,6 +236,6 @@@ static struct tps65010_board tps_board 
  static struct i2c_board_info __initdata osk_i2c_board_info[] = {
        {
                I2C_BOARD_INFO("tps65010", 0x48),
-               .irq            = OMAP_GPIO_IRQ(OMAP_MPUIO(1)),
                .platform_data  = &tps_board,
  
        },
@@@ -300,6 -294,12 +295,6 @@@ static struct omap_lcd_config osk_lcd_c
  };
  #endif
  
 -static struct omap_board_config_kernel osk_config[] __initdata = {
 -#ifdef        CONFIG_OMAP_OSK_MISTRAL
 -      { OMAP_TAG_LCD,                 &osk_lcd_config },
 -#endif
 -};
 -
  #ifdef        CONFIG_OMAP_OSK_MISTRAL
  
  #include <linux/input.h>
@@@ -408,7 -408,6 +403,6 @@@ static struct spi_board_info __initdat
        /* MicroWire (bus 2) CS0 has an ads7846e */
        .modalias               = "ads7846",
        .platform_data          = &mistral_ts_info,
-       .irq                    = OMAP_GPIO_IRQ(4),
        .max_speed_hz           = 120000 /* max sample rate at 3V */
                                        * 26 /* command + data + overhead */,
        .bus_num                = 2,
@@@ -471,6 -470,7 +465,7 @@@ static void __init osk_mistral_init(voi
        gpio_direction_input(4);
        irq_set_irq_type(gpio_to_irq(4), IRQ_TYPE_EDGE_FALLING);
  
+       mistral_boardinfo[0].irq = gpio_to_irq(4);
        spi_register_board_info(mistral_boardinfo,
                        ARRAY_SIZE(mistral_boardinfo));
  
@@@ -542,7 -542,13 +537,11 @@@ static void __init osk_init(void
  
        osk_flash_resource.end = osk_flash_resource.start = omap_cs3_phys();
        osk_flash_resource.end += SZ_32M - 1;
+       osk5912_smc91x_resources[1].start = gpio_to_irq(0);
+       osk5912_smc91x_resources[1].end = gpio_to_irq(0);
+       osk5912_cf_resources[0].start = gpio_to_irq(62);
+       osk5912_cf_resources[0].end = gpio_to_irq(62);
        platform_add_devices(osk5912_devices, ARRAY_SIZE(osk5912_devices));
 -      omap_board_config = osk_config;
 -      omap_board_config_size = ARRAY_SIZE(osk_config);
  
        l = omap_readl(USB_TRANSCEIVER_CTRL);
        l |= (3 << 1);
                gpio_direction_input(OMAP_MPUIO(1));
  
        omap_serial_init();
+       osk_i2c_board_info[0].irq = gpio_to_irq(OMAP_MPUIO(1));
        omap_register_i2c_bus(1, 400, osk_i2c_board_info,
                              ARRAY_SIZE(osk_i2c_board_info));
        osk_mistral_init();
 +
 +#ifdef        CONFIG_OMAP_OSK_MISTRAL
 +      omapfb_set_lcd_config(&osk_lcd_config);
 +#endif
 +
  }
  
  MACHINE_START(OMAP_OSK, "TI-OSK")
index 0863d8e2bdf147ed70467bb8a7fb5748e5b6c701,66e2a74d9861d45ce5485e4b7c4b897ecefc0ebb..a60e6c22f8169ed9027e26b2425b54875d23deba
@@@ -27,7 -27,6 +27,7 @@@
  #include <linux/spi/spi.h>
  #include <linux/interrupt.h>
  #include <linux/apm-emulation.h>
 +#include <linux/omapfb.h>
  
  #include <asm/mach-types.h>
  #include <asm/mach/arch.h>
@@@ -212,12 -211,15 +212,11 @@@ static struct omap_lcd_config palmte_lc
        .ctrl_name      = "internal",
  };
  
 -static struct omap_board_config_kernel palmte_config[] __initdata = {
 -      { OMAP_TAG_LCD,         &palmte_lcd_config },
 -};
 -
  static struct spi_board_info palmte_spi_info[] __initdata = {
        {
                .modalias       = "tsc2102",
                .bus_num        = 2,    /* uWire (officially) */
                .chip_select    = 0,    /* As opposed to 3 */
-               .irq            = OMAP_GPIO_IRQ(PALMTE_PINTDAV_GPIO),
                .max_speed_hz   = 8000000,
        },
  };
@@@ -249,15 -251,17 +248,16 @@@ static void __init omap_palmte_init(voi
        omap_cfg_reg(UART3_TX);
        omap_cfg_reg(UART3_RX);
  
 -      omap_board_config = palmte_config;
 -      omap_board_config_size = ARRAY_SIZE(palmte_config);
 -
        platform_add_devices(palmte_devices, ARRAY_SIZE(palmte_devices));
  
+       palmte_spi_info[0].irq = gpio_to_irq(PALMTE_PINTDAV_GPIO);
        spi_register_board_info(palmte_spi_info, ARRAY_SIZE(palmte_spi_info));
        palmte_misc_gpio_setup();
        omap_serial_init();
        omap1_usb_init(&palmte_usb_config);
        omap_register_i2c_bus(1, 100, NULL, 0);
 +
 +      omapfb_set_lcd_config(&palmte_lcd_config);
  }
  
  MACHINE_START(OMAP_PALMTE, "OMAP310 based Palm Tungsten E")
index 4ff699c509c0ebbce98a5c600e067e3a50ecc54b,fa9ce9ce92d430a0a081b9f2295dc91a2d1a910c..8d854878547be0fcdcc77e9e539b3d819d33ae97
@@@ -24,7 -24,6 +24,7 @@@
  #include <linux/mtd/partitions.h>
  #include <linux/mtd/physmap.h>
  #include <linux/leds.h>
 +#include <linux/omapfb.h>
  #include <linux/spi/spi.h>
  #include <linux/spi/ads7846.h>
  
@@@ -257,7 -256,6 +257,6 @@@ static struct spi_board_info __initdat
                /* MicroWire (bus 2) CS0 has an ads7846e */
                .modalias       = "ads7846",
                .platform_data  = &palmtt_ts_info,
-               .irq            = OMAP_GPIO_IRQ(6),
                .max_speed_hz   = 120000        /* max sample rate at 3V */
                                        * 26    /* command + data + overhead */,
                .bus_num        = 2,
@@@ -275,6 -273,10 +274,6 @@@ static struct omap_lcd_config palmtt_lc
        .ctrl_name      = "internal",
  };
  
 -static struct omap_board_config_kernel palmtt_config[] __initdata = {
 -      { OMAP_TAG_LCD,         &palmtt_lcd_config      },
 -};
 -
  static void __init omap_mpu_wdt_mode(int mode) {
        if (mode)
                omap_writew(0x8000, OMAP_WDT_TIMER_MODE);
@@@ -296,14 -298,16 +295,15 @@@ static void __init omap_palmtt_init(voi
  
        omap_mpu_wdt_mode(0);
  
 -      omap_board_config = palmtt_config;
 -      omap_board_config_size = ARRAY_SIZE(palmtt_config);
 -
        platform_add_devices(palmtt_devices, ARRAY_SIZE(palmtt_devices));
  
+       palmtt_boardinfo[0].irq = gpio_to_irq(6);
        spi_register_board_info(palmtt_boardinfo,ARRAY_SIZE(palmtt_boardinfo));
        omap_serial_init();
        omap1_usb_init(&palmtt_usb_config);
        omap_register_i2c_bus(1, 100, NULL, 0);
 +
 +      omapfb_set_lcd_config(&palmtt_lcd_config);
  }
  
  MACHINE_START(OMAP_PALMTT, "OMAP1510 based Palm Tungsten|T")
index abcbbd339aeb1df2baed04bbc34e8df47ed05cc8,b21df2f1cf8264724444b7b7bba467751351157f..a2c5abcd7c84e56d53c441059cf526294883c294
@@@ -27,7 -27,6 +27,7 @@@
  #include <linux/mtd/mtd.h>
  #include <linux/mtd/partitions.h>
  #include <linux/mtd/physmap.h>
 +#include <linux/omapfb.h>
  #include <linux/spi/spi.h>
  #include <linux/spi/ads7846.h>
  
@@@ -224,7 -223,6 +224,6 @@@ static struct spi_board_info __initdat
        /* MicroWire (bus 2) CS0 has an ads7846e */
        .modalias       = "ads7846",
        .platform_data  = &palmz71_ts_info,
-       .irq            = OMAP_GPIO_IRQ(PALMZ71_PENIRQ_GPIO),
        .max_speed_hz   = 120000        /* max sample rate at 3V */
                                * 26    /* command + data + overhead */,
        .bus_num        = 2,
@@@ -241,6 -239,10 +240,6 @@@ static struct omap_lcd_config palmz71_l
        .ctrl_name = "internal",
  };
  
 -static struct omap_board_config_kernel palmz71_config[] __initdata = {
 -      {OMAP_TAG_LCD,  &palmz71_lcd_config},
 -};
 -
  static irqreturn_t
  palmz71_powercable(int irq, void *dev_id)
  {
@@@ -311,16 -313,18 +310,17 @@@ omap_palmz71_init(void
        palmz71_gpio_setup(1);
        omap_mpu_wdt_mode(0);
  
 -      omap_board_config = palmz71_config;
 -      omap_board_config_size = ARRAY_SIZE(palmz71_config);
 -
        platform_add_devices(devices, ARRAY_SIZE(devices));
  
+       palmz71_boardinfo[0].irq = gpio_to_irq(PALMZ71_PENIRQ_GPIO);
        spi_register_board_info(palmz71_boardinfo,
                                ARRAY_SIZE(palmz71_boardinfo));
        omap1_usb_init(&palmz71_usb_config);
        omap_serial_init();
        omap_register_i2c_bus(1, 100, NULL, 0);
        palmz71_gpio_setup(0);
 +
 +      omapfb_set_lcd_config(&palmz71_lcd_config);
  }
  
  MACHINE_START(OMAP_PALMZ71, "OMAP310 based Palm Zire71")
index c8bda62900d8dd87d9d383edf305651ae21bd354,5a1b6af0046c012aaa0a88df223823c81521a2e4..e658f835d0de3da65c24a4ccba0ec8252fa65e18
@@@ -230,12 -230,12 +230,12 @@@ static struct i2c_board_info __initdat
        {
                I2C_BOARD_INFO("isp1301_omap", 0x2D),
                .flags = I2C_CLIENT_WAKE,
-               .irq = OMAP_GPIO_IRQ(78),
        },
  };
  
  static int __init omap2430_i2c_init(void)
  {
+       sdp2430_i2c1_boardinfo[0].irq = gpio_to_irq(78);
        omap_register_i2c_bus(1, 100, sdp2430_i2c1_boardinfo,
                        ARRAY_SIZE(sdp2430_i2c1_boardinfo));
        omap_pmic_init(2, 100, "twl4030", INT_24XX_SYS_NIRQ,
@@@ -279,7 -279,7 +279,7 @@@ static void __init omap_2430sdp_init(vo
        platform_add_devices(sdp2430_devices, ARRAY_SIZE(sdp2430_devices));
        omap_serial_init();
        omap_sdrc_init(NULL, NULL);
 -      omap2_hsmmc_init(mmc);
 +      omap_hsmmc_init(mmc);
        omap2_usbfs_init(&sdp2430_usb_config);
  
        omap_mux_init_signal("usb0hs_stp", OMAP_PULL_ENA | OMAP_PULL_UP);
index 37dcb1bc025ea05674d3972d831455a462e43c7f,a09c699ab85c4cf444df9cdea012049226320ecf..a39fc4bbd2b8ffb9cb8bb06c1c91f1c40e120333
@@@ -25,7 -25,6 +25,7 @@@
  #include <linux/regulator/fixed.h>
  #include <linux/leds.h>
  #include <linux/leds_pwm.h>
 +#include <linux/platform_data/omap4-keypad.h>
  
  #include <mach/hardware.h>
  #include <asm/hardware/gic.h>
@@@ -42,7 -41,6 +42,7 @@@
  #include <video/omap-panel-nokia-dsi.h>
  #include <video/omap-panel-picodlp.h>
  #include <linux/wl12xx.h>
 +#include <linux/platform_data/omap-abe-twl6040.h>
  
  #include "mux.h"
  #include "hsmmc.h"
@@@ -324,10 -322,7 +324,10 @@@ static struct spi_board_info sdp4430_sp
                .bus_num                = 1,
                .chip_select            = 0,
                .max_speed_hz           = 24000000,
 -              .irq                    = ETH_KS8851_IRQ,
 +              /*
 +               * .irq is set to gpio_to_irq(ETH_KS8851_IRQ)
 +               * in omap_4430sdp_init
 +               */
        },
  };
  
@@@ -383,40 -378,12 +383,40 @@@ static struct platform_device sdp4430_d
        .id     = -1,
  };
  
 +static struct omap_abe_twl6040_data sdp4430_abe_audio_data = {
 +      .card_name = "SDP4430",
 +      .has_hs         = ABE_TWL6040_LEFT | ABE_TWL6040_RIGHT,
 +      .has_hf         = ABE_TWL6040_LEFT | ABE_TWL6040_RIGHT,
 +      .has_ep         = 1,
 +      .has_aux        = ABE_TWL6040_LEFT | ABE_TWL6040_RIGHT,
 +      .has_vibra      = ABE_TWL6040_LEFT | ABE_TWL6040_RIGHT,
 +
 +      .has_dmic       = 1,
 +      .has_hsmic      = 1,
 +      .has_mainmic    = 1,
 +      .has_submic     = 1,
 +      .has_afm        = ABE_TWL6040_LEFT | ABE_TWL6040_RIGHT,
 +
 +      .jack_detection = 1,
 +      /* MCLK input is 38.4MHz */
 +      .mclk_freq      = 38400000,
 +};
 +
 +static struct platform_device sdp4430_abe_audio = {
 +      .name           = "omap-abe-twl6040",
 +      .id             = -1,
 +      .dev = {
 +              .platform_data = &sdp4430_abe_audio_data,
 +      },
 +};
 +
  static struct platform_device *sdp4430_devices[] __initdata = {
        &sdp4430_gpio_keys_device,
        &sdp4430_leds_gpio,
        &sdp4430_leds_pwm,
        &sdp4430_vbat,
        &sdp4430_dmic_codec,
 +      &sdp4430_abe_audio,
  };
  
  static struct omap_musb_board_data musb_board_data = {
@@@ -490,22 -457,21 +490,22 @@@ static struct platform_device omap_vwla
  
  static int omap4_twl6030_hsmmc_late_init(struct device *dev)
  {
 -      int ret = 0;
 +      int irq = 0;
        struct platform_device *pdev = container_of(dev,
                                struct platform_device, dev);
        struct omap_mmc_platform_data *pdata = dev->platform_data;
  
        /* Setting MMC1 Card detect Irq */
        if (pdev->id == 0) {
 -              ret = twl6030_mmc_card_detect_config();
 -              if (ret)
 +              irq = twl6030_mmc_card_detect_config();
 +              if (irq < 0) {
                        pr_err("Failed configuring MMC1 card detect\n");
 -              pdata->slots[0].card_detect_irq = TWL6030_IRQ_BASE +
 -                                              MMCDETECT_INTR_OFFSET;
 +                      return irq;
 +              }
 +              pdata->slots[0].card_detect_irq = irq;
                pdata->slots[0].card_detect = twl6030_mmc_card_detect;
        }
 -      return ret;
 +      return 0;
  }
  
  static __init void omap4_twl6030_hsmmc_set_late_init(struct device *dev)
@@@ -525,9 -491,9 +525,9 @@@ static int __init omap4_twl6030_hsmmc_i
  {
        struct omap2_hsmmc_info *c;
  
 -      omap2_hsmmc_init(controllers);
 +      omap_hsmmc_init(controllers);
        for (c = controllers; c->mmc; c++)
 -              omap4_twl6030_hsmmc_set_late_init(c->dev);
 +              omap4_twl6030_hsmmc_set_late_init(&c->pdev->dev);
  
        return 0;
  }
@@@ -907,7 -873,6 +907,6 @@@ static void __init omap4_sdp4430_wifi_m
  }
  
  static struct wl12xx_platform_data omap4_sdp4430_wlan_data __initdata = {
-       .irq = OMAP_GPIO_IRQ(GPIO_WIFI_IRQ),
        .board_ref_clock = WL12XX_REFCLOCK_26,
        .board_tcxo_clock = WL12XX_TCXOCLOCK_26,
  };
@@@ -917,6 -882,7 +916,7 @@@ static void __init omap4_sdp4430_wifi_i
        int ret;
  
        omap4_sdp4430_wifi_mux_init();
+       omap4_sdp4430_wlan_data.irq = gpio_to_irq(GPIO_WIFI_IRQ);
        ret = wl12xx_set_platform_data(&omap4_sdp4430_wlan_data);
        if (ret)
                pr_err("Error setting wl12xx data: %d\n", ret);
index 11cd2a8060939e640c3be752c126fc987b08553b,87cdb862356adcc6215191c0a3cd281b01a43805..a2010f07de317b68f2715e05847147776b507276
@@@ -100,7 -100,6 +100,7 @@@ static struct omap2_hsmmc_info mmc[] = 
                .mmc            = 1,
                .caps           = MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA,
                .gpio_wp        = 29,
 +              .deferred       = true,
        },
        {}      /* Terminator */
  };
@@@ -229,7 -228,7 +229,7 @@@ static int devkit8000_twl_gpio_setup(st
  
        /* gpio + 0 is "mmc0_cd" (input/IRQ) */
        mmc[0].gpio_cd = gpio + 0;
 -      omap2_hsmmc_init(mmc);
 +      omap_hsmmc_late_init(mmc);
  
        /* TWL4030_GPIO_MAX + 1 == ledB, PMU_STAT (out, active low LED) */
        gpio_leds[2].gpio = gpio + TWL4030_GPIO_MAX + 1;
@@@ -411,7 -410,6 +411,6 @@@ static struct resource omap_dm9000_reso
                .flags          = IORESOURCE_MEM,
        },
        [2] = {
-               .start          = OMAP_GPIO_IRQ(OMAP_DM9000_GPIO_IRQ),
                .flags          = IORESOURCE_IRQ | IRQF_TRIGGER_LOW,
        },
  };
@@@ -637,8 -635,8 +636,9 @@@ static void __init devkit8000_init(void
  
        omap_dm9000_init();
  
 +      omap_hsmmc_init(mmc);
        devkit8000_i2c_init();
+       omap_dm9000_resources[2].start = gpio_to_irq(OMAP_DM9000_GPIO_IRQ);
        platform_add_devices(devkit8000_devices,
                        ARRAY_SIZE(devkit8000_devices));
  
index a659e198892beca6dd98ec167b4eee3e02ba77c0,20a47432bbd7862a469297ac2a02b8ad751733a0..4c90f078abe16fe7a7aba37c31800ae364ca611b
@@@ -317,7 -317,6 +317,7 @@@ static struct omap2_hsmmc_info mmc[] = 
                .caps           = MMC_CAP_4_BIT_DATA,
                .gpio_cd        = -EINVAL,
                .gpio_wp        = 63,
 +              .deferred       = true,
        },
  #ifdef CONFIG_WL12XX_PLATFORM_DATA
        {
@@@ -362,8 -361,9 +362,8 @@@ static int omap3evm_twl_gpio_setup(stru
        int r, lcd_bl_en;
  
        /* gpio + 0 is "mmc0_cd" (input/IRQ) */
 -      omap_mux_init_gpio(63, OMAP_PIN_INPUT);
        mmc[0].gpio_cd = gpio + 0;
 -      omap2_hsmmc_init(mmc);
 +      omap_hsmmc_late_init(mmc);
  
        /*
         * Most GPIOs are for USB OTG.  Some are mostly sent to
        gpio_request_one(gpio + 7, GPIOF_OUT_INIT_LOW, "EN_DVI");
  
        /* TWL4030_GPIO_MAX + 1 == ledB (out, active low LED) */
 -      gpio_leds[2].gpio = gpio + TWL4030_GPIO_MAX + 1;
 +      gpio_leds[0].gpio = gpio + TWL4030_GPIO_MAX + 1;
  
        platform_device_register(&leds_gpio);
  
@@@ -487,7 -487,6 +487,6 @@@ static struct platform_device omap3evm_
  };
  
  struct wl12xx_platform_data omap3evm_wlan_data __initdata = {
-       .irq = OMAP_GPIO_IRQ(OMAP3EVM_WLAN_IRQ_GPIO),
        .board_ref_clock = WL12XX_REFCLOCK_38, /* 38.4 MHz */
  };
  #endif
@@@ -623,6 -622,7 +622,7 @@@ static void __init omap3_evm_wl12xx_ini
        int ret;
  
        /* WL12xx WLAN Init */
+       omap3evm_wlan_data.irq = gpio_to_irq(OMAP3EVM_WLAN_IRQ_GPIO);
        ret = wl12xx_set_platform_data(&omap3evm_wlan_data);
        if (ret)
                pr_err("error setting wl12xx data: %d\n", ret);
@@@ -644,9 -644,6 +644,9 @@@ static void __init omap3_evm_init(void
        omap_board_config = omap3_evm_config;
        omap_board_config_size = ARRAY_SIZE(omap3_evm_config);
  
 +      omap_mux_init_gpio(63, OMAP_PIN_INPUT);
 +      omap_hsmmc_init(mmc);
 +
        omap3_evm_i2c_init();
  
        omap_display_init(&omap3_evm_dss_data);
index 8bf8e99c358e494b235d3460954dad789e1b2754,449600712e19727943e691f4446b2e4915288db4..d8c0e89f0126a2b4a7ba2a87d49641d1cf05c57c
@@@ -28,7 -28,6 +28,7 @@@
  #include <linux/regulator/machine.h>
  #include <linux/regulator/fixed.h>
  #include <linux/wl12xx.h>
 +#include <linux/platform_data/omap-abe-twl6040.h>
  
  #include <mach/hardware.h>
  #include <asm/hardware/gic.h>
@@@ -92,40 -91,9 +92,40 @@@ static struct platform_device leds_gpi
        },
  };
  
 +static struct omap_abe_twl6040_data panda_abe_audio_data = {
 +      /* Audio out */
 +      .has_hs         = ABE_TWL6040_LEFT | ABE_TWL6040_RIGHT,
 +      /* HandsFree through expasion connector */
 +      .has_hf         = ABE_TWL6040_LEFT | ABE_TWL6040_RIGHT,
 +      /* PandaBoard: FM TX, PandaBoardES: can be connected to audio out */
 +      .has_aux        = ABE_TWL6040_LEFT | ABE_TWL6040_RIGHT,
 +      /* PandaBoard: FM RX, PandaBoardES: audio in */
 +      .has_afm        = ABE_TWL6040_LEFT | ABE_TWL6040_RIGHT,
 +      /* No jack detection. */
 +      .jack_detection = 0,
 +      /* MCLK input is 38.4MHz */
 +      .mclk_freq      = 38400000,
 +
 +};
 +
 +static struct platform_device panda_abe_audio = {
 +      .name           = "omap-abe-twl6040",
 +      .id             = -1,
 +      .dev = {
 +              .platform_data = &panda_abe_audio_data,
 +      },
 +};
 +
 +static struct platform_device btwilink_device = {
 +      .name   = "btwilink",
 +      .id     = -1,
 +};
 +
  static struct platform_device *panda_devices[] __initdata = {
        &leds_gpio,
        &wl1271_device,
 +      &panda_abe_audio,
 +      &btwilink_device,
  };
  
  static const struct usbhs_omap_board_data usbhs_bdata __initconst = {
@@@ -231,14 -199,13 +231,13 @@@ static struct platform_device omap_vwla
  };
  
  struct wl12xx_platform_data omap_panda_wlan_data  __initdata = {
-       .irq = OMAP_GPIO_IRQ(GPIO_WIFI_IRQ),
        /* PANDA ref clock is 38.4 MHz */
        .board_ref_clock = 2,
  };
  
  static int omap4_twl6030_hsmmc_late_init(struct device *dev)
  {
 -      int ret = 0;
 +      int irq = 0;
        struct platform_device *pdev = container_of(dev,
                                struct platform_device, dev);
        struct omap_mmc_platform_data *pdata = dev->platform_data;
        }
        /* Setting MMC1 Card detect Irq */
        if (pdev->id == 0) {
 -              ret = twl6030_mmc_card_detect_config();
 -               if (ret)
 +              irq = twl6030_mmc_card_detect_config();
 +              if (irq < 0) {
                        dev_err(dev, "%s: Error card detect config(%d)\n",
 -                              __func__, ret);
 -               else
 -                      pdata->slots[0].card_detect = twl6030_mmc_card_detect;
 +                              __func__, irq);
 +                      return irq;
 +              }
 +              pdata->slots[0].card_detect = twl6030_mmc_card_detect;
        }
 -      return ret;
 +      return 0;
  }
  
  static __init void omap4_twl6030_hsmmc_set_late_init(struct device *dev)
@@@ -278,32 -244,15 +277,32 @@@ static int __init omap4_twl6030_hsmmc_i
  {
        struct omap2_hsmmc_info *c;
  
 -      omap2_hsmmc_init(controllers);
 +      omap_hsmmc_init(controllers);
        for (c = controllers; c->mmc; c++)
 -              omap4_twl6030_hsmmc_set_late_init(c->dev);
 +              omap4_twl6030_hsmmc_set_late_init(&c->pdev->dev);
  
        return 0;
  }
  
 +static struct twl4030_codec_data twl6040_codec = {
 +      /* single-step ramp for headset and handsfree */
 +      .hs_left_step   = 0x0f,
 +      .hs_right_step  = 0x0f,
 +      .hf_left_step   = 0x1d,
 +      .hf_right_step  = 0x1d,
 +};
 +
 +static struct twl4030_audio_data twl6040_audio = {
 +      .codec          = &twl6040_codec,
 +      .audpwron_gpio  = 127,
 +      .naudint_irq    = OMAP44XX_IRQ_SYS_2N,
 +      .irq_base       = TWL6040_CODEC_IRQ_BASE,
 +};
 +
  /* Panda board uses the common PMIC configuration */
 -static struct twl4030_platform_data omap4_panda_twldata;
 +static struct twl4030_platform_data omap4_panda_twldata = {
 +      .audio          = &twl6040_audio,
 +};
  
  /*
   * Display monitor features are burnt in their EEPROM as EDID data. The EEPROM
@@@ -511,7 -460,7 +510,7 @@@ static struct omap_dss_board_info omap4
        .default_device = &omap4_panda_dvi_device,
  };
  
 -void omap4_panda_display_init(void)
 +void __init omap4_panda_display_init(void)
  {
        int r;
  
        omap_mux_init_gpio(HDMI_GPIO_HPD, OMAP_PIN_INPUT_PULLDOWN);
  }
  
 +static void omap4_panda_init_rev(void)
 +{
 +      if (cpu_is_omap443x()) {
 +              /* PandaBoard 4430 */
 +              /* ASoC audio configuration */
 +              panda_abe_audio_data.card_name = "PandaBoard";
 +              panda_abe_audio_data.has_hsmic = 1;
 +      } else {
 +              /* PandaBoard ES */
 +              /* ASoC audio configuration */
 +              panda_abe_audio_data.card_name = "PandaBoardES";
 +      }
 +}
 +
  static void __init omap4_panda_init(void)
  {
        int package = OMAP_PACKAGE_CBS;
                package = OMAP_PACKAGE_CBL;
        omap4_mux_init(board_mux, NULL, package);
  
+       omap_panda_wlan_data.irq = gpio_to_irq(GPIO_WIFI_IRQ);
        ret = wl12xx_set_platform_data(&omap_panda_wlan_data);
        if (ret)
                pr_err("error setting wl12xx data: %d\n", ret);
  
 +      omap4_panda_init_rev();
        omap4_panda_i2c_init();
        platform_add_devices(panda_devices, ARRAY_SIZE(panda_devices));
        platform_device_register(&omap_vwlan_device);
index f120997309af261a0bb9c68e1d8eb57ae6e09bbf,2b6db67291be52b3bc19bbd4929e085281d6c929..d87ee0612098fb82ba350d591adb9281e588097a
@@@ -25,7 -25,6 +25,7 @@@
  #include <linux/gpio_keys.h>
  #include <linux/mmc/host.h>
  #include <linux/power/isp1704_charger.h>
 +#include <asm/system_info.h>
  
  #include <plat/mcspi.h>
  #include <plat/board.h>
@@@ -170,7 -169,6 +170,6 @@@ static struct spi_board_info rx51_perip
                .modalias               = "tsc2005",
                .bus_num                = 1,
                .chip_select            = 0,
-               .irq                    = OMAP_GPIO_IRQ(RX51_TSC2005_IRQ_GPIO),
                .max_speed_hz           = 6000000,
                .controller_data        = &tsc2005_mcspi_config,
                .platform_data          = &tsc2005_pdata,
@@@ -1103,11 -1101,6 +1102,11 @@@ static struct tsc2005_platform_data tsc
        .esd_timeout_ms         = 8000,
  };
  
 +static struct gpio rx51_tsc2005_gpios[] __initdata = {
 +      { RX51_TSC2005_IRQ_GPIO,   GPIOF_IN,            "tsc2005 IRQ"   },
 +      { RX51_TSC2005_RESET_GPIO, GPIOF_OUT_INIT_HIGH, "tsc2005 reset" },
 +};
 +
  static void rx51_tsc2005_set_reset(bool enable)
  {
        gpio_set_value(RX51_TSC2005_RESET_GPIO, enable);
@@@ -1117,18 -1110,22 +1116,20 @@@ static void __init rx51_init_tsc2005(vo
  {
        int r;
  
 -      r = gpio_request_one(RX51_TSC2005_IRQ_GPIO, GPIOF_IN, "tsc2005 IRQ");
 -      if (r < 0) {
 -              printk(KERN_ERR "unable to get %s GPIO\n", "tsc2005 IRQ");
 -              rx51_peripherals_spi_board_info[RX51_SPI_TSC2005].irq = 0;
 -      }
 +      omap_mux_init_gpio(RX51_TSC2005_RESET_GPIO, OMAP_PIN_OUTPUT);
 +      omap_mux_init_gpio(RX51_TSC2005_IRQ_GPIO, OMAP_PIN_INPUT_PULLUP);
  
 -      r = gpio_request_one(RX51_TSC2005_RESET_GPIO, GPIOF_OUT_INIT_HIGH,
 -              "tsc2005 reset");
 -      if (r >= 0) {
 -              tsc2005_pdata.set_reset = rx51_tsc2005_set_reset;
 -              rx51_peripherals_spi_board_info[RX51_SPI_TSC2005].irq =
 -                                      gpio_to_irq(RX51_TSC2005_IRQ_GPIO);
 -      } else {
 -              printk(KERN_ERR "unable to get %s GPIO\n", "tsc2005 reset");
 +      r = gpio_request_array(rx51_tsc2005_gpios,
 +                             ARRAY_SIZE(rx51_tsc2005_gpios));
 +      if (r < 0) {
 +              printk(KERN_ERR "tsc2005 board initialization failed\n");
                tsc2005_pdata.esd_timeout_ms = 0;
 +              return;
        }
 +
 +      tsc2005_pdata.set_reset = rx51_tsc2005_set_reset;
++      rx51_peripherals_spi_board_info[RX51_SPI_TSC2005].irq =
++                              gpio_to_irq(RX51_TSC2005_IRQ_GPIO);
  }
  
  void __init rx51_peripherals_init(void)
  
        partition = omap_mux_get("core");
        if (partition)
 -              omap2_hsmmc_init(mmc);
 +              omap_hsmmc_init(mmc);
  
        rx51_charger_init();
  }
index 3d39cdb2e25021704b511ca3c6b45dce606243b0,a489f82b1815f6c839afde3e45415ce3f5f71adf..b797cb279618c59428e0a443c5c962c1655fbc5c
@@@ -193,7 -193,6 +193,6 @@@ static struct platform_device omap_vwla
  };
  
  static struct wl12xx_platform_data omap_zoom_wlan_data __initdata = {
-       .irq = OMAP_GPIO_IRQ(OMAP_ZOOM_WLAN_IRQ_GPIO),
        /* ZOOM ref clock is 26 MHz */
        .board_ref_clock = 1,
  };
@@@ -205,7 -204,6 +204,7 @@@ static struct omap2_hsmmc_info mmc[] = 
                .caps           = MMC_CAP_4_BIT_DATA,
                .gpio_wp        = -EINVAL,
                .power_saving   = true,
 +              .deferred       = true,
        },
        {
                .name           = "internal",
@@@ -234,7 -232,7 +233,7 @@@ static int zoom_twl_gpio_setup(struct d
  
        /* gpio + 0 is "mmc0_cd" (input/IRQ) */
        mmc[0].gpio_cd = gpio + 0;
 -      omap2_hsmmc_init(mmc);
 +      omap_hsmmc_late_init(mmc);
  
        ret = gpio_request_one(LCD_PANEL_ENABLE_GPIO, GPIOF_OUT_INIT_LOW,
                               "lcd enable");
@@@ -297,12 -295,14 +296,15 @@@ static void enable_board_wakeup_source(
  
  void __init zoom_peripherals_init(void)
  {
-       int ret = wl12xx_set_platform_data(&omap_zoom_wlan_data);
+       int ret;
+       omap_zoom_wlan_data.irq = gpio_to_irq(OMAP_ZOOM_WLAN_IRQ_GPIO);
+       ret = wl12xx_set_platform_data(&omap_zoom_wlan_data);
  
        if (ret)
                pr_err("error setting wl12xx data: %d\n", ret);
  
 +      omap_hsmmc_init(mmc);
        omap_i2c_init();
        platform_device_register(&omap_vwlan_device);
        usb_musb_init(NULL);
index 9498b0f5fbd081403d88569bfc314a331f9f3cd9,9238ce0ed62223ed910866b565534f08ab8f6d5d..1706ebcec08d79c08ea23191b949266613c9406e
@@@ -75,15 -75,13 +75,15 @@@ void __init omap_ads7846_init(int bus_n
                        gpio_set_debounce(gpio_pendown, gpio_debounce);
        }
  
 -      ads7846_config.gpio_pendown = gpio_pendown;
 -
        spi_bi->bus_num = bus_num;
-       spi_bi->irq     = OMAP_GPIO_IRQ(gpio_pendown);
+       spi_bi->irq     = gpio_to_irq(gpio_pendown);
  
 -      if (board_pdata)
 +      if (board_pdata) {
 +              board_pdata->gpio_pendown = gpio_pendown;
                spi_bi->platform_data = board_pdata;
 +      } else {
 +              ads7846_config.gpio_pendown = gpio_pendown;
 +      }
  
        spi_register_board_info(&ads7846_spi_board_info, 1);
  }
index b8a96c6a1a30773d6231f3fe100539168a7bc2ca,d4df4142bc594d13b5c04e9497c4d332f90b02df..2f6e9924a814796db36d92d383e42de7aa4b5be3
  #define OMAP_MPUIO(nr)                (OMAP_MAX_GPIO_LINES + (nr))
  #define OMAP_GPIO_IS_MPUIO(nr)        ((nr) >= OMAP_MAX_GPIO_LINES)
  
- #define OMAP_GPIO_IRQ(nr)     (OMAP_GPIO_IS_MPUIO(nr) ? \
-                                IH_MPUIO_BASE + ((nr) & 0x0f) : \
-                                IH_GPIO_BASE + (nr))
 -#define METHOD_MPUIO          0
 -#define METHOD_GPIO_1510      1
 -#define METHOD_GPIO_1610      2
 -#define METHOD_GPIO_7XX               3
 -#define METHOD_GPIO_24XX      5
 -#define METHOD_GPIO_44XX      6
--
  struct omap_gpio_dev_attr {
        int bank_width;         /* GPIO bank width */
        bool dbck_flag;         /* dbck required or not - True for OMAP3&4 */
@@@ -177,21 -180,10 +173,21 @@@ struct omap_gpio_reg_offs 
        u16 irqstatus;
        u16 irqstatus2;
        u16 irqenable;
 +      u16 irqenable2;
        u16 set_irqenable;
        u16 clr_irqenable;
        u16 debounce;
        u16 debounce_en;
 +      u16 ctrl;
 +      u16 wkup_en;
 +      u16 leveldetect0;
 +      u16 leveldetect1;
 +      u16 risingdetect;
 +      u16 fallingdetect;
 +      u16 irqctrl;
 +      u16 edgectrl1;
 +      u16 edgectrl2;
 +      u16 pinctrl;
  
        bool irqenable_inv;
  };
@@@ -202,30 -194,45 +198,30 @@@ struct omap_gpio_platform_data 
        int bank_width;         /* GPIO bank width */
        int bank_stride;        /* Only needed for omap1 MPUIO */
        bool dbck_flag;         /* dbck required or not - True for OMAP3&4 */
 +      bool loses_context;     /* whether the bank would ever lose context */
 +      bool is_mpuio;          /* whether the bank is of type MPUIO */
 +      u32 non_wakeup_gpios;
  
        struct omap_gpio_reg_offs *regs;
 -};
  
 -/* TODO: Analyze removing gpio_bank_count usage from driver code */
 -extern int gpio_bank_count;
 +      /* Return context loss count due to PM states changing */
 +      int (*get_context_loss_count)(struct device *dev);
 +};
  
  extern void omap2_gpio_prepare_for_idle(int off_mode);
  extern void omap2_gpio_resume_after_idle(void);
  extern void omap_set_gpio_debounce(int gpio, int enable);
  extern void omap_set_gpio_debounce_time(int gpio, int enable);
 -extern void omap_gpio_save_context(void);
 -extern void omap_gpio_restore_context(void);
  /*-------------------------------------------------------------------------*/
  
 -/* Wrappers for "new style" GPIO calls, using the new infrastructure
 +/*
 + * Wrappers for "new style" GPIO calls, using the new infrastructure
   * which lets us plug in FPGA, I2C, and other implementations.
 - * *
 + *
   * The original OMAP-specific calls should eventually be removed.
   */
  
  #include <linux/errno.h>
  #include <asm-generic/gpio.h>
  
 -static inline int irq_to_gpio(unsigned irq)
 -{
 -      int tmp;
 -
 -      /* omap1 SOC mpuio */
 -      if (cpu_class_is_omap1() && (irq < (IH_MPUIO_BASE + 16)))
 -              return (irq - IH_MPUIO_BASE) + OMAP_MAX_GPIO_LINES;
 -
 -      /* SOC gpio */
 -      tmp = irq - IH_GPIO_BASE;
 -      if (tmp < OMAP_MAX_GPIO_LINES)
 -              return tmp;
 -
 -      /* we don't supply reverse mappings for non-SOC gpios */
 -      return -EIO;
 -}
 -
  #endif
index bd5b10eeeb407d595bab57117a1e321ea2d26ee9,dbe1ae8801b493e4d8585e7bfe6ddbe3174811fc..f5fbdf94de3bee3e0f3f27337dcaffab521bf457
@@@ -92,7 -92,8 +92,7 @@@ static irqreturn_t ams_delta_serio_inte
  static int ams_delta_serio_open(struct serio *serio)
  {
        /* enable keyboard */
 -      ams_delta_latch2_write(AMD_DELTA_LATCH2_KEYBRD_PWR,
 -                      AMD_DELTA_LATCH2_KEYBRD_PWR);
 +      gpio_set_value(AMS_DELTA_GPIO_PIN_KEYBRD_PWR, 1);
  
        return 0;
  }
  static void ams_delta_serio_close(struct serio *serio)
  {
        /* disable keyboard */
 -      ams_delta_latch2_write(AMD_DELTA_LATCH2_KEYBRD_PWR, 0);
 +      gpio_set_value(AMS_DELTA_GPIO_PIN_KEYBRD_PWR, 0);
  }
  
 +static const struct gpio ams_delta_gpios[] __initconst_or_module = {
 +      {
 +              .gpio   = AMS_DELTA_GPIO_PIN_KEYBRD_DATA,
 +              .flags  = GPIOF_DIR_IN,
 +              .label  = "serio-data",
 +      },
 +      {
 +              .gpio   = AMS_DELTA_GPIO_PIN_KEYBRD_CLK,
 +              .flags  = GPIOF_DIR_IN,
 +              .label  = "serio-clock",
 +      },
 +      {
 +              .gpio   = AMS_DELTA_GPIO_PIN_KEYBRD_PWR,
 +              .flags  = GPIOF_OUT_INIT_LOW,
 +              .label  = "serio-power",
 +      },
 +      {
 +              .gpio   = AMS_DELTA_GPIO_PIN_KEYBRD_DATAOUT,
 +              .flags  = GPIOF_OUT_INIT_LOW,
 +              .label  = "serio-dataout",
 +      },
 +};
 +
  static int __init ams_delta_serio_init(void)
  {
        int err;
        strlcpy(ams_delta_serio->phys, "GPIO/serio0",
                        sizeof(ams_delta_serio->phys));
  
 -      err = gpio_request(AMS_DELTA_GPIO_PIN_KEYBRD_DATA, "serio-data");
 +      err = gpio_request_array(ams_delta_gpios,
 +                              ARRAY_SIZE(ams_delta_gpios));
        if (err) {
 -              pr_err("ams_delta_serio: Couldn't request gpio pin for data\n");
 +              pr_err("ams_delta_serio: Couldn't request gpio pins\n");
                goto serio;
        }
 -      gpio_direction_input(AMS_DELTA_GPIO_PIN_KEYBRD_DATA);
 -
 -      err = gpio_request(AMS_DELTA_GPIO_PIN_KEYBRD_CLK, "serio-clock");
 -      if (err) {
 -              pr_err("ams_delta_serio: couldn't request gpio pin for clock\n");
 -              goto gpio_data;
 -      }
 -      gpio_direction_input(AMS_DELTA_GPIO_PIN_KEYBRD_CLK);
  
        err = request_irq(gpio_to_irq(AMS_DELTA_GPIO_PIN_KEYBRD_CLK),
                        ams_delta_serio_interrupt, IRQ_TYPE_EDGE_RISING,
        if (err < 0) {
                pr_err("ams_delta_serio: couldn't request gpio interrupt %d\n",
                                gpio_to_irq(AMS_DELTA_GPIO_PIN_KEYBRD_CLK));
 -              goto gpio_clk;
 +              goto gpio;
        }
        /*
         * Since GPIO register handling for keyboard clock pin is performed
        dev_info(&ams_delta_serio->dev, "%s\n", ams_delta_serio->name);
  
        return 0;
 -gpio_clk:
 -      gpio_free(AMS_DELTA_GPIO_PIN_KEYBRD_CLK);
 -gpio_data:
 -      gpio_free(AMS_DELTA_GPIO_PIN_KEYBRD_DATA);
 +gpio:
 +      gpio_free_array(ams_delta_gpios,
 +                      ARRAY_SIZE(ams_delta_gpios));
  serio:
        kfree(ams_delta_serio);
        return err;
@@@ -184,8 -170,8 +184,8 @@@ module_init(ams_delta_serio_init)
  static void __exit ams_delta_serio_exit(void)
  {
        serio_unregister_port(ams_delta_serio);
-       free_irq(OMAP_GPIO_IRQ(AMS_DELTA_GPIO_PIN_KEYBRD_CLK), 0);
+       free_irq(gpio_to_irq(AMS_DELTA_GPIO_PIN_KEYBRD_CLK), 0);
 -      gpio_free(AMS_DELTA_GPIO_PIN_KEYBRD_CLK);
 -      gpio_free(AMS_DELTA_GPIO_PIN_KEYBRD_DATA);
 +      gpio_free_array(ams_delta_gpios,
 +                      ARRAY_SIZE(ams_delta_gpios));
  }
  module_exit(ams_delta_serio_exit);