Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 272513
b: refs/heads/master
c: 09ad803
h: refs/heads/master
i:
  272511: 329fbac
v: v3
  • Loading branch information
Shawn Guo authored and Sascha Hauer committed Aug 16, 2011
1 parent df7c09c commit f0b322b
Show file tree
Hide file tree
Showing 2 changed files with 11 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: e309fb1864e2d59ff030d5b95c4fb8188ab0eb4c
refs/heads/master: 09ad8039dad91baed6e43f6ba4741805e7b48932
10 changes: 10 additions & 0 deletions trunk/drivers/gpio/gpio-mxc.c
Original file line number Diff line number Diff line change
Expand Up @@ -337,6 +337,15 @@ static void __devinit mxc_gpio_get_hw(struct platform_device *pdev)
mxc_gpio_hwtype = hwtype;
}

static int mxc_gpio_to_irq(struct gpio_chip *gc, unsigned offset)
{
struct bgpio_chip *bgc = to_bgpio_chip(gc);
struct mxc_gpio_port *port =
container_of(bgc, struct mxc_gpio_port, bgc);

return port->virtual_irq_start + offset;
}

static int __devinit mxc_gpio_probe(struct platform_device *pdev)
{
struct device_node *np = pdev->dev.of_node;
Expand Down Expand Up @@ -403,6 +412,7 @@ static int __devinit mxc_gpio_probe(struct platform_device *pdev)
if (err)
goto out_iounmap;

port->bgc.gc.to_irq = mxc_gpio_to_irq;
port->bgc.gc.base = pdev->id * 32;
port->bgc.dir = port->bgc.read_reg(port->bgc.reg_dir);
port->bgc.data = port->bgc.read_reg(port->bgc.reg_set);
Expand Down

0 comments on commit f0b322b

Please sign in to comment.