aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-tegra/gpio.c
diff options
context:
space:
mode:
authorLennert Buytenhek <buytenh@wantstofly.org>2010-11-29 05:14:46 -0500
committerLennert Buytenhek <buytenh@wantstofly.org>2011-01-13 11:19:04 -0500
commit37337a8d5e68d6e19075dbdb3acf4f1011dae972 (patch)
treee3247ffda75033a06104949d73e2825c2a9064e4 /arch/arm/mach-tegra/gpio.c
parent76fbec842e176e57c2ba2c8efbac3367e59cc8f7 (diff)
ARM: tegra: irq_data conversion.
Signed-off-by: Lennert Buytenhek <buytenh@secretlab.ca>
Diffstat (limited to 'arch/arm/mach-tegra/gpio.c')
-rw-r--r--arch/arm/mach-tegra/gpio.c38
1 files changed, 19 insertions, 19 deletions
diff --git a/arch/arm/mach-tegra/gpio.c b/arch/arm/mach-tegra/gpio.c
index 0775265e69f5..bd066206e110 100644
--- a/arch/arm/mach-tegra/gpio.c
+++ b/arch/arm/mach-tegra/gpio.c
@@ -142,31 +142,31 @@ static struct gpio_chip tegra_gpio_chip = {
142 .ngpio = TEGRA_NR_GPIOS, 142 .ngpio = TEGRA_NR_GPIOS,
143}; 143};
144 144
145static void tegra_gpio_irq_ack(unsigned int irq) 145static void tegra_gpio_irq_ack(struct irq_data *d)
146{ 146{
147 int gpio = irq - INT_GPIO_BASE; 147 int gpio = d->irq - INT_GPIO_BASE;
148 148
149 __raw_writel(1 << GPIO_BIT(gpio), GPIO_INT_CLR(gpio)); 149 __raw_writel(1 << GPIO_BIT(gpio), GPIO_INT_CLR(gpio));
150} 150}
151 151
152static void tegra_gpio_irq_mask(unsigned int irq) 152static void tegra_gpio_irq_mask(struct irq_data *d)
153{ 153{
154 int gpio = irq - INT_GPIO_BASE; 154 int gpio = d->irq - INT_GPIO_BASE;
155 155
156 tegra_gpio_mask_write(GPIO_MSK_INT_ENB(gpio), gpio, 0); 156 tegra_gpio_mask_write(GPIO_MSK_INT_ENB(gpio), gpio, 0);
157} 157}
158 158
159static void tegra_gpio_irq_unmask(unsigned int irq) 159static void tegra_gpio_irq_unmask(struct irq_data *d)
160{ 160{
161 int gpio = irq - INT_GPIO_BASE; 161 int gpio = d->irq - INT_GPIO_BASE;
162 162
163 tegra_gpio_mask_write(GPIO_MSK_INT_ENB(gpio), gpio, 1); 163 tegra_gpio_mask_write(GPIO_MSK_INT_ENB(gpio), gpio, 1);
164} 164}
165 165
166static int tegra_gpio_irq_set_type(unsigned int irq, unsigned int type) 166static int tegra_gpio_irq_set_type(struct irq_data *d, unsigned int type)
167{ 167{
168 int gpio = irq - INT_GPIO_BASE; 168 int gpio = d->irq - INT_GPIO_BASE;
169 struct tegra_gpio_bank *bank = get_irq_chip_data(irq); 169 struct tegra_gpio_bank *bank = irq_data_get_irq_chip_data(d);
170 int port = GPIO_PORT(gpio); 170 int port = GPIO_PORT(gpio);
171 int lvl_type; 171 int lvl_type;
172 int val; 172 int val;
@@ -221,7 +221,7 @@ static void tegra_gpio_irq_handler(unsigned int irq, struct irq_desc *desc)
221 int pin; 221 int pin;
222 int unmasked = 0; 222 int unmasked = 0;
223 223
224 desc->chip->ack(irq); 224 desc->irq_data.chip->irq_ack(&desc->irq_data);
225 225
226 bank = get_irq_data(irq); 226 bank = get_irq_data(irq);
227 227
@@ -240,7 +240,7 @@ static void tegra_gpio_irq_handler(unsigned int irq, struct irq_desc *desc)
240 */ 240 */
241 if (lvl & (0x100 << pin)) { 241 if (lvl & (0x100 << pin)) {
242 unmasked = 1; 242 unmasked = 1;
243 desc->chip->unmask(irq); 243 desc->irq_data.chip->irq_unmask(&desc->irq_data);
244 } 244 }
245 245
246 generic_handle_irq(gpio_to_irq(gpio + pin)); 246 generic_handle_irq(gpio_to_irq(gpio + pin));
@@ -248,7 +248,7 @@ static void tegra_gpio_irq_handler(unsigned int irq, struct irq_desc *desc)
248 } 248 }
249 249
250 if (!unmasked) 250 if (!unmasked)
251 desc->chip->unmask(irq); 251 desc->irq_data.chip->irq_unmask(&desc->irq_data);
252 252
253} 253}
254 254
@@ -316,21 +316,21 @@ void tegra_gpio_suspend(void)
316 local_irq_restore(flags); 316 local_irq_restore(flags);
317} 317}
318 318
319static int tegra_gpio_wake_enable(unsigned int irq, unsigned int enable) 319static int tegra_gpio_wake_enable(struct irq_data *d, unsigned int enable)
320{ 320{
321 struct tegra_gpio_bank *bank = get_irq_chip_data(irq); 321 struct tegra_gpio_bank *bank = irq_data_get_irq_chip_data(d);
322 return set_irq_wake(bank->irq, enable); 322 return set_irq_wake(bank->irq, enable);
323} 323}
324#endif 324#endif
325 325
326static struct irq_chip tegra_gpio_irq_chip = { 326static struct irq_chip tegra_gpio_irq_chip = {
327 .name = "GPIO", 327 .name = "GPIO",
328 .ack = tegra_gpio_irq_ack, 328 .irq_ack = tegra_gpio_irq_ack,
329 .mask = tegra_gpio_irq_mask, 329 .irq_mask = tegra_gpio_irq_mask,
330 .unmask = tegra_gpio_irq_unmask, 330 .irq_unmask = tegra_gpio_irq_unmask,
331 .set_type = tegra_gpio_irq_set_type, 331 .irq_set_type = tegra_gpio_irq_set_type,
332#ifdef CONFIG_PM 332#ifdef CONFIG_PM
333 .set_wake = tegra_gpio_wake_enable, 333 .irq_set_wake = tegra_gpio_wake_enable,
334#endif 334#endif
335}; 335};
336 336