diff options
author | Stephen Warren <swarren@nvidia.com> | 2012-01-04 03:39:33 -0500 |
---|---|---|
committer | Olof Johansson <olof@lixom.net> | 2012-02-06 21:25:00 -0500 |
commit | 2123552d12168e744271aaf206e5826760fbd857 (patch) | |
tree | 3f873ccaa1461fbd85266ad91135395069541880 /arch/arm/mach-tegra | |
parent | 6d7d7b3ecd20a0fbcebdbdffe7b25d94cfa37d93 (diff) |
ARM: tegra: Remove use of TEGRA_GPIO_TO_IRQ
Replace compile-time usage of TEGRA_GPIO_TO_IRQ with run-time calls to
gpio_to_irq(). This will allow the base IRQ number for the Tegra GPIO
driver to be dynamically allocated in a later patch.
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Olof Johansson <olof@lixom.net>
Diffstat (limited to 'arch/arm/mach-tegra')
-rw-r--r-- | arch/arm/mach-tegra/board-harmony.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-tegra/board-seaboard.c | 5 |
2 files changed, 4 insertions, 3 deletions
diff --git a/arch/arm/mach-tegra/board-harmony.c b/arch/arm/mach-tegra/board-harmony.c index 789bdc9e8f91..c00aadb01e09 100644 --- a/arch/arm/mach-tegra/board-harmony.c +++ b/arch/arm/mach-tegra/board-harmony.c | |||
@@ -101,7 +101,6 @@ static struct wm8903_platform_data harmony_wm8903_pdata = { | |||
101 | static struct i2c_board_info __initdata wm8903_board_info = { | 101 | static struct i2c_board_info __initdata wm8903_board_info = { |
102 | I2C_BOARD_INFO("wm8903", 0x1a), | 102 | I2C_BOARD_INFO("wm8903", 0x1a), |
103 | .platform_data = &harmony_wm8903_pdata, | 103 | .platform_data = &harmony_wm8903_pdata, |
104 | .irq = TEGRA_GPIO_TO_IRQ(TEGRA_GPIO_CDC_IRQ), | ||
105 | }; | 104 | }; |
106 | 105 | ||
107 | static void __init harmony_i2c_init(void) | 106 | static void __init harmony_i2c_init(void) |
@@ -111,6 +110,7 @@ static void __init harmony_i2c_init(void) | |||
111 | platform_device_register(&tegra_i2c_device3); | 110 | platform_device_register(&tegra_i2c_device3); |
112 | platform_device_register(&tegra_i2c_device4); | 111 | platform_device_register(&tegra_i2c_device4); |
113 | 112 | ||
113 | wm8903_board_info.irq = gpio_to_irq(TEGRA_GPIO_CDC_IRQ); | ||
114 | i2c_register_board_info(0, &wm8903_board_info, 1); | 114 | i2c_register_board_info(0, &wm8903_board_info, 1); |
115 | } | 115 | } |
116 | 116 | ||
diff --git a/arch/arm/mach-tegra/board-seaboard.c b/arch/arm/mach-tegra/board-seaboard.c index ebac65f52510..d669847f0485 100644 --- a/arch/arm/mach-tegra/board-seaboard.c +++ b/arch/arm/mach-tegra/board-seaboard.c | |||
@@ -159,7 +159,6 @@ static struct platform_device *seaboard_devices[] __initdata = { | |||
159 | 159 | ||
160 | static struct i2c_board_info __initdata isl29018_device = { | 160 | static struct i2c_board_info __initdata isl29018_device = { |
161 | I2C_BOARD_INFO("isl29018", 0x44), | 161 | I2C_BOARD_INFO("isl29018", 0x44), |
162 | .irq = TEGRA_GPIO_TO_IRQ(TEGRA_GPIO_ISL29018_IRQ), | ||
163 | }; | 162 | }; |
164 | 163 | ||
165 | static struct i2c_board_info __initdata adt7461_device = { | 164 | static struct i2c_board_info __initdata adt7461_device = { |
@@ -183,7 +182,6 @@ static struct wm8903_platform_data wm8903_pdata = { | |||
183 | static struct i2c_board_info __initdata wm8903_device = { | 182 | static struct i2c_board_info __initdata wm8903_device = { |
184 | I2C_BOARD_INFO("wm8903", 0x1a), | 183 | I2C_BOARD_INFO("wm8903", 0x1a), |
185 | .platform_data = &wm8903_pdata, | 184 | .platform_data = &wm8903_pdata, |
186 | .irq = TEGRA_GPIO_TO_IRQ(TEGRA_GPIO_CDC_IRQ), | ||
187 | }; | 185 | }; |
188 | 186 | ||
189 | static int seaboard_ehci_init(void) | 187 | static int seaboard_ehci_init(void) |
@@ -214,7 +212,10 @@ static void __init seaboard_i2c_init(void) | |||
214 | gpio_request(TEGRA_GPIO_ISL29018_IRQ, "isl29018"); | 212 | gpio_request(TEGRA_GPIO_ISL29018_IRQ, "isl29018"); |
215 | gpio_direction_input(TEGRA_GPIO_ISL29018_IRQ); | 213 | gpio_direction_input(TEGRA_GPIO_ISL29018_IRQ); |
216 | 214 | ||
215 | isl29018_device.irq = gpio_to_irq(TEGRA_GPIO_ISL29018_IRQ); | ||
217 | i2c_register_board_info(0, &isl29018_device, 1); | 216 | i2c_register_board_info(0, &isl29018_device, 1); |
217 | |||
218 | wm8903_device.irq = gpio_to_irq(TEGRA_GPIO_CDC_IRQ); | ||
218 | i2c_register_board_info(0, &wm8903_device, 1); | 219 | i2c_register_board_info(0, &wm8903_device, 1); |
219 | 220 | ||
220 | i2c_register_board_info(3, &adt7461_device, 1); | 221 | i2c_register_board_info(3, &adt7461_device, 1); |