From 933862873740923a059cbcda0c66487c6179ba3c Mon Sep 17 00:00:00 2001 From: John Crispin Date: Fri, 1 Feb 2013 13:04:59 +0100 Subject: [PATCH] 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 Signed-off-by: Linus Walleij --- drivers/pinctrl/pinctrl-xway.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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: -- 2.39.5