brcm47xx: add new led and button support
[openwrt.git] / target / linux / brcm47xx / patches-3.10 / 101-bcma-gpio-fix-irq-handling.patch
1 --- a/drivers/bcma/driver_gpio.c
2 +++ b/drivers/bcma/driver_gpio.c
3 @@ -91,7 +91,9 @@ static void bcma_gpio_irq_unmask(struct
4  {
5         struct bcma_drv_cc *cc = irq_data_get_irq_chip_data(d);
6         int gpio = irqd_to_hwirq(d);
7 +       u32 val = bcma_chipco_gpio_in(cc, BIT(gpio));
8  
9 +       bcma_chipco_gpio_polarity(cc, BIT(gpio), val);
10         bcma_chipco_gpio_intmask(cc, BIT(gpio), BIT(gpio));
11  }
12  
13 @@ -156,6 +158,7 @@ static int bcma_gpio_irq_domain_init(str
14         if (err)
15                 goto err_req_irq;
16  
17 +       bcma_chipco_gpio_intmask(cc, ~0, 0);
18         bcma_cc_set32(cc, BCMA_CC_IRQMASK, BCMA_CC_IRQ_GPIO);
19  
20         return 0;