summaryrefslogtreecommitdiff
path: root/drivers/pinctrl/pinctrl-xway.c
diff options
context:
space:
mode:
authorJohn Crispin <blogic@openwrt.org>2013-02-01 13:04:59 +0100
committerLinus Walleij <linus.walleij@linaro.org>2013-02-05 16:17:23 +0100
commit933862873740923a059cbcda0c66487c6179ba3c (patch)
treeb44fc635ff73d189e3a6c96b66b3189cde48d482 /drivers/pinctrl/pinctrl-xway.c
parent6360350cbc0567f51afacb2d1e6a8e611b3b9b2b (diff)
pinctrl/lantiq: the pinconf OD parameter argument was ignored
When setting the OpenDrain bit we should really honour the argument passed inside the devicetree. Signed-off-by: John Crispin <blogic@openwrt.org> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/pinctrl/pinctrl-xway.c')
-rw-r--r--drivers/pinctrl/pinctrl-xway.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/pinctrl/pinctrl-xway.c b/drivers/pinctrl/pinctrl-xway.c
index b23b8954ae31..53cb6a3a56ed 100644
--- a/drivers/pinctrl/pinctrl-xway.c
+++ b/drivers/pinctrl/pinctrl-xway.c
@@ -494,7 +494,10 @@ static int xway_pinconf_set(struct pinctrl_dev *pctldev,
reg = GPIO3_OD;
else
reg = GPIO_OD(pin);
- gpio_setbit(info->membase[0], reg, PORT_PIN(pin));
+ if (arg == 0)
+ gpio_setbit(info->membase[0], reg, PORT_PIN(pin));
+ else
+ gpio_clearbit(info->membase[0], reg, PORT_PIN(pin));
break;
case LTQ_PINCONF_PARAM_PULL: