projects
/
firefly-linux-kernel-4.4.55.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d28e033
)
iomux: fixed bug: gpio_to_mode
author
kfx
<kfx@rock-chips.com>
Mon, 7 Jan 2013 01:40:24 +0000
(09:40 +0800)
committer
kfx
<kfx@rock-chips.com>
Mon, 7 Jan 2013 01:40:24 +0000
(09:40 +0800)
arch/arm/plat-rk/iomux.c
patch
|
blob
|
history
diff --git
a/arch/arm/plat-rk/iomux.c
b/arch/arm/plat-rk/iomux.c
index 00abf07be6c4f26cdb724a8b77e1469c793ebc32..74df016644f579fd099b8bed8135283349a9d8d8 100644
(file)
--- 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);