Browse Source

pinctrl: abx500: fix abx500_config_pull_updown

Fix abx500_config_pull_updown() to set correct bit in
AB8540_GPIO_PULL_UPDOWN_REG.

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Patrice Chotard 12 years ago
parent
commit
10a8be5414
1 changed files with 1 additions and 1 deletions
  1. 1 1
      drivers/pinctrl/pinctrl-abx500.c

+ 1 - 1
drivers/pinctrl/pinctrl-abx500.c

@@ -203,7 +203,7 @@ static int abx500_config_pull_updown(struct abx500_pinctrl *pct,
 		goto out;
 	}
 
-	pos = offset << 1;
+	pos = (offset - pullud->first_pin) << 1;
 
 	ret = abx500_mask_and_set_register_interruptible(pct->dev,
 			AB8500_MISC, AB8540_GPIO_PULL_UPDOWN_REG,