@@ -230,6 +230,7 @@ static void tc3589x_gpio_irq_mask(struct irq_data *d)
230
230
231
231
tc3589x_gpio -> regs [REG_IE ][regoffset ] &= ~mask ;
232
232
tc3589x_gpio -> regs [REG_DIRECT ][regoffset ] |= mask ;
233
+ gpiochip_disable_irq (gc , offset );
233
234
}
234
235
235
236
static void tc3589x_gpio_irq_unmask (struct irq_data * d )
@@ -240,17 +241,20 @@ static void tc3589x_gpio_irq_unmask(struct irq_data *d)
240
241
int regoffset = offset / 8 ;
241
242
int mask = BIT (offset % 8 );
242
243
244
+ gpiochip_enable_irq (gc , offset );
243
245
tc3589x_gpio -> regs [REG_IE ][regoffset ] |= mask ;
244
246
tc3589x_gpio -> regs [REG_DIRECT ][regoffset ] &= ~mask ;
245
247
}
246
248
247
- static struct irq_chip tc3589x_gpio_irq_chip = {
249
+ static const struct irq_chip tc3589x_gpio_irq_chip = {
248
250
.name = "tc3589x-gpio" ,
249
251
.irq_bus_lock = tc3589x_gpio_irq_lock ,
250
252
.irq_bus_sync_unlock = tc3589x_gpio_irq_sync_unlock ,
251
253
.irq_mask = tc3589x_gpio_irq_mask ,
252
254
.irq_unmask = tc3589x_gpio_irq_unmask ,
253
255
.irq_set_type = tc3589x_gpio_irq_set_type ,
256
+ .flags = IRQCHIP_IMMUTABLE ,
257
+ GPIOCHIP_IRQ_RESOURCE_HELPERS ,
254
258
};
255
259
256
260
static irqreturn_t tc3589x_gpio_irq (int irq , void * dev )
@@ -321,7 +325,7 @@ static int tc3589x_gpio_probe(struct platform_device *pdev)
321
325
tc3589x_gpio -> chip .base = -1 ;
322
326
323
327
girq = & tc3589x_gpio -> chip .irq ;
324
- girq -> chip = & tc3589x_gpio_irq_chip ;
328
+ gpio_irq_chip_set_chip ( girq , & tc3589x_gpio_irq_chip ) ;
325
329
/* This will let us handle the parent IRQ in the driver */
326
330
girq -> parent_handler = NULL ;
327
331
girq -> num_parents = 0 ;
0 commit comments