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. Signed-off-by: Chris Ruehl <chris.ruehl@xxxxxxxxxxxx> --- drivers/pinctrl/pinctrl-imx1-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pinctrl/pinctrl-imx1-core.c b/drivers/pinctrl/pinctrl-imx1-core.c index 8dfc3dc..59a16b6 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) -- 1.7.10.4 _______________________________________________ linux-arm mailing list linux-arm@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/linux-arm
- Follow-Ups:
- Re: [PATCH 2/2 v2] imx27: pinctrl: fix offset calculation in imx_read_2bit
- From: Linus Walleij
- Re: [PATCH 2/2 v2] imx27: pinctrl: fix offset calculation in imx_read_2bit
- From: Linus Walleij
- Re: [PATCH 2/2 v2] imx27: pinctrl: fix offset calculation in imx_read_2bit
- References:
- [PATCH 1/2 v2] imx27: pinctrl: fix wrong offset to ICONFB
- From: Chris Ruehl
- [PATCH 1/2 v2] imx27: pinctrl: fix wrong offset to ICONFB
- Prev by Date: [PATCH 1/2 v2] imx27: pinctrl: fix wrong offset to ICONFB
- Next by Date: Re: imx27: pinctrl: GPIO set output value failed
- Previous by thread: [PATCH 1/2 v2] imx27: pinctrl: fix wrong offset to ICONFB
- Next by thread: Re: [PATCH 2/2 v2] imx27: pinctrl: fix offset calculation in imx_read_2bit
- Index(es):