forked from Minki/linux
gpio: timbgpio: irq_data conversion
Converts irq_chips and flow handlers over to the new struct irq_data based irq_chip functions. Signed-off-by: Lennert Buytenhek <buytenh@secretlab.ca> Cc: Richard Röjfors <richard.rojfors@mocean-labs.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
33fcc1b802
commit
a1f5f22adc
@ -109,10 +109,10 @@ static int timbgpio_to_irq(struct gpio_chip *gpio, unsigned offset)
|
||||
/*
|
||||
* GPIO IRQ
|
||||
*/
|
||||
static void timbgpio_irq_disable(unsigned irq)
|
||||
static void timbgpio_irq_disable(struct irq_data *d)
|
||||
{
|
||||
struct timbgpio *tgpio = get_irq_chip_data(irq);
|
||||
int offset = irq - tgpio->irq_base;
|
||||
struct timbgpio *tgpio = irq_data_get_irq_chip_data(d);
|
||||
int offset = d->irq - tgpio->irq_base;
|
||||
unsigned long flags;
|
||||
|
||||
spin_lock_irqsave(&tgpio->lock, flags);
|
||||
@ -121,10 +121,10 @@ static void timbgpio_irq_disable(unsigned irq)
|
||||
spin_unlock_irqrestore(&tgpio->lock, flags);
|
||||
}
|
||||
|
||||
static void timbgpio_irq_enable(unsigned irq)
|
||||
static void timbgpio_irq_enable(struct irq_data *d)
|
||||
{
|
||||
struct timbgpio *tgpio = get_irq_chip_data(irq);
|
||||
int offset = irq - tgpio->irq_base;
|
||||
struct timbgpio *tgpio = irq_data_get_irq_chip_data(d);
|
||||
int offset = d->irq - tgpio->irq_base;
|
||||
unsigned long flags;
|
||||
|
||||
spin_lock_irqsave(&tgpio->lock, flags);
|
||||
@ -133,10 +133,10 @@ static void timbgpio_irq_enable(unsigned irq)
|
||||
spin_unlock_irqrestore(&tgpio->lock, flags);
|
||||
}
|
||||
|
||||
static int timbgpio_irq_type(unsigned irq, unsigned trigger)
|
||||
static int timbgpio_irq_type(struct irq_data *d, unsigned trigger)
|
||||
{
|
||||
struct timbgpio *tgpio = get_irq_chip_data(irq);
|
||||
int offset = irq - tgpio->irq_base;
|
||||
struct timbgpio *tgpio = irq_data_get_irq_chip_data(d);
|
||||
int offset = d->irq - tgpio->irq_base;
|
||||
unsigned long flags;
|
||||
u32 lvr, flr, bflr = 0;
|
||||
u32 ver;
|
||||
@ -193,13 +193,13 @@ out:
|
||||
return ret;
|
||||
}
|
||||
|
||||
static void timbgpio_irq(unsigned int irq, struct irq_desc *desc)
|
||||
static void timbgpio_irq(struct irq_data *d, struct irq_desc *desc)
|
||||
{
|
||||
struct timbgpio *tgpio = get_irq_data(irq);
|
||||
struct timbgpio *tgpio = irq_data_get_irq_data(d);
|
||||
unsigned long ipr;
|
||||
int offset;
|
||||
|
||||
desc->chip->ack(irq);
|
||||
desc->irq_data.chip->ack(irq_get_irq_data(d));
|
||||
ipr = ioread32(tgpio->membase + TGPIO_IPR);
|
||||
iowrite32(ipr, tgpio->membase + TGPIO_ICR);
|
||||
|
||||
@ -217,9 +217,9 @@ static void timbgpio_irq(unsigned int irq, struct irq_desc *desc)
|
||||
|
||||
static struct irq_chip timbgpio_irqchip = {
|
||||
.name = "GPIO",
|
||||
.enable = timbgpio_irq_enable,
|
||||
.disable = timbgpio_irq_disable,
|
||||
.set_type = timbgpio_irq_type,
|
||||
.irq_enable = timbgpio_irq_enable,
|
||||
.irq_disable = timbgpio_irq_disable,
|
||||
.irq_set_type = timbgpio_irq_type,
|
||||
};
|
||||
|
||||
static int __devinit timbgpio_probe(struct platform_device *pdev)
|
||||
|
Loading…
Reference in New Issue
Block a user