diff options
author | Chris Ruehl <chris.ruehl@gtsys.com.hk> | 2014-01-22 11:14:52 +0800 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2014-02-03 09:08:09 +0100 |
commit | e3365d0974ed64157f5b5a576c611057dc40a595 (patch) | |
tree | bafeb57891b2ec400f85e369191086fd89f12a29 /drivers/pinctrl/pinctrl-imx1-core.c | |
parent | f17248ed868767567298e1cdf06faf8159a81f7c (diff) | |
download | blackbird-op-linux-e3365d0974ed64157f5b5a576c611057dc40a595.tar.gz blackbird-op-linux-e3365d0974ed64157f5b5a576c611057dc40a595.zip |
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/pinctrl-imx1-core.c')
-rw-r--r-- | drivers/pinctrl/pinctrl-imx1-core.c | 2 |
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) |