diff options
Diffstat (limited to 'drivers/gpio/gpio-adnp.c')
-rw-r--r-- | drivers/gpio/gpio-adnp.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/drivers/gpio/gpio-adnp.c b/drivers/gpio/gpio-adnp.c index b204033acaeb..a7b471977dc5 100644 --- a/drivers/gpio/gpio-adnp.c +++ b/drivers/gpio/gpio-adnp.c | |||
@@ -408,6 +408,27 @@ static void adnp_irq_bus_unlock(struct irq_data *data) | |||
408 | mutex_unlock(&adnp->irq_lock); | 408 | mutex_unlock(&adnp->irq_lock); |
409 | } | 409 | } |
410 | 410 | ||
411 | static unsigned int adnp_irq_startup(struct irq_data *data) | ||
412 | { | ||
413 | struct adnp *adnp = irq_data_get_irq_chip_data(data); | ||
414 | |||
415 | if (gpio_lock_as_irq(&adnp->gpio, data->hwirq)) | ||
416 | dev_err(adnp->gpio.dev, | ||
417 | "unable to lock HW IRQ %lu for IRQ\n", | ||
418 | data->hwirq); | ||
419 | /* Satisfy the .enable semantics by unmasking the line */ | ||
420 | adnp_irq_unmask(data); | ||
421 | return 0; | ||
422 | } | ||
423 | |||
424 | static void adnp_irq_shutdown(struct irq_data *data) | ||
425 | { | ||
426 | struct adnp *adnp = irq_data_get_irq_chip_data(data); | ||
427 | |||
428 | adnp_irq_mask(data); | ||
429 | gpio_unlock_as_irq(&adnp->gpio, data->hwirq); | ||
430 | } | ||
431 | |||
411 | static struct irq_chip adnp_irq_chip = { | 432 | static struct irq_chip adnp_irq_chip = { |
412 | .name = "gpio-adnp", | 433 | .name = "gpio-adnp", |
413 | .irq_mask = adnp_irq_mask, | 434 | .irq_mask = adnp_irq_mask, |
@@ -415,6 +436,8 @@ static struct irq_chip adnp_irq_chip = { | |||
415 | .irq_set_type = adnp_irq_set_type, | 436 | .irq_set_type = adnp_irq_set_type, |
416 | .irq_bus_lock = adnp_irq_bus_lock, | 437 | .irq_bus_lock = adnp_irq_bus_lock, |
417 | .irq_bus_sync_unlock = adnp_irq_bus_unlock, | 438 | .irq_bus_sync_unlock = adnp_irq_bus_unlock, |
439 | .irq_startup = adnp_irq_startup, | ||
440 | .irq_shutdown = adnp_irq_shutdown, | ||
418 | }; | 441 | }; |
419 | 442 | ||
420 | static int adnp_irq_map(struct irq_domain *domain, unsigned int irq, | 443 | static int adnp_irq_map(struct irq_domain *domain, unsigned int irq, |