Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 252575
b: refs/heads/master
c: 8ea72a3
h: refs/heads/master
i:
  252573: 81b8e55
  252571: c575294
  252567: ac07a6c
  252559: 8793b95
  252543: 767469c
v: v3
  • Loading branch information
Rabin Vincent authored and Grant Likely committed May 26, 2011
1 parent 725b5c5 commit 8462576
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 5 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: 37d72457644a1ded37d57dd9ae664e4e228a034d
refs/heads/master: 8ea72a30a31c30ec7fa0c30c743b2cec0712d143
31 changes: 27 additions & 4 deletions trunk/drivers/gpio/gpio-nomadik.c
Original file line number Diff line number Diff line change
Expand Up @@ -811,20 +811,43 @@ static void nmk_gpio_dbg_show(struct seq_file *s, struct gpio_chip *chip)
bool pull;
u32 bit = 1 << i;

if (!label)
continue;

is_out = readl(nmk_chip->addr + NMK_GPIO_DIR) & bit;
pull = !(readl(nmk_chip->addr + NMK_GPIO_PDIS) & bit);
mode = nmk_gpio_get_mode(gpio);
seq_printf(s, " gpio-%-3d (%-20.20s) %s %s %s %s",
gpio, label,
gpio, label ?: "(none)",
is_out ? "out" : "in ",
chip->get
? (chip->get(chip, i) ? "hi" : "lo")
: "? ",
(mode < 0) ? "unknown" : modes[mode],
pull ? "pull" : "none");

if (label && !is_out) {
int irq = gpio_to_irq(gpio);
struct irq_desc *desc = irq_to_desc(irq);

/* This races with request_irq(), set_irq_type(),
* and set_irq_wake() ... but those are "rare".
*/
if (irq >= 0 && desc->action) {
char *trigger;
u32 bitmask = nmk_gpio_get_bitmask(gpio);

if (nmk_chip->edge_rising & bitmask)
trigger = "edge-rising";
else if (nmk_chip->edge_falling & bitmask)
trigger = "edge-falling";
else
trigger = "edge-undefined";

seq_printf(s, " irq-%d %s%s",
irq, trigger,
irqd_is_wakeup_set(&desc->irq_data)
? " wakeup" : "");
}
}

seq_printf(s, "\n");
}
}
Expand Down

0 comments on commit 8462576

Please sign in to comment.