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
@@@ -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);
index 64b8584f64cea13ba471b66890726d5199fd545f,09e85824be0301436cd684d4417bbaad8a3d0fe8..4c19f4c06851ff2c15c41a93807f33d73364fbe3
@@@ -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);
index 827d83a96af83a8510a9e680fbb3ad802b22e2ad,797bbd6815641e076169f58948143ec04289d7a5..60c06ee23855d018198698dbd74110611447d8e6
@@@ -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
index 1fe347396f4d05a4b694f0e9476445c81a908417,a0c1a1c15e756752f06b5eeb173ba315f237fafc..a5f85dda3f6924ce84dce90270a704edfafd6962
@@@ -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);
index 0863d8e2bdf147ed70467bb8a7fb5748e5b6c701,66e2a74d9861d45ce5485e4b7c4b897ecefc0ebb..a60e6c22f8169ed9027e26b2425b54875d23deba
@@@ -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();
index 4ff699c509c0ebbce98a5c600e067e3a50ecc54b,fa9ce9ce92d430a0a081b9f2295dc91a2d1a910c..8d854878547be0fcdcc77e9e539b3d819d33ae97
@@@ -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);
index abcbbd339aeb1df2baed04bbc34e8df47ed05cc8,b21df2f1cf8264724444b7b7bba467751351157f..a2c5abcd7c84e56d53c441059cf526294883c294
@@@ -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
index 11cd2a8060939e640c3be752c126fc987b08553b,87cdb862356adcc6215191c0a3cd281b01a43805..a2010f07de317b68f2715e05847147776b507276
@@@ -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
index f120997309af261a0bb9c68e1d8eb57ae6e09bbf,2b6db67291be52b3bc19bbd4929e085281d6c929..d87ee0612098fb82ba350d591adb9281e588097a
@@@ -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)
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 */
index bd5b10eeeb407d595bab57117a1e321ea2d26ee9,dbe1ae8801b493e4d8585e7bfe6ddbe3174811fc..f5fbdf94de3bee3e0f3f27337dcaffab521bf457
@@@ -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);