Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 181127
b: refs/heads/master
c: 50dd314
h: refs/heads/master
i:
  181125: a348feb
  181123: 10d80fe
  181119: e118208
v: v3
  • Loading branch information
Magnus Damm authored and Paul Mundt committed Jan 19, 2010
1 parent e9bf881 commit 0654d22
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 70911b861bfbba1851cbb3497635030f34703c7a
refs/heads/master: 50dd3145a58b5cef03a95c1b98765bcc847a72d0
37 changes: 32 additions & 5 deletions trunk/drivers/sh/pfc.c
Original file line number Diff line number Diff line change
Expand Up @@ -337,12 +337,39 @@ static int pinmux_config_gpio(struct pinmux_info *gpioc, unsigned gpio,
if (!enum_id)
break;

/* first check if this is a function enum */
in_range = enum_in_range(enum_id, &gpioc->function);
if (!in_range && range) {
in_range = enum_in_range(enum_id, range);

if (in_range && enum_id == range->force)
continue;
if (!in_range) {
/* not a function enum */
if (range) {
/*
* other range exists, so this pin is
* a regular GPIO pin that now is being
* bound to a specific direction.
*
* for this case we only allow function enums
* and the enums that match the other range.
*/
in_range = enum_in_range(enum_id, range);

/*
* special case pass through for fixed
* input-only or output-only pins without
* function enum register association.
*/
if (in_range && enum_id == range->force)
continue;
} else {
/*
* no other range exists, so this pin
* must then be of the function type.
*
* allow function type pins to select
* any combination of function/in/out
* in their MARK lists.
*/
in_range = 1;
}
}

if (!in_range)
Expand Down

0 comments on commit 0654d22

Please sign in to comment.