Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e3365d09 authored by Chris Ruehl's avatar Chris Ruehl Committed by Linus Walleij
Browse files

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: default avatarChris Ruehl <chris.ruehl@gtsys.com.hk>
Reviewed-by: default avatarMarkus Pargmann <mpa@pengutronix.de>
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent f17248ed
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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)