From da94d78f22d9d96e2e82a3443637ccb9f3d203af Mon Sep 17 00:00:00 2001 From: kfx Date: Mon, 7 Jan 2013 09:40:24 +0800 Subject: [PATCH] iomux: fixed bug: gpio_to_mode --- arch/arm/plat-rk/iomux.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/arch/arm/plat-rk/iomux.c b/arch/arm/plat-rk/iomux.c index 00abf07be6c4..74df016644f5 100644 --- a/arch/arm/plat-rk/iomux.c +++ b/arch/arm/plat-rk/iomux.c @@ -65,8 +65,7 @@ int iomux_gpio_to_mode(int gpio) off = gpio - PIN_BASE; m.mux.bank = off/32; m.mux.goff = (off%32)/8 + 0x0A; - m.mux.off = off%256; - + m.mux.off = (off%32)%8; if(!mode_is_valid(m.mode)){ INFO("<%s> gpio(gpio%d_%x%d) is invalid\n", __func__, m.mux.bank, m.mux.goff, m.mux.off); -- 2.34.1