Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 307663
b: refs/heads/master
c: f5f9311
h: refs/heads/master
i:
  307661: 62c34ce
  307659: e7bd81a
  307655: aefe5ae
  307647: 9697318
v: v3
  • Loading branch information
Mika Westerberg authored and Grant Likely committed Apr 6, 2012
1 parent ce90872 commit 91d5249
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b3e35af2b0ea9ad1618e01f40a1ffee83333ef35
refs/heads/master: f5f93117f4ac24b8493cda67e6a1443517d26845
21 changes: 21 additions & 0 deletions trunk/drivers/gpio/gpio-langwell.c
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,24 @@ static void lnw_irq_handler(unsigned irq, struct irq_desc *desc)
chip->irq_eoi(data);
}

static void lnw_irq_init_hw(struct lnw_gpio *lnw)
{
void __iomem *reg;
unsigned base;

for (base = 0; base < lnw->chip.ngpio; base += 32) {
/* Clear the rising-edge detect register */
reg = gpio_reg(&lnw->chip, base, GRER);
writel(0, reg);
/* Clear the falling-edge detect register */
reg = gpio_reg(&lnw->chip, base, GFER);
writel(0, reg);
/* Clear the edge detect status register */
reg = gpio_reg(&lnw->chip, base, GEDR);
writel(~0, reg);
}
}

#ifdef CONFIG_PM
static int lnw_gpio_runtime_resume(struct device *dev)
{
Expand Down Expand Up @@ -371,6 +389,9 @@ static int __devinit lnw_gpio_probe(struct pci_dev *pdev,
dev_err(&pdev->dev, "langwell gpiochip_add error %d\n", retval);
goto err4;
}

lnw_irq_init_hw(lnw);

irq_set_handler_data(pdev->irq, lnw);
irq_set_chained_handler(pdev->irq, lnw_irq_handler);
for (i = 0; i < lnw->chip.ngpio; i++) {
Expand Down

0 comments on commit 91d5249

Please sign in to comment.