diff options
author | Linus Walleij <linus.walleij@linaro.org> | 2013-12-04 14:48:17 +0100 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2013-12-04 14:48:17 +0100 |
commit | 33e0aae11e4854c792e9871f94da6d28bf2e2bb8 (patch) | |
tree | d75422fcd621bb1a4ec019f7ab625e3bc99ffaff /drivers/gpio/gpio-adnp.c | |
parent | 9fb1f39eb2d6707d265087ee186376e24995f55a (diff) | |
parent | eb7cce1ea96b6399672abce787598f6e7a4352c3 (diff) |
Merge branch 'mark-irqs' into devel
Conflicts:
drivers/gpio/gpio-em.c
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 030a3897d9f7..6fc6206b38bd 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) mutex_unlock(&adnp->irq_lock); } +static unsigned int adnp_irq_startup(struct irq_data *data) +{ + struct adnp *adnp = irq_data_get_irq_chip_data(data); + + if (gpio_lock_as_irq(&adnp->gpio, data->hwirq)) + dev_err(adnp->gpio.dev, + "unable to lock HW IRQ %lu for IRQ\n", + data->hwirq); + /* Satisfy the .enable semantics by unmasking the line */ + adnp_irq_unmask(data); + return 0; +} + +static void adnp_irq_shutdown(struct irq_data *data) +{ + struct adnp *adnp = irq_data_get_irq_chip_data(data); + + adnp_irq_mask(data); + gpio_unlock_as_irq(&adnp->gpio, data->hwirq); +} + static struct irq_chip adnp_irq_chip = { .name = "gpio-adnp", .irq_mask = adnp_irq_mask, @@ -415,6 +436,8 @@ static struct irq_chip adnp_irq_chip = { .irq_set_type = adnp_irq_set_type, .irq_bus_lock = adnp_irq_bus_lock, .irq_bus_sync_unlock = adnp_irq_bus_unlock, + .irq_startup = adnp_irq_startup, + .irq_shutdown = adnp_irq_shutdown, }; static int adnp_irq_map(struct irq_domain *domain, unsigned int irq, |