bump to v3.8
[openwrt/openwrt.git] / target / linux / lantiq / patches-3.8 / 0009-PINCTRL-lantiq-the-pinconf-OD-parameter-argument-was.patch
1 From 879fe8a24167983d2923f635cb37dc9e02f6cf57 Mon Sep 17 00:00:00 2001
2 From: John Crispin <blogic@openwrt.org>
3 Date: Wed, 30 Jan 2013 18:39:34 +0100
4 Subject: [PATCH 09/40] PINCTRL: lantiq: the pinconf OD parameter argument was
5 ignored
6
7 When setting the OpenDrain bit we should really honour the argument passed
8 inside the devicetree.
9
10 Signed-off-by: John Crispin <blogic@openwrt.org>
11 ---
12 drivers/pinctrl/pinctrl-xway.c | 5 ++++-
13 1 file changed, 4 insertions(+), 1 deletion(-)
14
15 diff --git a/drivers/pinctrl/pinctrl-xway.c b/drivers/pinctrl/pinctrl-xway.c
16 index b23b895..53cb6a3 100644
17 --- a/drivers/pinctrl/pinctrl-xway.c
18 +++ b/drivers/pinctrl/pinctrl-xway.c
19 @@ -494,7 +494,10 @@ static int xway_pinconf_set(struct pinctrl_dev *pctldev,
20 reg = GPIO3_OD;
21 else
22 reg = GPIO_OD(pin);
23 - gpio_setbit(info->membase[0], reg, PORT_PIN(pin));
24 + if (arg == 0)
25 + gpio_setbit(info->membase[0], reg, PORT_PIN(pin));
26 + else
27 + gpio_clearbit(info->membase[0], reg, PORT_PIN(pin));
28 break;
29
30 case LTQ_PINCONF_PARAM_PULL:
31 --
32 1.7.10.4
33