Commit 33fcc1b8 authored by Lennert Buytenhek's avatar Lennert Buytenhek Committed by Linus Torvalds

gpio: tc35892-gpio: irq_data conversion

Converts irq_chips and flow handlers over to the new struct irq_data based
irq_chip functions.
Signed-off-by: default avatarLennert Buytenhek <buytenh@secretlab.ca>
Acked-by: default avatarRabin Vincent <rabin.vincent@stericsson.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 673860c1
...@@ -110,10 +110,10 @@ static struct gpio_chip template_chip = { ...@@ -110,10 +110,10 @@ static struct gpio_chip template_chip = {
.can_sleep = 1, .can_sleep = 1,
}; };
static int tc3589x_gpio_irq_set_type(unsigned int irq, unsigned int type) static int tc3589x_gpio_irq_set_type(struct irq_data *d, unsigned int type)
{ {
struct tc3589x_gpio *tc3589x_gpio = get_irq_chip_data(irq); struct tc3589x_gpio *tc3589x_gpio = irq_data_get_irq_chip_data(d);
int offset = irq - tc3589x_gpio->irq_base; int offset = d->irq - tc3589x_gpio->irq_base;
int regoffset = offset / 8; int regoffset = offset / 8;
int mask = 1 << (offset % 8); int mask = 1 << (offset % 8);
...@@ -137,16 +137,16 @@ static int tc3589x_gpio_irq_set_type(unsigned int irq, unsigned int type) ...@@ -137,16 +137,16 @@ static int tc3589x_gpio_irq_set_type(unsigned int irq, unsigned int type)
return 0; return 0;
} }
static void tc3589x_gpio_irq_lock(unsigned int irq) static void tc3589x_gpio_irq_lock(struct irq_data *d)
{ {
struct tc3589x_gpio *tc3589x_gpio = get_irq_chip_data(irq); struct tc3589x_gpio *tc3589x_gpio = irq_data_get_irq_chip_data(d);
mutex_lock(&tc3589x_gpio->irq_lock); mutex_lock(&tc3589x_gpio->irq_lock);
} }
static void tc3589x_gpio_irq_sync_unlock(unsigned int irq) static void tc3589x_gpio_irq_sync_unlock(struct irq_data *d)
{ {
struct tc3589x_gpio *tc3589x_gpio = get_irq_chip_data(irq); struct tc3589x_gpio *tc3589x_gpio = irq_data_get_irq_chip_data(d);
struct tc3589x *tc3589x = tc3589x_gpio->tc3589x; struct tc3589x *tc3589x = tc3589x_gpio->tc3589x;
static const u8 regmap[] = { static const u8 regmap[] = {
[REG_IBE] = TC3589x_GPIOIBE0, [REG_IBE] = TC3589x_GPIOIBE0,
...@@ -172,20 +172,20 @@ static void tc3589x_gpio_irq_sync_unlock(unsigned int irq) ...@@ -172,20 +172,20 @@ static void tc3589x_gpio_irq_sync_unlock(unsigned int irq)
mutex_unlock(&tc3589x_gpio->irq_lock); mutex_unlock(&tc3589x_gpio->irq_lock);
} }
static void tc3589x_gpio_irq_mask(unsigned int irq) static void tc3589x_gpio_irq_mask(struct irq_data *d)
{ {
struct tc3589x_gpio *tc3589x_gpio = get_irq_chip_data(irq); struct tc3589x_gpio *tc3589x_gpio = irq_data_get_irq_chip_data(d);
int offset = irq - tc3589x_gpio->irq_base; int offset = d->irq - tc3589x_gpio->irq_base;
int regoffset = offset / 8; int regoffset = offset / 8;
int mask = 1 << (offset % 8); int mask = 1 << (offset % 8);
tc3589x_gpio->regs[REG_IE][regoffset] &= ~mask; tc3589x_gpio->regs[REG_IE][regoffset] &= ~mask;
} }
static void tc3589x_gpio_irq_unmask(unsigned int irq) static void tc3589x_gpio_irq_unmask(struct irq_data *d)
{ {
struct tc3589x_gpio *tc3589x_gpio = get_irq_chip_data(irq); struct tc3589x_gpio *tc3589x_gpio = irq_data_get_irq_chip_data(d);
int offset = irq - tc3589x_gpio->irq_base; int offset = d->irq - tc3589x_gpio->irq_base;
int regoffset = offset / 8; int regoffset = offset / 8;
int mask = 1 << (offset % 8); int mask = 1 << (offset % 8);
...@@ -194,11 +194,11 @@ static void tc3589x_gpio_irq_unmask(unsigned int irq) ...@@ -194,11 +194,11 @@ static void tc3589x_gpio_irq_unmask(unsigned int irq)
static struct irq_chip tc3589x_gpio_irq_chip = { static struct irq_chip tc3589x_gpio_irq_chip = {
.name = "tc3589x-gpio", .name = "tc3589x-gpio",
.bus_lock = tc3589x_gpio_irq_lock, .irq_bus_lock = tc3589x_gpio_irq_lock,
.bus_sync_unlock = tc3589x_gpio_irq_sync_unlock, .irq_bus_sync_unlock = tc3589x_gpio_irq_sync_unlock,
.mask = tc3589x_gpio_irq_mask, .irq_mask = tc3589x_gpio_irq_mask,
.unmask = tc3589x_gpio_irq_unmask, .irq_unmask = tc3589x_gpio_irq_unmask,
.set_type = tc3589x_gpio_irq_set_type, .irq_set_type = tc3589x_gpio_irq_set_type,
}; };
static irqreturn_t tc3589x_gpio_irq(int irq, void *dev) static irqreturn_t tc3589x_gpio_irq(int irq, void *dev)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment