diff options
author | Linus Walleij <linus.walleij@linaro.org> | 2013-12-04 08:48:17 -0500 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2013-12-04 08:48:17 -0500 |
commit | 33e0aae11e4854c792e9871f94da6d28bf2e2bb8 (patch) | |
tree | d75422fcd621bb1a4ec019f7ab625e3bc99ffaff /drivers/gpio/gpio-em.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-em.c')
-rw-r--r-- | drivers/gpio/gpio-em.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/drivers/gpio/gpio-em.c b/drivers/gpio/gpio-em.c index be7e3b92f986..1e98a9873967 100644 --- a/drivers/gpio/gpio-em.c +++ b/drivers/gpio/gpio-em.c | |||
@@ -99,6 +99,27 @@ static void em_gio_irq_enable(struct irq_data *d) | |||
99 | em_gio_write(p, GIO_IEN, BIT(irqd_to_hwirq(d))); | 99 | em_gio_write(p, GIO_IEN, BIT(irqd_to_hwirq(d))); |
100 | } | 100 | } |
101 | 101 | ||
102 | static unsigned int em_gio_irq_startup(struct irq_data *d) | ||
103 | { | ||
104 | struct em_gio_priv *p = irq_data_get_irq_chip_data(d); | ||
105 | |||
106 | if (gpio_lock_as_irq(&p->gpio_chip, irqd_to_hwirq(d))) | ||
107 | dev_err(p->gpio_chip.dev, | ||
108 | "unable to lock HW IRQ %lu for IRQ\n", | ||
109 | irqd_to_hwirq(d)); | ||
110 | em_gio_irq_enable(d); | ||
111 | return 0; | ||
112 | } | ||
113 | |||
114 | static void em_gio_irq_shutdown(struct irq_data *d) | ||
115 | { | ||
116 | struct em_gio_priv *p = irq_data_get_irq_chip_data(d); | ||
117 | |||
118 | em_gio_irq_disable(d); | ||
119 | gpio_unlock_as_irq(&p->gpio_chip, irqd_to_hwirq(d)); | ||
120 | } | ||
121 | |||
122 | |||
102 | #define GIO_ASYNC(x) (x + 8) | 123 | #define GIO_ASYNC(x) (x + 8) |
103 | 124 | ||
104 | static unsigned char em_gio_sense_table[IRQ_TYPE_SENSE_MASK + 1] = { | 125 | static unsigned char em_gio_sense_table[IRQ_TYPE_SENSE_MASK + 1] = { |
@@ -338,6 +359,8 @@ static int em_gio_probe(struct platform_device *pdev) | |||
338 | irq_chip->irq_mask = em_gio_irq_disable; | 359 | irq_chip->irq_mask = em_gio_irq_disable; |
339 | irq_chip->irq_unmask = em_gio_irq_enable; | 360 | irq_chip->irq_unmask = em_gio_irq_enable; |
340 | irq_chip->irq_set_type = em_gio_irq_set_type; | 361 | irq_chip->irq_set_type = em_gio_irq_set_type; |
362 | irq_chip->irq_startup = em_gio_irq_startup; | ||
363 | irq_chip->irq_shutdown = em_gio_irq_shutdown; | ||
341 | irq_chip->flags = IRQCHIP_SKIP_SET_WAKE | IRQCHIP_MASK_ON_SUSPEND; | 364 | irq_chip->flags = IRQCHIP_SKIP_SET_WAKE | IRQCHIP_MASK_ON_SUSPEND; |
342 | 365 | ||
343 | p->irq_domain = irq_domain_add_simple(pdev->dev.of_node, | 366 | p->irq_domain = irq_domain_add_simple(pdev->dev.of_node, |