Merge branch 'fixes-gpio-to-irq' into fixes
Tony Lindgren [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

@@@ -428,8 -433,14 +424,12 @@@ static void __init h2_init(void
        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);
@@@ -420,10 -418,16 +415,14 @@@ 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);
@@@ -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();
Simple merge
Simple merge
@@@ -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);
@@@ -249,8 -251,12 +248,9 @@@ 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();
@@@ -296,8 -298,12 +295,9 @@@ 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);
@@@ -311,8 -313,12 +310,9 @@@ 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);
Simple merge
Simple merge
@@@ -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));
  
Simple merge
@@@ -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)
@@@ -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);
  }
  #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 */
@@@ -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);