Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 319698
b: refs/heads/master
c: b0ab907
h: refs/heads/master
v: v3
  • Loading branch information
Mark Brown authored and Samuel Ortiz committed Jul 8, 2012
1 parent c979222 commit deef935
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 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: 6d11d1356cb3b1c009a90b273350f6a88c0b90e0
refs/heads/master: b0ab907d325f99054eb2700a8f8c50776ebfeaf9
10 changes: 9 additions & 1 deletion trunk/drivers/mfd/wm8994-irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#include <linux/regmap.h>

#include <linux/mfd/wm8994/core.h>
#include <linux/mfd/wm8994/pdata.h>
#include <linux/mfd/wm8994/registers.h>

#include <linux/delay.h>
Expand Down Expand Up @@ -139,6 +140,8 @@ static struct regmap_irq_chip wm8994_irq_chip = {
int wm8994_irq_init(struct wm8994 *wm8994)
{
int ret;
unsigned long irqflags;
struct wm8994_pdata *pdata = wm8994->dev->platform_data;

if (!wm8994->irq) {
dev_warn(wm8994->dev,
Expand All @@ -147,8 +150,13 @@ int wm8994_irq_init(struct wm8994 *wm8994)
return 0;
}

/* select user or default irq flags */
irqflags = IRQF_TRIGGER_HIGH | IRQF_ONESHOT;
if (pdata->irq_flags)
irqflags = pdata->irq_flags;

ret = regmap_add_irq_chip(wm8994->regmap, wm8994->irq,
IRQF_TRIGGER_HIGH | IRQF_ONESHOT,
irqflags,
wm8994->irq_base, &wm8994_irq_chip,
&wm8994->irq_data);
if (ret != 0) {
Expand Down
1 change: 1 addition & 0 deletions trunk/include/linux/mfd/wm8994/pdata.h
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ struct wm8994_pdata {
struct wm8994_ldo_pdata ldo[WM8994_NUM_LDO];

int irq_base; /** Base IRQ number for WM8994, required for IRQs */
unsigned long irq_flags; /** user irq flags */

int num_drc_cfgs;
struct wm8994_drc_cfg *drc_cfgs;
Expand Down

0 comments on commit deef935

Please sign in to comment.