summaryrefslogtreecommitdiffstats
path: root/arch/sh/kernel/gpio.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sh/kernel/gpio.c')
-rw-r--r--arch/sh/kernel/gpio.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/arch/sh/kernel/gpio.c b/arch/sh/kernel/gpio.c
index bb8b812c6895..d37165361034 100644
--- a/arch/sh/kernel/gpio.c
+++ b/arch/sh/kernel/gpio.c
@@ -267,9 +267,13 @@ int pinmux_config_gpio(struct pinmux_info *gpioc, unsigned gpio,
break;
in_range = enum_in_range(enum_id, &gpioc->function);
- if (!in_range && range)
+ if (!in_range && range) {
in_range = enum_in_range(enum_id, range);
+ if (in_range && enum_id == range->force)
+ continue;
+ }
+
if (!in_range)
continue;
@@ -432,7 +436,7 @@ static int __gpio_get_set_value(struct pinmux_info *gpioc,
BUG();
else
value = read_write_reg(dr->reg, dr->reg_width,
- 1, bit, value, do_write);
+ 1, bit, !!value, do_write);
return value;
}