aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpio/gpio-dwapb.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpio/gpio-dwapb.c')
-rw-r--r--drivers/gpio/gpio-dwapb.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/gpio/gpio-dwapb.c b/drivers/gpio/gpio-dwapb.c
index 2797fbb535d0..ed5711f77e2d 100644
--- a/drivers/gpio/gpio-dwapb.c
+++ b/drivers/gpio/gpio-dwapb.c
@@ -136,26 +136,26 @@ static void dwapb_irq_disable(struct irq_data *d)
136 spin_unlock_irqrestore(&bgc->lock, flags); 136 spin_unlock_irqrestore(&bgc->lock, flags);
137} 137}
138 138
139static unsigned int dwapb_irq_startup(struct irq_data *d) 139static int dwapb_irq_reqres(struct irq_data *d)
140{ 140{
141 struct irq_chip_generic *igc = irq_data_get_irq_chip_data(d); 141 struct irq_chip_generic *igc = irq_data_get_irq_chip_data(d);
142 struct dwapb_gpio *gpio = igc->private; 142 struct dwapb_gpio *gpio = igc->private;
143 struct bgpio_chip *bgc = &gpio->ports[0].bgc; 143 struct bgpio_chip *bgc = &gpio->ports[0].bgc;
144 144
145 if (gpio_lock_as_irq(&bgc->gc, irqd_to_hwirq(d))) 145 if (gpio_lock_as_irq(&bgc->gc, irqd_to_hwirq(d))) {
146 dev_err(gpio->dev, "unable to lock HW IRQ %lu for IRQ\n", 146 dev_err(gpio->dev, "unable to lock HW IRQ %lu for IRQ\n",
147 irqd_to_hwirq(d)); 147 irqd_to_hwirq(d));
148 dwapb_irq_enable(d); 148 return -EINVAL;
149 }
149 return 0; 150 return 0;
150} 151}
151 152
152static void dwapb_irq_shutdown(struct irq_data *d) 153static void dwapb_irq_relres(struct irq_data *d)
153{ 154{
154 struct irq_chip_generic *igc = irq_data_get_irq_chip_data(d); 155 struct irq_chip_generic *igc = irq_data_get_irq_chip_data(d);
155 struct dwapb_gpio *gpio = igc->private; 156 struct dwapb_gpio *gpio = igc->private;
156 struct bgpio_chip *bgc = &gpio->ports[0].bgc; 157 struct bgpio_chip *bgc = &gpio->ports[0].bgc;
157 158
158 dwapb_irq_disable(d);
159 gpio_unlock_as_irq(&bgc->gc, irqd_to_hwirq(d)); 159 gpio_unlock_as_irq(&bgc->gc, irqd_to_hwirq(d));
160} 160}
161 161
@@ -255,8 +255,8 @@ static void dwapb_configure_irqs(struct dwapb_gpio *gpio,
255 ct->chip.irq_set_type = dwapb_irq_set_type; 255 ct->chip.irq_set_type = dwapb_irq_set_type;
256 ct->chip.irq_enable = dwapb_irq_enable; 256 ct->chip.irq_enable = dwapb_irq_enable;
257 ct->chip.irq_disable = dwapb_irq_disable; 257 ct->chip.irq_disable = dwapb_irq_disable;
258 ct->chip.irq_startup = dwapb_irq_startup; 258 ct->chip.irq_request_resources = dwapb_irq_reqres;
259 ct->chip.irq_shutdown = dwapb_irq_shutdown; 259 ct->chip.irq_release_resources = dwapb_irq_relres;
260 ct->regs.ack = GPIO_PORTA_EOI; 260 ct->regs.ack = GPIO_PORTA_EOI;
261 ct->regs.mask = GPIO_INTMASK; 261 ct->regs.mask = GPIO_INTMASK;
262 262