summaryrefslogtreecommitdiffstats
path: root/drivers/pinctrl
diff options
context:
space:
mode:
authorChris Ruehl <chris.ruehl@gtsys.com.hk>2014-01-22 11:14:52 +0800
committerLinus Walleij <linus.walleij@linaro.org>2014-02-03 09:08:09 +0100
commite3365d0974ed64157f5b5a576c611057dc40a595 (patch)
treebafeb57891b2ec400f85e369191086fd89f12a29 /drivers/pinctrl
parentf17248ed868767567298e1cdf06faf8159a81f7c (diff)
downloadlinux-e3365d0974ed64157f5b5a576c611057dc40a595.tar.bz2
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>
Diffstat (limited to 'drivers/pinctrl')
-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,
u32 reg_offset)
{
void __iomem *reg = imx1_mem(ipctl, pin_id) + reg_offset;
- int offset = pin_id % 16;
+ int offset = (pin_id % 16) * 2;
/* Use the next register if the pin's port pin number is >=16 */
if (pin_id % 32 >= 16)