Skip to content
Snippets Groups Projects
Commit 9035edba authored by Vladimir Barinov's avatar Vladimir Barinov Committed by Nobuhiro Iwamatsu
Browse files

gpio: sh-pfc: fix gpio input read


Fix gpio_read: gpio input (INDT) and gpio output (OUTDT) registers
have different offset. gpio_read must be performed from INDT.

Signed-off-by: default avatarVladimir Barinov <vladimir.barinov@cogentembedded.com>
Signed-off-by: default avatarNobuhiro Iwamatsu <iwamatsu@nigauri.org>
parent f875bbb4
No related branches found
No related tags found
No related merge requests found
...@@ -75,7 +75,8 @@ static int gpio_read_bit(struct pinmux_data_reg *dr, ...@@ -75,7 +75,8 @@ static int gpio_read_bit(struct pinmux_data_reg *dr,
debug("read_bit: addr = %lx, pos = %ld, " debug("read_bit: addr = %lx, pos = %ld, "
"r_width = %ld\n", dr->reg, pos, dr->reg_width); "r_width = %ld\n", dr->reg, pos, dr->reg_width);
return (gpio_read_raw_reg(dr->mapped_reg, dr->reg_width) >> pos) & 1; return
(gpio_read_raw_reg(dr->mapped_reg + 0x4, dr->reg_width) >> pos) & 1;
} }
static void gpio_write_bit(struct pinmux_data_reg *dr, static void gpio_write_bit(struct pinmux_data_reg *dr,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment