d2b764f98a1846c5a787ba8fed5355593a6ba6d8
[openwrt/staging/dangole.git] /
1 From 6b37913f47f5fbd2748ea9abfb9a17fcfb1b5d29 Mon Sep 17 00:00:00 2001
2 From: Phil Elwell <phil@raspberrypi.org>
3 Date: Thu, 26 Feb 2015 09:58:22 +0000
4 Subject: [PATCH] pinctrl-bcm2835: Only request the interrupts listed in the
5 DTB
6
7 Although the GPIO controller can generate three interrupts (four counting
8 the common one), the device tree files currently only specify two. In the
9 absence of the third, simply don't register that interrupt (as opposed to
10 registering 0), which has the effect of making it impossible to generate
11 interrupts for GPIOs 46-53 which, since they share pins with the SD card
12 interface, is unlikely to be a problem.
13 ---
14 drivers/pinctrl/bcm/pinctrl-bcm2835.c | 2 ++
15 1 file changed, 2 insertions(+)
16
17 --- a/drivers/pinctrl/bcm/pinctrl-bcm2835.c
18 +++ b/drivers/pinctrl/bcm/pinctrl-bcm2835.c
19 @@ -1042,6 +1042,8 @@ static int bcm2835_pinctrl_probe(struct
20 int len;
21 char *name;
22 pc->irq[i] = irq_of_parse_and_map(np, i);
23 + if (pc->irq[i] == 0)
24 + break;
25 pc->irq_data[i].pc = pc;
26 pc->irq_data[i].irqgroup = i;
27