Skip to content

Commit

Permalink
pinctrl: imx27: fix offset calculation in imx_read_2bit
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Chris Ruehl authored and Linus Walleij committed Feb 3, 2014
1 parent f17248e commit e3365d0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/pinctrl/pinctrl-imx1-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit e3365d0

Please sign in to comment.