lantiq: enable portmaps again and set max port to 2
[openwrt.git] / target / linux / lantiq / patches-3.8 / 0010-PINCTRL-lantiq-only-probe-available-pad-controllers.patch
1 From 997390a8802e21b4b57d0ffcd91ad64651f1c2bf Mon Sep 17 00:00:00 2001
2 From: John Crispin <blogic@openwrt.org>
3 Date: Wed, 30 Jan 2013 20:02:06 +0100
4 Subject: [PATCH 10/40] PINCTRL: lantiq: only probe available pad controllers
5
6 The template falcon.dtsi lists all 6 pad controllers that can be loaded. Only
7 probe those that have status = "okay"; inside the dts file.
8
9 Signed-off-by: John Crispin <blogic@openwrt.org>
10 ---
11  drivers/pinctrl/pinctrl-falcon.c |    3 +++
12  1 file changed, 3 insertions(+)
13
14 --- a/drivers/pinctrl/pinctrl-falcon.c
15 +++ b/drivers/pinctrl/pinctrl-falcon.c
16 @@ -398,6 +398,9 @@ static int pinctrl_falcon_probe(struct p
17                 u32 avail;
18                 int pins;
19  
20 +               if (!of_device_is_available(np))
21 +                       continue;
22 +
23                 if (!ppdev) {
24                         dev_err(&pdev->dev, "failed to find pad pdev\n");
25                         continue;