aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Ruehl <chris.ruehl@gtsys.com.hk>2014-01-21 22:14:52 -0500
committerLinus Walleij <linus.walleij@linaro.org>2014-02-03 03:08:09 -0500
commite3365d0974ed64157f5b5a576c611057dc40a595 (patch)
treebafeb57891b2ec400f85e369191086fd89f12a29
parentf17248ed868767567298e1cdf06faf8159a81f7c (diff)
pinctrl: imx27: fix offset calculation in imx_read_2bit
The offset for the 2bit register calculate wrong, this patch fixes the problem. The debugfs printout for oconf, iconfa, iconfb now shows the real values. Cc: stable@vger.kernel.org Signed-off-by: Chris Ruehl <chris.ruehl@gtsys.com.hk> Reviewed-by: Markus Pargmann <mpa@pengutronix.de> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
-rw-r--r--drivers/pinctrl/pinctrl-imx1-core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/pinctrl/pinctrl-imx1-core.c b/drivers/pinctrl/pinctrl-imx1-core.c
index 9e7893fe96e0..815384b377b5 100644
--- a/drivers/pinctrl/pinctrl-imx1-core.c
+++ b/drivers/pinctrl/pinctrl-imx1-core.c
@@ -139,7 +139,7 @@ static int imx1_read_2bit(struct imx1_pinctrl *ipctl, unsigned int pin_id,
139 u32 reg_offset) 139 u32 reg_offset)
140{ 140{
141 void __iomem *reg = imx1_mem(ipctl, pin_id) + reg_offset; 141 void __iomem *reg = imx1_mem(ipctl, pin_id) + reg_offset;
142 int offset = pin_id % 16; 142 int offset = (pin_id % 16) * 2;
143 143
144 /* Use the next register if the pin's port pin number is >=16 */ 144 /* Use the next register if the pin's port pin number is >=16 */
145 if (pin_id % 32 >= 16) 145 if (pin_id % 32 >= 16)