9ea301b0e98e2a839d45597a718bbc4b9e329b17
[openwrt/staging/yousong.git] / target / linux / lantiq / patches-3.8 / 0015-PINCTRL-lantiq-fix-pin-number-in-ltq_pmx_gpio_reques.patch
1 From 363f0d3dc146215744363db97606a357310fad3d Mon Sep 17 00:00:00 2001
2 From: John Crispin <blogic@openwrt.org>
3 Date: Wed, 30 Jan 2013 21:23:22 +0100
4 Subject: [PATCH 15/40] PINCTRL: lantiq: fix pin number in
5 ltq_pmx_gpio_request_enable
6
7 The mapping logic inside ltq_pmx_gpio_request_enable() was broken. This only
8 effected Falcon SoC.
9
10 Signed-off-by: Thomas Langer <thomas.langer@lantiq.com>
11 Signed-off-by: John Crispin <blogic@openwrt.org>
12 ---
13 drivers/pinctrl/pinctrl-lantiq.c | 2 +-
14 1 file changed, 1 insertion(+), 1 deletion(-)
15
16 diff --git a/drivers/pinctrl/pinctrl-lantiq.c b/drivers/pinctrl/pinctrl-lantiq.c
17 index 7d11072..a703846 100644
18 --- a/drivers/pinctrl/pinctrl-lantiq.c
19 +++ b/drivers/pinctrl/pinctrl-lantiq.c
20 @@ -294,7 +294,7 @@ static int ltq_pmx_gpio_request_enable(struct pinctrl_dev *pctrldev,
21 unsigned pin)
22 {
23 struct ltq_pinmux_info *info = pinctrl_dev_get_drvdata(pctrldev);
24 - int mfp = match_mfp(info, pin + (range->id * 32));
25 + int mfp = match_mfp(info, pin);
26 int pin_func;
27
28 if (mfp < 0) {
29 --
30 1.7.10.4
31