* [PATCH v2 0/4] ARM: OMAP: boards: changes to support dynamic irq alloc
@ 2012-03-19 12:06 Tarun Kanti DebBarma
2012-03-19 12:06 ` [PATCH v2 1/4] ARM: OMAP1: boards: Fix OMAP_GPIO_IRQ usage with gpio_to_irq() Tarun Kanti DebBarma
` (5 more replies)
0 siblings, 6 replies; 17+ messages in thread
From: Tarun Kanti DebBarma @ 2012-03-19 12:06 UTC (permalink / raw)
To: linux-arm-kernel
These two patches incorporate changes to OMAP1 and OMAP2 platforms
board files whereby older references to OMAP_GPIO_IRQ macro are
now replaced with gpio_to_irq(), thereby getting rid of static
irq references.
Reference: git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc.git omap/dt
Commit: 9a0cee711448335ec43eae83272495e9334c0098
Test info:
OMAP1 Platforms:
Boot test on OMAP1710 H3.
OMAP2PLUS Platforms:
OMAP2430SDP, OMAP3430SDP, OMAP3630-ZOOM3, OMAP4430-SDP,
OMAP4430-PANDA, OMAP4430-BLAZE
I have also done gpio functional testing after merging Grant's:
git://git.secretlab.ca/git/linux-2.6.git gpio/next
on top of these patches.
Again, I would request someone help me testing on other platforms.
v2:
- Modified the patch subjects as per convention.
- Added a new patch to remove OMAP_GPIO_IRQ from ams_delta_serio driver.
- Added a new patch to remove OMAP_GPIO_IRQ macro definition.
Tarun Kanti DebBarma (4):
ARM: OMAP1: boards: Fix OMAP_GPIO_IRQ usage with gpio_to_irq()
ARM: OMAP2+: boards: Fix OMAP_GPIO_IRQ usage with gpio_to_irq()
drivers: input: Fix OMAP_GPIO_IRQ with gpio_to_irq() in
ams_delta_serio_exit()
ARM: OMAP: Remove OMAP_GPIO_IRQ macro definition
arch/arm/mach-omap1/board-h2.c | 8 ++++----
arch/arm/mach-omap1/board-h3.c | 9 ++++-----
arch/arm/mach-omap1/board-htcherald.c | 6 +++---
arch/arm/mach-omap1/board-innovator.c | 4 ++--
arch/arm/mach-omap1/board-nokia770.c | 2 +-
arch/arm/mach-omap1/board-osk.c | 12 ++++++------
arch/arm/mach-omap1/board-palmte.c | 2 +-
arch/arm/mach-omap1/board-palmtt.c | 2 +-
arch/arm/mach-omap1/board-palmz71.c | 2 +-
arch/arm/mach-omap1/board-voiceblue.c | 16 +++++++---------
arch/arm/mach-omap2/board-2430sdp.c | 2 +-
arch/arm/mach-omap2/board-4430sdp.c | 2 +-
arch/arm/mach-omap2/board-apollon.c | 6 ++++--
arch/arm/mach-omap2/board-devkit8000.c | 3 ++-
arch/arm/mach-omap2/board-h4.c | 2 +-
arch/arm/mach-omap2/board-omap3evm.c | 2 +-
arch/arm/mach-omap2/board-omap4panda.c | 2 +-
arch/arm/mach-omap2/board-rx51-peripherals.c | 3 ++-
arch/arm/mach-omap2/board-zoom-debugboard.c | 3 ++-
arch/arm/mach-omap2/board-zoom-peripherals.c | 6 ++++--
arch/arm/mach-omap2/common-board-devices.c | 2 +-
arch/arm/plat-omap/include/plat/gpio.h | 4 ----
drivers/input/serio/ams_delta_serio.c | 2 +-
23 files changed, 51 insertions(+), 51 deletions(-)
^ permalink raw reply [flat|nested] 17+ messages in thread* [PATCH v2 1/4] ARM: OMAP1: boards: Fix OMAP_GPIO_IRQ usage with gpio_to_irq() 2012-03-19 12:06 [PATCH v2 0/4] ARM: OMAP: boards: changes to support dynamic irq alloc Tarun Kanti DebBarma @ 2012-03-19 12:06 ` Tarun Kanti DebBarma 2012-03-29 4:58 ` Olof Johansson 2012-03-19 12:06 ` [PATCH v2 2/4] ARM: OMAP2+: " Tarun Kanti DebBarma ` (4 subsequent siblings) 5 siblings, 1 reply; 17+ messages in thread From: Tarun Kanti DebBarma @ 2012-03-19 12:06 UTC (permalink / raw) To: linux-arm-kernel With dynamic allocation of IRQ the usage of OMAP_GPIO_IRQ is no longer valid. We should be using gpio_to_irq() instead. Signed-off-by: Tarun Kanti DebBarma <tarun.kanti@ti.com> --- arch/arm/mach-omap1/board-h2.c | 8 ++++---- arch/arm/mach-omap1/board-h3.c | 9 ++++----- arch/arm/mach-omap1/board-htcherald.c | 6 +++--- arch/arm/mach-omap1/board-innovator.c | 4 ++-- arch/arm/mach-omap1/board-nokia770.c | 2 +- arch/arm/mach-omap1/board-osk.c | 12 ++++++------ arch/arm/mach-omap1/board-palmte.c | 2 +- arch/arm/mach-omap1/board-palmtt.c | 2 +- arch/arm/mach-omap1/board-palmz71.c | 2 +- arch/arm/mach-omap1/board-voiceblue.c | 16 +++++++--------- 10 files changed, 30 insertions(+), 33 deletions(-) diff --git a/arch/arm/mach-omap1/board-h2.c b/arch/arm/mach-omap1/board-h2.c index 00ad6b2..ad0eece 100644 --- a/arch/arm/mach-omap1/board-h2.c +++ b/arch/arm/mach-omap1/board-h2.c @@ -244,8 +244,6 @@ static struct resource h2_smc91x_resources[] = { .flags = IORESOURCE_MEM, }, [1] = { - .start = OMAP_GPIO_IRQ(0), - .end = OMAP_GPIO_IRQ(0), .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWEDGE, }, }; @@ -364,11 +362,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), }, }; @@ -437,10 +433,14 @@ static void __init h2_init(void) omap_cfg_reg(E19_1610_KBR4); omap_cfg_reg(N19_1610_KBR5); + h2_devices[2]->resource[1].start = gpio_to_irq(0); + h2_devices[2]->resource[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); diff --git a/arch/arm/mach-omap1/board-h3.c b/arch/arm/mach-omap1/board-h3.c index 4a7f251..740ca6c 100644 --- a/arch/arm/mach-omap1/board-h3.c +++ b/arch/arm/mach-omap1/board-h3.c @@ -246,8 +246,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, }, }; @@ -337,7 +335,6 @@ static struct spi_board_info h3_spi_board_info[] __initdata = { .modalias = "tsc2101", .bus_num = 2, .chip_select = 0, - .irq = OMAP_GPIO_IRQ(H3_TS_GPIO), .max_speed_hz = 16000000, /* .platform_data = &tsc_platform_data, */ }, @@ -377,11 +374,9 @@ static struct omap_board_config_kernel h3_config[] __initdata = { 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), }, }; @@ -423,12 +418,16 @@ static void __init h3_init(void) omap_cfg_reg(E19_1610_KBR4); omap_cfg_reg(N19_1610_KBR5); + devices[2]->resource[1].start = gpio_to_irq(40); + devices[2]->resource[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); diff --git a/arch/arm/mach-omap1/board-htcherald.c b/arch/arm/mach-omap1/board-htcherald.c index 731cc3d..766b1e3 100644 --- a/arch/arm/mach-omap1/board-htcherald.c +++ b/arch/arm/mach-omap1/board-htcherald.c @@ -324,8 +324,6 @@ static struct platform_device gpio_leds_device = { static struct resource htcpld_resources[] = { [0] = { - .start = OMAP_GPIO_IRQ(HTCHERALD_GIRQ_BTNS), - .end = OMAP_GPIO_IRQ(HTCHERALD_GIRQ_BTNS), .flags = IORESOURCE_IRQ, }, }; @@ -454,7 +452,6 @@ static struct spi_board_info __initdata htcherald_spi_board_info[] = { { .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, @@ -582,6 +579,8 @@ static void __init htcherald_init(void) /* Do board initialization before we register all the devices */ omap_board_config = htcherald_config; omap_board_config_size = ARRAY_SIZE(htcherald_config); + devices[2]->resource[0].start = gpio_to_irq(HTCHERALD_GIRQ_BTNS); + devices[2]->resource[0].end = gpio_to_irq(HTCHERALD_GIRQ_BTNS); platform_add_devices(devices, ARRAY_SIZE(devices)); htcherald_disable_watchdog(); @@ -589,6 +588,7 @@ static void __init htcherald_init(void) 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)); diff --git a/arch/arm/mach-omap1/board-innovator.c b/arch/arm/mach-omap1/board-innovator.c index be2002f..965f3d7 100644 --- a/arch/arm/mach-omap1/board-innovator.c +++ b/arch/arm/mach-omap1/board-innovator.c @@ -244,8 +244,6 @@ static struct resource innovator1610_smc91x_resources[] = { .flags = IORESOURCE_MEM, }, [1] = { - .start = OMAP_GPIO_IRQ(0), - .end = OMAP_GPIO_IRQ(0), .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWEDGE, }, }; @@ -409,6 +407,8 @@ static void __init innovator_init(void) #endif #ifdef CONFIG_ARCH_OMAP16XX if (!cpu_is_omap1510()) { + innovator1610_devices[1]->resource[1].start = gpio_to_irq(0); + innovator1610_devices[1]->resource[1].end = gpio_to_irq(0); platform_add_devices(innovator1610_devices, ARRAY_SIZE(innovator1610_devices)); } #endif diff --git a/arch/arm/mach-omap1/board-nokia770.c b/arch/arm/mach-omap1/board-nokia770.c index f9efc03..364e3d7 100644 --- a/arch/arm/mach-omap1/board-nokia770.c +++ b/arch/arm/mach-omap1/board-nokia770.c @@ -145,7 +145,6 @@ static struct spi_board_info nokia770_spi_board_info[] __initdata = { .bus_num = 2, .chip_select = 0, .max_speed_hz = 2500000, - .irq = OMAP_GPIO_IRQ(15), .platform_data = &nokia770_ads7846_platform_data, }, }; @@ -240,6 +239,7 @@ static void __init omap_nokia770_init(void) 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(); diff --git a/arch/arm/mach-omap1/board-osk.c b/arch/arm/mach-omap1/board-osk.c index 675de06..6791887 100644 --- a/arch/arm/mach-omap1/board-osk.c +++ b/arch/arm/mach-omap1/board-osk.c @@ -129,8 +129,6 @@ static struct resource osk5912_smc91x_resources[] = { .flags = IORESOURCE_MEM, }, [1] = { - .start = OMAP_GPIO_IRQ(0), - .end = OMAP_GPIO_IRQ(0), .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE, }, }; @@ -147,8 +145,6 @@ static struct platform_device osk5912_smc91x_device = { static struct resource osk5912_cf_resources[] = { [0] = { - .start = OMAP_GPIO_IRQ(62), - .end = OMAP_GPIO_IRQ(62), .flags = IORESOURCE_IRQ, }, }; @@ -240,7 +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, }, @@ -414,7 +409,6 @@ static struct spi_board_info __initdata mistral_boardinfo[] = { { /* 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, @@ -477,6 +471,7 @@ static void __init osk_mistral_init(void) 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)); @@ -548,6 +543,10 @@ 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_devices[1]->resource[1].start = gpio_to_irq(0); + osk5912_devices[1]->resource[1].end = gpio_to_irq(0); + osk5912_devices[2]->resource[0].start = gpio_to_irq(62); + osk5912_devices[2]->resource[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); @@ -564,6 +563,7 @@ static void __init osk_init(void) 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(); diff --git a/arch/arm/mach-omap1/board-palmte.c b/arch/arm/mach-omap1/board-palmte.c index 81fa27f..108c7d1 100644 --- a/arch/arm/mach-omap1/board-palmte.c +++ b/arch/arm/mach-omap1/board-palmte.c @@ -218,7 +218,6 @@ 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, }, }; @@ -255,6 +254,7 @@ static void __init omap_palmte_init(void) 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(); diff --git a/arch/arm/mach-omap1/board-palmtt.c b/arch/arm/mach-omap1/board-palmtt.c index 81cb821..b87a92f 100644 --- a/arch/arm/mach-omap1/board-palmtt.c +++ b/arch/arm/mach-omap1/board-palmtt.c @@ -255,7 +255,6 @@ static struct spi_board_info __initdata palmtt_boardinfo[] = { /* 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, @@ -303,6 +302,7 @@ static void __init omap_palmtt_init(void) 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); diff --git a/arch/arm/mach-omap1/board-palmz71.c b/arch/arm/mach-omap1/board-palmz71.c index e881945..0ff25fa 100644 --- a/arch/arm/mach-omap1/board-palmz71.c +++ b/arch/arm/mach-omap1/board-palmz71.c @@ -222,7 +222,6 @@ static struct spi_board_info __initdata palmz71_boardinfo[] = { { /* 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, @@ -318,6 +317,7 @@ omap_palmz71_init(void) 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); diff --git a/arch/arm/mach-omap1/board-voiceblue.c b/arch/arm/mach-omap1/board-voiceblue.c index f83a502..63732fe 100644 --- a/arch/arm/mach-omap1/board-voiceblue.c +++ b/arch/arm/mach-omap1/board-voiceblue.c @@ -42,7 +42,6 @@ static struct plat_serial8250_port voiceblue_ports[] = { { .mapbase = (unsigned long)(OMAP_CS1_PHYS + 0x40000), - .irq = OMAP_GPIO_IRQ(12), .flags = UPF_BOOT_AUTOCONF | UPF_IOREMAP, .iotype = UPIO_MEM, .regshift = 1, @@ -50,7 +49,6 @@ static struct plat_serial8250_port voiceblue_ports[] = { }, { .mapbase = (unsigned long)(OMAP_CS1_PHYS + 0x50000), - .irq = OMAP_GPIO_IRQ(13), .flags = UPF_BOOT_AUTOCONF | UPF_IOREMAP, .iotype = UPIO_MEM, .regshift = 1, @@ -58,7 +56,6 @@ static struct plat_serial8250_port voiceblue_ports[] = { }, { .mapbase = (unsigned long)(OMAP_CS1_PHYS + 0x60000), - .irq = OMAP_GPIO_IRQ(14), .flags = UPF_BOOT_AUTOCONF | UPF_IOREMAP, .iotype = UPIO_MEM, .regshift = 1, @@ -66,7 +63,6 @@ static struct plat_serial8250_port voiceblue_ports[] = { }, { .mapbase = (unsigned long)(OMAP_CS1_PHYS + 0x70000), - .irq = OMAP_GPIO_IRQ(15), .flags = UPF_BOOT_AUTOCONF | UPF_IOREMAP, .iotype = UPIO_MEM, .regshift = 1, @@ -78,9 +74,6 @@ static struct plat_serial8250_port voiceblue_ports[] = { static struct platform_device serial_device = { .name = "serial8250", .id = PLAT8250_DEV_PLATFORM1, - .dev = { - .platform_data = voiceblue_ports, - }, }; static int __init ext_uart_init(void) @@ -88,6 +81,11 @@ static int __init ext_uart_init(void) if (!machine_is_voiceblue()) return -ENODEV; + voiceblue_ports[0].irq = gpio_to_irq(12); + voiceblue_ports[1].irq = gpio_to_irq(13); + voiceblue_ports[2].irq = gpio_to_irq(14); + voiceblue_ports[3].irq = gpio_to_irq(15); + serial_device.dev.platform_data = voiceblue_ports; return platform_device_register(&serial_device); } arch_initcall(ext_uart_init); @@ -126,8 +124,6 @@ static struct resource voiceblue_smc91x_resources[] = { .flags = IORESOURCE_MEM, }, [1] = { - .start = OMAP_GPIO_IRQ(8), - .end = OMAP_GPIO_IRQ(8), .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE, }, }; @@ -273,6 +269,8 @@ static void __init voiceblue_init(void) irq_set_irq_type(gpio_to_irq(14), IRQ_TYPE_EDGE_RISING); irq_set_irq_type(gpio_to_irq(15), IRQ_TYPE_EDGE_RISING); + voiceblue_devices[1]->resource[1].start = gpio_to_irq(8); + voiceblue_devices[1]->resource[1].end = gpio_to_irq(8); platform_add_devices(voiceblue_devices, ARRAY_SIZE(voiceblue_devices)); omap_board_config = voiceblue_config; omap_board_config_size = ARRAY_SIZE(voiceblue_config); -- 1.7.0.4 ^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH v2 1/4] ARM: OMAP1: boards: Fix OMAP_GPIO_IRQ usage with gpio_to_irq() 2012-03-19 12:06 ` [PATCH v2 1/4] ARM: OMAP1: boards: Fix OMAP_GPIO_IRQ usage with gpio_to_irq() Tarun Kanti DebBarma @ 2012-03-29 4:58 ` Olof Johansson 2012-03-29 5:34 ` DebBarma, Tarun Kanti 0 siblings, 1 reply; 17+ messages in thread From: Olof Johansson @ 2012-03-29 4:58 UTC (permalink / raw) To: linux-arm-kernel Hi, Sorry for the slow reply, I noticed this when dealing with merge conflicts pulling in this patch and others from Tony. On Mon, Mar 19, 2012 at 5:06 AM, Tarun Kanti DebBarma <tarun.kanti@ti.com> wrote: > With dynamic allocation of IRQ the usage of OMAP_GPIO_IRQ > is no longer valid. We should be using gpio_to_irq() instead. > > Signed-off-by: Tarun Kanti DebBarma <tarun.kanti@ti.com> > --- > ?arch/arm/mach-omap1/board-h2.c ? ? ? ?| ? ?8 ++++---- > ?arch/arm/mach-omap1/board-h3.c ? ? ? ?| ? ?9 ++++----- > ?arch/arm/mach-omap1/board-htcherald.c | ? ?6 +++--- > ?arch/arm/mach-omap1/board-innovator.c | ? ?4 ++-- > ?arch/arm/mach-omap1/board-nokia770.c ?| ? ?2 +- > ?arch/arm/mach-omap1/board-osk.c ? ? ? | ? 12 ++++++------ > ?arch/arm/mach-omap1/board-palmte.c ? ?| ? ?2 +- > ?arch/arm/mach-omap1/board-palmtt.c ? ?| ? ?2 +- > ?arch/arm/mach-omap1/board-palmz71.c ? | ? ?2 +- > ?arch/arm/mach-omap1/board-voiceblue.c | ? 16 +++++++--------- > ?10 files changed, 30 insertions(+), 33 deletions(-) > > diff --git a/arch/arm/mach-omap1/board-h2.c b/arch/arm/mach-omap1/board-h2.c > index 00ad6b2..ad0eece 100644 > --- a/arch/arm/mach-omap1/board-h2.c > +++ b/arch/arm/mach-omap1/board-h2.c > @@ -244,8 +244,6 @@ static struct resource h2_smc91x_resources[] = { > ? ? ? ? ? ? ? ?.flags ?= IORESOURCE_MEM, > ? ? ? ?}, > ? ? ? ?[1] = { > - ? ? ? ? ? ? ? .start ?= OMAP_GPIO_IRQ(0), > - ? ? ? ? ? ? ? .end ? ?= OMAP_GPIO_IRQ(0), > ? ? ? ? ? ? ? ?.flags ?= IORESOURCE_IRQ | IORESOURCE_IRQ_LOWEDGE, > ? ? ? ?}, > ?}; > @@ -364,11 +362,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), > ? ? ? ?}, > ?}; > > @@ -437,10 +433,14 @@ static void __init h2_init(void) > ? ? ? ?omap_cfg_reg(E19_1610_KBR4); > ? ? ? ?omap_cfg_reg(N19_1610_KBR5); > > + ? ? ? h2_devices[2]->resource[1].start = gpio_to_irq(0); > + ? ? ? h2_devices[2]->resource[1].end = gpio_to_irq(0); Never, ever, ever do this. What happens here when someone else adds another device to the h2_devices array before the smc91x one? Booom. Extremely fragile code. There's already a named resource struct you can use for this (h2_smc91x_resources). Use it. Same comments go for the other locations in this file as well as the other OMAP2+ patch, where appropriate. -Olof ^ permalink raw reply [flat|nested] 17+ messages in thread
* [PATCH v2 1/4] ARM: OMAP1: boards: Fix OMAP_GPIO_IRQ usage with gpio_to_irq() 2012-03-29 4:58 ` Olof Johansson @ 2012-03-29 5:34 ` DebBarma, Tarun Kanti 0 siblings, 0 replies; 17+ messages in thread From: DebBarma, Tarun Kanti @ 2012-03-29 5:34 UTC (permalink / raw) To: linux-arm-kernel On Thu, Mar 29, 2012 at 10:28 AM, Olof Johansson <olof@lixom.net> wrote: > Hi, > > Sorry for the slow reply, I noticed this when dealing with merge > conflicts pulling in this patch and others from Tony. > > On Mon, Mar 19, 2012 at 5:06 AM, Tarun Kanti DebBarma > <tarun.kanti@ti.com> wrote: >> With dynamic allocation of IRQ the usage of OMAP_GPIO_IRQ >> is no longer valid. We should be using gpio_to_irq() instead. >> >> Signed-off-by: Tarun Kanti DebBarma <tarun.kanti@ti.com> >> --- >> ?arch/arm/mach-omap1/board-h2.c ? ? ? ?| ? ?8 ++++---- >> ?arch/arm/mach-omap1/board-h3.c ? ? ? ?| ? ?9 ++++----- >> ?arch/arm/mach-omap1/board-htcherald.c | ? ?6 +++--- >> ?arch/arm/mach-omap1/board-innovator.c | ? ?4 ++-- >> ?arch/arm/mach-omap1/board-nokia770.c ?| ? ?2 +- >> ?arch/arm/mach-omap1/board-osk.c ? ? ? | ? 12 ++++++------ >> ?arch/arm/mach-omap1/board-palmte.c ? ?| ? ?2 +- >> ?arch/arm/mach-omap1/board-palmtt.c ? ?| ? ?2 +- >> ?arch/arm/mach-omap1/board-palmz71.c ? | ? ?2 +- >> ?arch/arm/mach-omap1/board-voiceblue.c | ? 16 +++++++--------- >> ?10 files changed, 30 insertions(+), 33 deletions(-) >> >> diff --git a/arch/arm/mach-omap1/board-h2.c b/arch/arm/mach-omap1/board-h2.c >> index 00ad6b2..ad0eece 100644 >> --- a/arch/arm/mach-omap1/board-h2.c >> +++ b/arch/arm/mach-omap1/board-h2.c >> @@ -244,8 +244,6 @@ static struct resource h2_smc91x_resources[] = { >> ? ? ? ? ? ? ? ?.flags ?= IORESOURCE_MEM, >> ? ? ? ?}, >> ? ? ? ?[1] = { >> - ? ? ? ? ? ? ? .start ?= OMAP_GPIO_IRQ(0), >> - ? ? ? ? ? ? ? .end ? ?= OMAP_GPIO_IRQ(0), >> ? ? ? ? ? ? ? ?.flags ?= IORESOURCE_IRQ | IORESOURCE_IRQ_LOWEDGE, >> ? ? ? ?}, >> ?}; >> @@ -364,11 +362,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), >> ? ? ? ?}, >> ?}; >> >> @@ -437,10 +433,14 @@ static void __init h2_init(void) >> ? ? ? ?omap_cfg_reg(E19_1610_KBR4); >> ? ? ? ?omap_cfg_reg(N19_1610_KBR5); >> >> + ? ? ? h2_devices[2]->resource[1].start = gpio_to_irq(0); >> + ? ? ? h2_devices[2]->resource[1].end = gpio_to_irq(0); > > Never, ever, ever do this. What happens here when someone else adds > another device to the h2_devices array before the smc91x one? ?Booom. > Extremely fragile code. Ok. > > There's already a named resource struct you can use for this > (h2_smc91x_resources). Use it. Sure, I will use this one. > > Same comments go for the other locations in this file as well as the > other OMAP2+ patch, where appropriate. Alright, I will make appropriate changes. Thanks. -- Tarun > > -Olof ^ permalink raw reply [flat|nested] 17+ messages in thread
* [PATCH v2 2/4] ARM: OMAP2+: boards: Fix OMAP_GPIO_IRQ usage with gpio_to_irq() 2012-03-19 12:06 [PATCH v2 0/4] ARM: OMAP: boards: changes to support dynamic irq alloc Tarun Kanti DebBarma 2012-03-19 12:06 ` [PATCH v2 1/4] ARM: OMAP1: boards: Fix OMAP_GPIO_IRQ usage with gpio_to_irq() Tarun Kanti DebBarma @ 2012-03-19 12:06 ` Tarun Kanti DebBarma 2012-03-19 12:06 ` [PATCH v2 3/4] drivers: input: Fix OMAP_GPIO_IRQ with gpio_to_irq() in ams_delta_serio_exit() Tarun Kanti DebBarma ` (3 subsequent siblings) 5 siblings, 0 replies; 17+ messages in thread From: Tarun Kanti DebBarma @ 2012-03-19 12:06 UTC (permalink / raw) To: linux-arm-kernel With dynamic allocation of IRQ the usage of OMAP_GPIO_IRQ is no longer valid. We should be using gpio_to_irq() instead. Signed-off-by: Tarun Kanti DebBarma <tarun.kanti@ti.com> --- arch/arm/mach-omap2/board-2430sdp.c | 2 +- arch/arm/mach-omap2/board-4430sdp.c | 2 +- arch/arm/mach-omap2/board-apollon.c | 6 ++++-- arch/arm/mach-omap2/board-devkit8000.c | 3 ++- arch/arm/mach-omap2/board-h4.c | 2 +- arch/arm/mach-omap2/board-omap3evm.c | 2 +- arch/arm/mach-omap2/board-omap4panda.c | 2 +- arch/arm/mach-omap2/board-rx51-peripherals.c | 3 ++- arch/arm/mach-omap2/board-zoom-debugboard.c | 3 ++- arch/arm/mach-omap2/board-zoom-peripherals.c | 6 ++++-- arch/arm/mach-omap2/common-board-devices.c | 2 +- 11 files changed, 20 insertions(+), 13 deletions(-) diff --git a/arch/arm/mach-omap2/board-2430sdp.c b/arch/arm/mach-omap2/board-2430sdp.c index 7370983..5a1b6af 100644 --- a/arch/arm/mach-omap2/board-2430sdp.c +++ b/arch/arm/mach-omap2/board-2430sdp.c @@ -230,12 +230,12 @@ static struct i2c_board_info __initdata sdp2430_i2c1_boardinfo[] = { { 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, diff --git a/arch/arm/mach-omap2/board-4430sdp.c b/arch/arm/mach-omap2/board-4430sdp.c index 4e90715..a09c699 100644 --- a/arch/arm/mach-omap2/board-4430sdp.c +++ b/arch/arm/mach-omap2/board-4430sdp.c @@ -873,7 +873,6 @@ static void __init omap4_sdp4430_wifi_mux_init(void) } 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, }; @@ -883,6 +882,7 @@ static void __init omap4_sdp4430_wifi_init(void) 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); diff --git a/arch/arm/mach-omap2/board-apollon.c b/arch/arm/mach-omap2/board-apollon.c index ac77382..7dd9d4d 100644 --- a/arch/arm/mach-omap2/board-apollon.c +++ b/arch/arm/mach-omap2/board-apollon.c @@ -136,8 +136,6 @@ static struct resource apollon_smc91x_resources[] = { .flags = IORESOURCE_MEM, }, [1] = { - .start = OMAP_GPIO_IRQ(APOLLON_ETHR_GPIO_IRQ), - .end = OMAP_GPIO_IRQ(APOLLON_ETHR_GPIO_IRQ), .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE, }, }; @@ -341,6 +339,10 @@ static void __init omap_apollon_init(void) * You have to mux them off in device drivers later on * if not needed. */ + apollon_devices[1]->resource[1].start = + gpio_to_irq(APOLLON_ETHR_GPIO_IRQ); + apollon_devices[1]->resource[1].end = + gpio_to_irq(APOLLON_ETHR_GPIO_IRQ); platform_add_devices(apollon_devices, ARRAY_SIZE(apollon_devices)); omap_serial_init(); omap_sdrc_init(NULL, NULL); diff --git a/arch/arm/mach-omap2/board-devkit8000.c b/arch/arm/mach-omap2/board-devkit8000.c index e873063..e947dc7 100644 --- a/arch/arm/mach-omap2/board-devkit8000.c +++ b/arch/arm/mach-omap2/board-devkit8000.c @@ -410,7 +410,6 @@ static struct resource omap_dm9000_resources[] = { .flags = IORESOURCE_MEM, }, [2] = { - .start = OMAP_GPIO_IRQ(OMAP_DM9000_GPIO_IRQ), .flags = IORESOURCE_IRQ | IRQF_TRIGGER_LOW, }, }; @@ -637,6 +636,8 @@ static void __init devkit8000_init(void) omap_dm9000_init(); devkit8000_i2c_init(); + devkit8000_devices[2]->resource[2].start = + gpio_to_irq(OMAP_DM9000_GPIO_IRQ); platform_add_devices(devkit8000_devices, ARRAY_SIZE(devkit8000_devices)); diff --git a/arch/arm/mach-omap2/board-h4.c b/arch/arm/mach-omap2/board-h4.c index 54af800..0bbbabe 100644 --- a/arch/arm/mach-omap2/board-h4.c +++ b/arch/arm/mach-omap2/board-h4.c @@ -348,7 +348,6 @@ static struct at24_platform_data m24c01 = { static struct i2c_board_info __initdata h4_i2c_board_info[] = { { I2C_BOARD_INFO("isp1301_omap", 0x2d), - .irq = OMAP_GPIO_IRQ(125), }, { /* EEPROM on mainboard */ I2C_BOARD_INFO("24c01", 0x52), @@ -377,6 +376,7 @@ static void __init omap_h4_init(void) */ board_mkp_init(); + h4_i2c_board_info[0].irq = gpio_to_irq(125); i2c_register_board_info(1, h4_i2c_board_info, ARRAY_SIZE(h4_i2c_board_info)); diff --git a/arch/arm/mach-omap2/board-omap3evm.c b/arch/arm/mach-omap2/board-omap3evm.c index c877236..eed88a4 100644 --- a/arch/arm/mach-omap2/board-omap3evm.c +++ b/arch/arm/mach-omap2/board-omap3evm.c @@ -487,7 +487,6 @@ static struct platform_device omap3evm_wlan_regulator = { }; 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 @@ static void __init omap3_evm_wl12xx_init(void) 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); diff --git a/arch/arm/mach-omap2/board-omap4panda.c b/arch/arm/mach-omap2/board-omap4panda.c index 28fc271..4496007 100644 --- a/arch/arm/mach-omap2/board-omap4panda.c +++ b/arch/arm/mach-omap2/board-omap4panda.c @@ -199,7 +199,6 @@ static struct platform_device omap_vwlan_device = { }; 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, }; @@ -494,6 +493,7 @@ static void __init omap4_panda_init(void) 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); diff --git a/arch/arm/mach-omap2/board-rx51-peripherals.c b/arch/arm/mach-omap2/board-rx51-peripherals.c index acb4e77..1cec076 100644 --- a/arch/arm/mach-omap2/board-rx51-peripherals.c +++ b/arch/arm/mach-omap2/board-rx51-peripherals.c @@ -172,7 +172,6 @@ static struct spi_board_info rx51_peripherals_spi_board_info[] __initdata = { .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, @@ -1124,6 +1123,8 @@ static void __init rx51_init_tsc2005(void) "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"); tsc2005_pdata.esd_timeout_ms = 0; diff --git a/arch/arm/mach-omap2/board-zoom-debugboard.c b/arch/arm/mach-omap2/board-zoom-debugboard.c index 369c2eb..1e8540e 100644 --- a/arch/arm/mach-omap2/board-zoom-debugboard.c +++ b/arch/arm/mach-omap2/board-zoom-debugboard.c @@ -43,7 +43,6 @@ static inline void __init zoom_init_smsc911x(void) static struct plat_serial8250_port serial_platform_data[] = { { .mapbase = ZOOM_UART_BASE, - .irq = OMAP_GPIO_IRQ(102), .flags = UPF_BOOT_AUTOCONF|UPF_IOREMAP|UPF_SHARE_IRQ, .irqflags = IRQF_SHARED | IRQF_TRIGGER_RISING, .iotype = UPIO_MEM, @@ -89,6 +88,8 @@ static inline void __init zoom_init_quaduart(void) if (gpio_request_one(quart_gpio, GPIOF_IN, "TL16CP754C GPIO") < 0) printk(KERN_ERR "Failed to request GPIO%d for TL16CP754C\n", quart_gpio); + + serial_platform_data[0].irq = gpio_to_irq(102); } static inline int omap_zoom_debugboard_detect(void) diff --git a/arch/arm/mach-omap2/board-zoom-peripherals.c b/arch/arm/mach-omap2/board-zoom-peripherals.c index c126461..a489f82 100644 --- a/arch/arm/mach-omap2/board-zoom-peripherals.c +++ b/arch/arm/mach-omap2/board-zoom-peripherals.c @@ -193,7 +193,6 @@ static struct platform_device omap_vwlan_device = { }; 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, }; @@ -296,7 +295,10 @@ static void enable_board_wakeup_source(void) 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); diff --git a/arch/arm/mach-omap2/common-board-devices.c b/arch/arm/mach-omap2/common-board-devices.c index bcb0c58..4cb17b4 100644 --- a/arch/arm/mach-omap2/common-board-devices.c +++ b/arch/arm/mach-omap2/common-board-devices.c @@ -79,7 +79,7 @@ void __init omap_ads7846_init(int bus_num, int gpio_pendown, int 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) spi_bi->platform_data = board_pdata; -- 1.7.0.4 ^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH v2 3/4] drivers: input: Fix OMAP_GPIO_IRQ with gpio_to_irq() in ams_delta_serio_exit() 2012-03-19 12:06 [PATCH v2 0/4] ARM: OMAP: boards: changes to support dynamic irq alloc Tarun Kanti DebBarma 2012-03-19 12:06 ` [PATCH v2 1/4] ARM: OMAP1: boards: Fix OMAP_GPIO_IRQ usage with gpio_to_irq() Tarun Kanti DebBarma 2012-03-19 12:06 ` [PATCH v2 2/4] ARM: OMAP2+: " Tarun Kanti DebBarma @ 2012-03-19 12:06 ` Tarun Kanti DebBarma 2012-03-20 16:52 ` Tony Lindgren 2012-03-19 12:06 ` [PATCH v2 4/4] ARM: OMAP: Remove OMAP_GPIO_IRQ macro definition Tarun Kanti DebBarma ` (2 subsequent siblings) 5 siblings, 1 reply; 17+ messages in thread From: Tarun Kanti DebBarma @ 2012-03-19 12:06 UTC (permalink / raw) To: linux-arm-kernel Even though ams-delta-serio input driver uses gpio_to_irq() in all relevent places to get irq number, the ams_delta_serio_exit() still uses OMAP_GPIO_IRQ macro. Fix this. Signed-off-by: Tarun Kanti DebBarma <tarun.kanti@ti.com> --- drivers/input/serio/ams_delta_serio.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/input/serio/ams_delta_serio.c b/drivers/input/serio/ams_delta_serio.c index d4d08bd..dbe1ae8 100644 --- a/drivers/input/serio/ams_delta_serio.c +++ b/drivers/input/serio/ams_delta_serio.c @@ -170,7 +170,7 @@ 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); } -- 1.7.0.4 ^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH v2 3/4] drivers: input: Fix OMAP_GPIO_IRQ with gpio_to_irq() in ams_delta_serio_exit() 2012-03-19 12:06 ` [PATCH v2 3/4] drivers: input: Fix OMAP_GPIO_IRQ with gpio_to_irq() in ams_delta_serio_exit() Tarun Kanti DebBarma @ 2012-03-20 16:52 ` Tony Lindgren 2012-03-20 17:36 ` Dmitry Torokhov 0 siblings, 1 reply; 17+ messages in thread From: Tony Lindgren @ 2012-03-20 16:52 UTC (permalink / raw) To: linux-arm-kernel Hi Dmitry, * Tarun Kanti DebBarma <tarun.kanti@ti.com> [120319 05:09]: > Even though ams-delta-serio input driver uses gpio_to_irq() in all > relevent places to get irq number, the ams_delta_serio_exit() still > uses OMAP_GPIO_IRQ macro. Fix this. > > Signed-off-by: Tarun Kanti DebBarma <tarun.kanti@ti.com> Care to ack this one? I'd like to apply all four as fixes at the end of the merge window so we can drop the old and now broken OMAP_GPIO_IRQ macro. Regards, Tony > --- > drivers/input/serio/ams_delta_serio.c | 2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/drivers/input/serio/ams_delta_serio.c b/drivers/input/serio/ams_delta_serio.c > index d4d08bd..dbe1ae8 100644 > --- a/drivers/input/serio/ams_delta_serio.c > +++ b/drivers/input/serio/ams_delta_serio.c > @@ -170,7 +170,7 @@ 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); > } > -- > 1.7.0.4 > ^ permalink raw reply [flat|nested] 17+ messages in thread
* [PATCH v2 3/4] drivers: input: Fix OMAP_GPIO_IRQ with gpio_to_irq() in ams_delta_serio_exit() 2012-03-20 16:52 ` Tony Lindgren @ 2012-03-20 17:36 ` Dmitry Torokhov 0 siblings, 0 replies; 17+ messages in thread From: Dmitry Torokhov @ 2012-03-20 17:36 UTC (permalink / raw) To: linux-arm-kernel On Tue, Mar 20, 2012 at 09:52:46AM -0700, Tony Lindgren wrote: > Hi Dmitry, > > * Tarun Kanti DebBarma <tarun.kanti@ti.com> [120319 05:09]: > > Even though ams-delta-serio input driver uses gpio_to_irq() in all > > relevent places to get irq number, the ams_delta_serio_exit() still > > uses OMAP_GPIO_IRQ macro. Fix this. > > > > Signed-off-by: Tarun Kanti DebBarma <tarun.kanti@ti.com> > > Care to ack this one? I'd like to apply all four as fixes > at the end of the merge window so we can drop the old and > now broken OMAP_GPIO_IRQ macro. Sure. Acked-by: Dmitry Torokhov <dtor@mail.ru> Thanks. -- Dmitry ^ permalink raw reply [flat|nested] 17+ messages in thread
* [PATCH v2 4/4] ARM: OMAP: Remove OMAP_GPIO_IRQ macro definition 2012-03-19 12:06 [PATCH v2 0/4] ARM: OMAP: boards: changes to support dynamic irq alloc Tarun Kanti DebBarma ` (2 preceding siblings ...) 2012-03-19 12:06 ` [PATCH v2 3/4] drivers: input: Fix OMAP_GPIO_IRQ with gpio_to_irq() in ams_delta_serio_exit() Tarun Kanti DebBarma @ 2012-03-19 12:06 ` Tarun Kanti DebBarma 2012-03-19 12:17 ` [PATCH v2 0/4] ARM: OMAP: boards: changes to support dynamic irq alloc Shilimkar, Santosh 2012-03-19 19:17 ` Tony Lindgren 5 siblings, 0 replies; 17+ messages in thread From: Tarun Kanti DebBarma @ 2012-03-19 12:06 UTC (permalink / raw) To: linux-arm-kernel Since all references to OMAP_GPIO_IRQ macro are replaced now with gpio_to_irq(), this can be removed altogether. Signed-off-by: Tarun Kanti DebBarma <tarun.kanti@ti.com> --- arch/arm/plat-omap/include/plat/gpio.h | 4 ---- 1 files changed, 0 insertions(+), 4 deletions(-) diff --git a/arch/arm/plat-omap/include/plat/gpio.h b/arch/arm/plat-omap/include/plat/gpio.h index 9e86ee0..d4df414 100644 --- a/arch/arm/plat-omap/include/plat/gpio.h +++ b/arch/arm/plat-omap/include/plat/gpio.h @@ -158,10 +158,6 @@ #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 -- 1.7.0.4 ^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH v2 0/4] ARM: OMAP: boards: changes to support dynamic irq alloc 2012-03-19 12:06 [PATCH v2 0/4] ARM: OMAP: boards: changes to support dynamic irq alloc Tarun Kanti DebBarma ` (3 preceding siblings ...) 2012-03-19 12:06 ` [PATCH v2 4/4] ARM: OMAP: Remove OMAP_GPIO_IRQ macro definition Tarun Kanti DebBarma @ 2012-03-19 12:17 ` Shilimkar, Santosh 2012-03-19 12:30 ` DebBarma, Tarun Kanti 2012-03-19 19:17 ` Tony Lindgren 5 siblings, 1 reply; 17+ messages in thread From: Shilimkar, Santosh @ 2012-03-19 12:17 UTC (permalink / raw) To: linux-arm-kernel On Mon, Mar 19, 2012 at 5:36 PM, Tarun Kanti DebBarma <tarun.kanti@ti.com> wrote: > These two patches incorporate changes to OMAP1 and OMAP2 platforms s/two/four I guess that's what you mean since there are 4 patches in the series. Regards Santosh ^ permalink raw reply [flat|nested] 17+ messages in thread
* [PATCH v2 0/4] ARM: OMAP: boards: changes to support dynamic irq alloc 2012-03-19 12:17 ` [PATCH v2 0/4] ARM: OMAP: boards: changes to support dynamic irq alloc Shilimkar, Santosh @ 2012-03-19 12:30 ` DebBarma, Tarun Kanti 0 siblings, 0 replies; 17+ messages in thread From: DebBarma, Tarun Kanti @ 2012-03-19 12:30 UTC (permalink / raw) To: linux-arm-kernel On Mon, Mar 19, 2012 at 5:47 PM, Shilimkar, Santosh <santosh.shilimkar@ti.com> wrote: > On Mon, Mar 19, 2012 at 5:36 PM, Tarun Kanti DebBarma > <tarun.kanti@ti.com> wrote: >> These two patches incorporate changes to OMAP1 and OMAP2 platforms > s/two/four > I guess that's what you mean since there are 4 patches in the series. Yes, sorry about that. You are right, I missed changing the text. Thanks. -- Tarun > > Regards > Santosh ^ permalink raw reply [flat|nested] 17+ messages in thread
* [PATCH v2 0/4] ARM: OMAP: boards: changes to support dynamic irq alloc 2012-03-19 12:06 [PATCH v2 0/4] ARM: OMAP: boards: changes to support dynamic irq alloc Tarun Kanti DebBarma ` (4 preceding siblings ...) 2012-03-19 12:17 ` [PATCH v2 0/4] ARM: OMAP: boards: changes to support dynamic irq alloc Shilimkar, Santosh @ 2012-03-19 19:17 ` Tony Lindgren 2012-03-19 22:58 ` Cousson, Benoit 5 siblings, 1 reply; 17+ messages in thread From: Tony Lindgren @ 2012-03-19 19:17 UTC (permalink / raw) To: linux-arm-kernel * Tarun Kanti DebBarma <tarun.kanti@ti.com> [120319 05:09]: > These two patches incorporate changes to OMAP1 and OMAP2 platforms > board files whereby older references to OMAP_GPIO_IRQ macro are > now replaced with gpio_to_irq(), thereby getting rid of static > irq references. > > Reference: git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc.git omap/dt > Commit: 9a0cee711448335ec43eae83272495e9334c0098 Can you please tell the exact two commits causing this breakage? I'm baffled how despite all the effort for previnting issues like this this still happen. These all seem valid fixes and clean up things, but how come this was not seen earlier? Regards, Tony ^ permalink raw reply [flat|nested] 17+ messages in thread
* [PATCH v2 0/4] ARM: OMAP: boards: changes to support dynamic irq alloc 2012-03-19 19:17 ` Tony Lindgren @ 2012-03-19 22:58 ` Cousson, Benoit 2012-03-19 23:39 ` Tony Lindgren 0 siblings, 1 reply; 17+ messages in thread From: Cousson, Benoit @ 2012-03-19 22:58 UTC (permalink / raw) To: linux-arm-kernel Hi Tony, On 3/19/2012 8:17 PM, Tony Lindgren wrote: > * Tarun Kanti DebBarma<tarun.kanti@ti.com> [120319 05:09]: >> These two patches incorporate changes to OMAP1 and OMAP2 platforms >> board files whereby older references to OMAP_GPIO_IRQ macro are >> now replaced with gpio_to_irq(), thereby getting rid of static >> irq references. >> >> Reference: git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc.git omap/dt >> Commit: 9a0cee711448335ec43eae83272495e9334c0098 > > Can you please tell the exact two commits causing this > breakage? Well, this is the GPIO DT + SPARSE_IRQ series I have done. It appears that the boards I have were already using properly gpio_to_irq() and thus were working fine with this series. But this is unfortunately not the case of most OMAP2 and 3 legacy boards that were still using an old OMAP way of converting GPIO to IRQ and were never modified to take advantage of the gpiolib stuff. So if these patches are apply before the GPIO DT + SPARSE_IRQ series, there will be no breakage at all. All the cleanup we have never done before will hurt us at some point when we will start using more extensively newer fmwk (DT, sparse_irq, dmaengine...). It was not done on purpose, but this GPIO series highlighted this remaining static broken mapping inside OMAP boards. > I'm baffled how despite all the effort for previnting > issues like this this still happen. These all seem valid > fixes and clean up things, but how come this was not seen > earlier? Maybe because there are much more boards inside mach-omap2 directory than inside my cubicle... :-( Regards, Benoit ^ permalink raw reply [flat|nested] 17+ messages in thread
* [PATCH v2 0/4] ARM: OMAP: boards: changes to support dynamic irq alloc 2012-03-19 22:58 ` Cousson, Benoit @ 2012-03-19 23:39 ` Tony Lindgren 2012-03-20 9:00 ` Cousson, Benoit 0 siblings, 1 reply; 17+ messages in thread From: Tony Lindgren @ 2012-03-19 23:39 UTC (permalink / raw) To: linux-arm-kernel * Cousson, Benoit <b-cousson@ti.com> [120319 16:00]: > Hi Tony, > > On 3/19/2012 8:17 PM, Tony Lindgren wrote: > >* Tarun Kanti DebBarma<tarun.kanti@ti.com> [120319 05:09]: > >>These two patches incorporate changes to OMAP1 and OMAP2 platforms > >>board files whereby older references to OMAP_GPIO_IRQ macro are > >>now replaced with gpio_to_irq(), thereby getting rid of static > >>irq references. > >> > >>Reference: git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc.git omap/dt > >>Commit: 9a0cee711448335ec43eae83272495e9334c0098 > > > >Can you please tell the exact two commits causing this > >breakage? > > Well, this is the GPIO DT + SPARSE_IRQ series I have done. It > appears that the boards I have were already using properly > gpio_to_irq() and thus were working fine with this series. > > But this is unfortunately not the case of most OMAP2 and 3 legacy > boards that were still using an old OMAP way of converting GPIO to > IRQ and were never modified to take advantage of the gpiolib stuff. > > So if these patches are apply before the GPIO DT + SPARSE_IRQ > series, there will be no breakage at all. > > All the cleanup we have never done before will hurt us at some point > when we will start using more extensively newer fmwk (DT, > sparse_irq, dmaengine...). It was not done on purpose, but this GPIO > series highlighted this remaining static broken mapping inside OMAP > boards. Yes I understand. But still, which patch(s) cause the issue so we can put that in the changelog for the fixes? > >I'm baffled how despite all the effort for previnting > >issues like this this still happen. These all seem valid > >fixes and clean up things, but how come this was not seen > >earlier? > > Maybe because there are much more boards inside mach-omap2 directory > than inside my cubicle... :-( Well somehow we need to make sure that patches get properly tested on a reasonable selection of boards. This pretty much breaks things for 21 boards out of the 51 board-*.c files :( Regards, Tony ^ permalink raw reply [flat|nested] 17+ messages in thread
* [PATCH v2 0/4] ARM: OMAP: boards: changes to support dynamic irq alloc 2012-03-19 23:39 ` Tony Lindgren @ 2012-03-20 9:00 ` Cousson, Benoit 2012-03-20 10:59 ` DebBarma, Tarun Kanti 0 siblings, 1 reply; 17+ messages in thread From: Cousson, Benoit @ 2012-03-20 9:00 UTC (permalink / raw) To: linux-arm-kernel On 3/20/2012 12:39 AM, Tony Lindgren wrote: > * Cousson, Benoit<b-cousson@ti.com> [120319 16:00]: >> Hi Tony, >> >> On 3/19/2012 8:17 PM, Tony Lindgren wrote: >>> * Tarun Kanti DebBarma<tarun.kanti@ti.com> [120319 05:09]: >>>> These two patches incorporate changes to OMAP1 and OMAP2 platforms >>>> board files whereby older references to OMAP_GPIO_IRQ macro are >>>> now replaced with gpio_to_irq(), thereby getting rid of static >>>> irq references. >>>> >>>> Reference: git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc.git omap/dt >>>> Commit: 9a0cee711448335ec43eae83272495e9334c0098 >>> >>> Can you please tell the exact two commits causing this >>> breakage? >> >> Well, this is the GPIO DT + SPARSE_IRQ series I have done. It >> appears that the boards I have were already using properly >> gpio_to_irq() and thus were working fine with this series. >> >> But this is unfortunately not the case of most OMAP2 and 3 legacy >> boards that were still using an old OMAP way of converting GPIO to >> IRQ and were never modified to take advantage of the gpiolib stuff. >> >> So if these patches are apply before the GPIO DT + SPARSE_IRQ >> series, there will be no breakage at all. >> >> All the cleanup we have never done before will hurt us at some point >> when we will start using more extensively newer fmwk (DT, >> sparse_irq, dmaengine...). It was not done on purpose, but this GPIO >> series highlighted this remaining static broken mapping inside OMAP >> boards. > > Yes I understand. But still, which patch(s) cause the issue > so we can put that in the changelog for the fixes? OK, here they are: 25db711 gpio/omap: Fix IRQ handling for SPARSE_IRQ 384ebe1 gpio/omap: Add DT support to GPIO driver Tarun, You should indeed add the references in your cover letter. >>> I'm baffled how despite all the effort for previnting >>> issues like this this still happen. These all seem valid >>> fixes and clean up things, but how come this was not seen >>> earlier? >> >> Maybe because there are much more boards inside mach-omap2 directory >> than inside my cubicle... :-( > > Well somehow we need to make sure that patches get properly > tested on a reasonable selection of boards. This pretty much > breaks things for 21 boards out of the 51 board-*.c files :( What is too bad is that one broken board was enough to figured out the issue and fix all the other ones. I just did not have that one :-( Regards, Benoit ^ permalink raw reply [flat|nested] 17+ messages in thread
* [PATCH v2 0/4] ARM: OMAP: boards: changes to support dynamic irq alloc 2012-03-20 9:00 ` Cousson, Benoit @ 2012-03-20 10:59 ` DebBarma, Tarun Kanti 2012-03-20 16:51 ` Tony Lindgren 0 siblings, 1 reply; 17+ messages in thread From: DebBarma, Tarun Kanti @ 2012-03-20 10:59 UTC (permalink / raw) To: linux-arm-kernel On Tue, Mar 20, 2012 at 2:30 PM, Cousson, Benoit <b-cousson@ti.com> wrote: > On 3/20/2012 12:39 AM, Tony Lindgren wrote: >> >> * Cousson, Benoit<b-cousson@ti.com> ?[120319 16:00]: >>> >>> Hi Tony, >>> >>> On 3/19/2012 8:17 PM, Tony Lindgren wrote: >>>> >>>> * Tarun Kanti DebBarma<tarun.kanti@ti.com> ? [120319 05:09]: >>>>> >>>>> These two patches incorporate changes to OMAP1 and OMAP2 platforms >>>>> board files whereby older references to OMAP_GPIO_IRQ macro are >>>>> now replaced with gpio_to_irq(), thereby getting rid of static >>>>> irq references. >>>>> >>>>> Reference: >>>>> git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc.git omap/dt >>>>> Commit: 9a0cee711448335ec43eae83272495e9334c0098 >>>> >>>> >>>> Can you please tell the exact two commits causing this >>>> breakage? >>> >>> >>> Well, this is the GPIO DT + SPARSE_IRQ series I have done. It >>> appears that the boards I have were already using properly >>> gpio_to_irq() and thus were working fine with this series. >>> >>> But this is unfortunately not the case of most OMAP2 and 3 legacy >>> boards that were still using an old OMAP way of converting GPIO to >>> IRQ and were never modified to take advantage of the gpiolib stuff. >>> >>> So if these patches are apply before the GPIO DT + SPARSE_IRQ >>> series, there will be no breakage at all. >>> >>> All the cleanup we have never done before will hurt us at some point >>> when we will start using more extensively newer fmwk (DT, >>> sparse_irq, dmaengine...). It was not done on purpose, but this GPIO >>> series highlighted this remaining static broken mapping inside OMAP >>> boards. >> >> >> Yes I understand. But still, which patch(s) cause the issue >> so we can put that in the changelog for the fixes? > > > OK, here they are: > 25db711 gpio/omap: Fix IRQ handling for SPARSE_IRQ > 384ebe1 gpio/omap: Add DT support to GPIO driver > > Tarun, > > You should indeed add the references in your cover letter. Yes, I will specify them in the cover letter. -- Tarun > > >>>> I'm baffled how despite all the effort for previnting >>>> issues like this this still happen. These all seem valid >>>> fixes and clean up things, but how come this was not seen >>>> earlier? >>> >>> >>> Maybe because there are much more boards inside mach-omap2 directory >>> than inside my cubicle... :-( >> >> >> Well somehow we need to make sure that patches get properly >> tested on a reasonable selection of boards. This pretty much >> breaks things for 21 boards out of the 51 board-*.c files :( > > > What is too bad is that one broken board was enough to figured out the issue > and fix all the other ones. I just did not have that one :-( > > Regards, > Benoit ^ permalink raw reply [flat|nested] 17+ messages in thread
* [PATCH v2 0/4] ARM: OMAP: boards: changes to support dynamic irq alloc 2012-03-20 10:59 ` DebBarma, Tarun Kanti @ 2012-03-20 16:51 ` Tony Lindgren 0 siblings, 0 replies; 17+ messages in thread From: Tony Lindgren @ 2012-03-20 16:51 UTC (permalink / raw) To: linux-arm-kernel * DebBarma, Tarun Kanti <tarun.kanti@ti.com> [120320 04:02]: > On Tue, Mar 20, 2012 at 2:30 PM, Cousson, Benoit <b-cousson@ti.com> wrote: > > On 3/20/2012 12:39 AM, Tony Lindgren wrote: > >> > >> Yes I understand. But still, which patch(s) cause the issue > >> so we can put that in the changelog for the fixes? > > > > OK, here they are: > > 25db711 gpio/omap: Fix IRQ handling for SPARSE_IRQ > > 384ebe1 gpio/omap: Add DT support to GPIO driver Thanks, I'll update the comments for the first two patches for this and apply them. If I get an ack from Dmitry for patch 3/4, I'll apply them too. Regards, Tony ^ permalink raw reply [flat|nested] 17+ messages in thread
end of thread, other threads:[~2012-03-29 5:34 UTC | newest] Thread overview: 17+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2012-03-19 12:06 [PATCH v2 0/4] ARM: OMAP: boards: changes to support dynamic irq alloc Tarun Kanti DebBarma 2012-03-19 12:06 ` [PATCH v2 1/4] ARM: OMAP1: boards: Fix OMAP_GPIO_IRQ usage with gpio_to_irq() Tarun Kanti DebBarma 2012-03-29 4:58 ` Olof Johansson 2012-03-29 5:34 ` DebBarma, Tarun Kanti 2012-03-19 12:06 ` [PATCH v2 2/4] ARM: OMAP2+: " Tarun Kanti DebBarma 2012-03-19 12:06 ` [PATCH v2 3/4] drivers: input: Fix OMAP_GPIO_IRQ with gpio_to_irq() in ams_delta_serio_exit() Tarun Kanti DebBarma 2012-03-20 16:52 ` Tony Lindgren 2012-03-20 17:36 ` Dmitry Torokhov 2012-03-19 12:06 ` [PATCH v2 4/4] ARM: OMAP: Remove OMAP_GPIO_IRQ macro definition Tarun Kanti DebBarma 2012-03-19 12:17 ` [PATCH v2 0/4] ARM: OMAP: boards: changes to support dynamic irq alloc Shilimkar, Santosh 2012-03-19 12:30 ` DebBarma, Tarun Kanti 2012-03-19 19:17 ` Tony Lindgren 2012-03-19 22:58 ` Cousson, Benoit 2012-03-19 23:39 ` Tony Lindgren 2012-03-20 9:00 ` Cousson, Benoit 2012-03-20 10:59 ` DebBarma, Tarun Kanti 2012-03-20 16:51 ` Tony Lindgren
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).