|
@@ -142,31 +142,31 @@ static struct gpio_chip tegra_gpio_chip = {
|
|
|
.ngpio = TEGRA_NR_GPIOS,
|
|
|
};
|
|
|
|
|
|
-static void tegra_gpio_irq_ack(unsigned int irq)
|
|
|
+static void tegra_gpio_irq_ack(struct irq_data *d)
|
|
|
{
|
|
|
- int gpio = irq - INT_GPIO_BASE;
|
|
|
+ int gpio = d->irq - INT_GPIO_BASE;
|
|
|
|
|
|
__raw_writel(1 << GPIO_BIT(gpio), GPIO_INT_CLR(gpio));
|
|
|
}
|
|
|
|
|
|
-static void tegra_gpio_irq_mask(unsigned int irq)
|
|
|
+static void tegra_gpio_irq_mask(struct irq_data *d)
|
|
|
{
|
|
|
- int gpio = irq - INT_GPIO_BASE;
|
|
|
+ int gpio = d->irq - INT_GPIO_BASE;
|
|
|
|
|
|
tegra_gpio_mask_write(GPIO_MSK_INT_ENB(gpio), gpio, 0);
|
|
|
}
|
|
|
|
|
|
-static void tegra_gpio_irq_unmask(unsigned int irq)
|
|
|
+static void tegra_gpio_irq_unmask(struct irq_data *d)
|
|
|
{
|
|
|
- int gpio = irq - INT_GPIO_BASE;
|
|
|
+ int gpio = d->irq - INT_GPIO_BASE;
|
|
|
|
|
|
tegra_gpio_mask_write(GPIO_MSK_INT_ENB(gpio), gpio, 1);
|
|
|
}
|
|
|
|
|
|
-static int tegra_gpio_irq_set_type(unsigned int irq, unsigned int type)
|
|
|
+static int tegra_gpio_irq_set_type(struct irq_data *d, unsigned int type)
|
|
|
{
|
|
|
- int gpio = irq - INT_GPIO_BASE;
|
|
|
- struct tegra_gpio_bank *bank = get_irq_chip_data(irq);
|
|
|
+ int gpio = d->irq - INT_GPIO_BASE;
|
|
|
+ struct tegra_gpio_bank *bank = irq_data_get_irq_chip_data(d);
|
|
|
int port = GPIO_PORT(gpio);
|
|
|
int lvl_type;
|
|
|
int val;
|
|
@@ -221,7 +221,7 @@ static void tegra_gpio_irq_handler(unsigned int irq, struct irq_desc *desc)
|
|
|
int pin;
|
|
|
int unmasked = 0;
|
|
|
|
|
|
- desc->chip->ack(irq);
|
|
|
+ desc->irq_data.chip->irq_ack(&desc->irq_data);
|
|
|
|
|
|
bank = get_irq_data(irq);
|
|
|
|
|
@@ -240,7 +240,7 @@ static void tegra_gpio_irq_handler(unsigned int irq, struct irq_desc *desc)
|
|
|
*/
|
|
|
if (lvl & (0x100 << pin)) {
|
|
|
unmasked = 1;
|
|
|
- desc->chip->unmask(irq);
|
|
|
+ desc->irq_data.chip->irq_unmask(&desc->irq_data);
|
|
|
}
|
|
|
|
|
|
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)
|
|
|
}
|
|
|
|
|
|
if (!unmasked)
|
|
|
- desc->chip->unmask(irq);
|
|
|
+ desc->irq_data.chip->irq_unmask(&desc->irq_data);
|
|
|
|
|
|
}
|
|
|
|
|
@@ -316,21 +316,21 @@ void tegra_gpio_suspend(void)
|
|
|
local_irq_restore(flags);
|
|
|
}
|
|
|
|
|
|
-static int tegra_gpio_wake_enable(unsigned int irq, unsigned int enable)
|
|
|
+static int tegra_gpio_wake_enable(struct irq_data *d, unsigned int enable)
|
|
|
{
|
|
|
- struct tegra_gpio_bank *bank = get_irq_chip_data(irq);
|
|
|
+ struct tegra_gpio_bank *bank = irq_data_get_irq_chip_data(d);
|
|
|
return set_irq_wake(bank->irq, enable);
|
|
|
}
|
|
|
#endif
|
|
|
|
|
|
static struct irq_chip tegra_gpio_irq_chip = {
|
|
|
.name = "GPIO",
|
|
|
- .ack = tegra_gpio_irq_ack,
|
|
|
- .mask = tegra_gpio_irq_mask,
|
|
|
- .unmask = tegra_gpio_irq_unmask,
|
|
|
- .set_type = tegra_gpio_irq_set_type,
|
|
|
+ .irq_ack = tegra_gpio_irq_ack,
|
|
|
+ .irq_mask = tegra_gpio_irq_mask,
|
|
|
+ .irq_unmask = tegra_gpio_irq_unmask,
|
|
|
+ .irq_set_type = tegra_gpio_irq_set_type,
|
|
|
#ifdef CONFIG_PM
|
|
|
- .set_wake = tegra_gpio_wake_enable,
|
|
|
+ .irq_set_wake = tegra_gpio_wake_enable,
|
|
|
#endif
|
|
|
};
|
|
|
|