Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 127066
b: refs/heads/master
c: 8eb3e3b
h: refs/heads/master
v: v3
  • Loading branch information
Graf Yang authored and Bryan Wu committed Nov 18, 2008
1 parent 9439b60 commit 3882f35
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 4 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: 30af6d490427b49af5beca5824e22b00e468c951
refs/heads/master: 8eb3e3bfd5544c4549a52e3cfc3df2be0b224dbd
4 changes: 2 additions & 2 deletions trunk/arch/blackfin/kernel/bfin_gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -1257,10 +1257,10 @@ static int gpio_proc_read(char *buf, char **start, off_t offset,

for (c = 0; c < MAX_RESOURCES; c++) {
if (!check_gpio(c) && (reserved_gpio_map[gpio_bank(c)] & gpio_bit(c)))
len = sprintf(buf, "GPIO_%d: %s \t\tGPIO %s\n", c,
len = sprintf(buf, "GPIO_%d: \t%s \t\tGPIO %s\n", c,
get_label(c), get_gpio_dir(c) ? "OUTPUT" : "INPUT");
else if (reserved_peri_map[gpio_bank(c)] & gpio_bit(c))
len = sprintf(buf, "GPIO_%d: %s \t\tPeripheral\n", c, get_label(c));
len = sprintf(buf, "GPIO_%d: \t%s \t\tPeripheral\n", c, get_label(c));
else
continue;
buf += len;
Expand Down
15 changes: 14 additions & 1 deletion trunk/arch/blackfin/mach-common/ints-priority.c
Original file line number Diff line number Diff line change
Expand Up @@ -437,8 +437,15 @@ static void bfin_gpio_irq_shutdown(unsigned int irq)

static int bfin_gpio_irq_type(unsigned int irq, unsigned int type)
{
int ret;
char buf[16];
u32 gpionr = irq_to_gpio(irq);

snprintf(buf, 16, "gpio-irq%d", irq);
ret = bfin_gpio_request(gpionr, buf);
if (ret)
return ret;

if (type == IRQ_TYPE_PROBE) {
/* only probe unenabled GPIO interrupt lines */
if (__test_bit(gpionr, gpio_enabled))
Expand Down Expand Up @@ -738,7 +745,8 @@ static void bfin_gpio_irq_shutdown(unsigned int irq)

static int bfin_gpio_irq_type(unsigned int irq, unsigned int type)
{

int ret;
char buf[16];
u32 gpionr = irq_to_gpio(irq);
u32 pint_val = irq2pint_lut[irq - SYS_IRQS];
u32 pintbit = PINT_BIT(pint_val);
Expand All @@ -747,6 +755,11 @@ static int bfin_gpio_irq_type(unsigned int irq, unsigned int type)
if (pint_val == IRQ_NOT_AVAIL)
return -ENODEV;

snprintf(buf, 16, "gpio-irq%d", irq);
ret = bfin_gpio_request(gpionr, buf);
if (ret)
return ret;

if (type == IRQ_TYPE_PROBE) {
/* only probe unenabled GPIO interrupt lines */
if (__test_bit(gpionr, gpio_enabled))
Expand Down

0 comments on commit 3882f35

Please sign in to comment.