aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh/kernel/gpio.c
diff options
context:
space:
mode:
authorMagnus Damm <damm@igel.co.jp>2008-10-22 05:29:17 -0400
committerPaul Mundt <lethal@linux-sh.org>2008-10-22 05:34:16 -0400
commit42eed42bac41c8106ed52b6b84409d84c0981e36 (patch)
tree2ba3f575af09ef9dcea7bb38e2ce7e39524562da /arch/sh/kernel/gpio.c
parent22ee3ba611e0aa73228ae64fa68d89c52367702a (diff)
sh: improve pinmux support for single direction pins
This patch improves the support for gpio pins that are hard wired to either input or output and lack control register association. A special force enum id is used to allow use without control register but still mark the gpio pin as input or output. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/kernel/gpio.c')
-rw-r--r--arch/sh/kernel/gpio.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/arch/sh/kernel/gpio.c b/arch/sh/kernel/gpio.c
index 9ac0b8e6c217..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,
267 break; 267 break;
268 268
269 in_range = enum_in_range(enum_id, &gpioc->function); 269 in_range = enum_in_range(enum_id, &gpioc->function);
270 if (!in_range && range) 270 if (!in_range && range) {
271 in_range = enum_in_range(enum_id, range); 271 in_range = enum_in_range(enum_id, range);
272 272
273 if (in_range && enum_id == range->force)
274 continue;
275 }
276
273 if (!in_range) 277 if (!in_range)
274 continue; 278 continue;
275 279