a4c8cf4fef14d2efc1a4d2f561c5f58caa1c411c
[openwrt/staging/wigyori.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 --- a/drivers/pinctrl/pinctrl-xway.c
16 +++ b/drivers/pinctrl/pinctrl-xway.c
17 @@ -494,7 +494,10 @@ static int xway_pinconf_set(struct pinct
18 reg = GPIO3_OD;
19 else
20 reg = GPIO_OD(pin);
21 - gpio_setbit(info->membase[0], reg, PORT_PIN(pin));
22 + if (arg == 0)
23 + gpio_setbit(info->membase[0], reg, PORT_PIN(pin));
24 + else
25 + gpio_clearbit(info->membase[0], reg, PORT_PIN(pin));
26 break;
27
28 case LTQ_PINCONF_PARAM_PULL: