diff options
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/mfd/wm831x/core.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/include/linux/mfd/wm831x/core.h b/include/linux/mfd/wm831x/core.h index 4b1211859f74..736191cc7e00 100644 --- a/include/linux/mfd/wm831x/core.h +++ b/include/linux/mfd/wm831x/core.h | |||
| @@ -17,6 +17,7 @@ | |||
| 17 | 17 | ||
| 18 | #include <linux/completion.h> | 18 | #include <linux/completion.h> |
| 19 | #include <linux/interrupt.h> | 19 | #include <linux/interrupt.h> |
| 20 | #include <linux/irqdomain.h> | ||
| 20 | #include <linux/list.h> | 21 | #include <linux/list.h> |
| 21 | #include <linux/regmap.h> | 22 | #include <linux/regmap.h> |
| 22 | 23 | ||
| @@ -338,6 +339,7 @@ | |||
| 338 | #define WM831X_FLL_CLK_SRC_WIDTH 2 /* FLL_CLK_SRC - [1:0] */ | 339 | #define WM831X_FLL_CLK_SRC_WIDTH 2 /* FLL_CLK_SRC - [1:0] */ |
| 339 | 340 | ||
| 340 | struct regulator_dev; | 341 | struct regulator_dev; |
| 342 | struct irq_domain; | ||
| 341 | 343 | ||
| 342 | #define WM831X_NUM_IRQ_REGS 5 | 344 | #define WM831X_NUM_IRQ_REGS 5 |
| 343 | #define WM831X_NUM_GPIO_REGS 16 | 345 | #define WM831X_NUM_GPIO_REGS 16 |
| @@ -367,7 +369,7 @@ struct wm831x { | |||
| 367 | 369 | ||
| 368 | int irq; /* Our chip IRQ */ | 370 | int irq; /* Our chip IRQ */ |
| 369 | struct mutex irq_lock; | 371 | struct mutex irq_lock; |
| 370 | int irq_base; | 372 | struct irq_domain *irq_domain; |
| 371 | int irq_masks_cur[WM831X_NUM_IRQ_REGS]; /* Currently active value */ | 373 | int irq_masks_cur[WM831X_NUM_IRQ_REGS]; /* Currently active value */ |
| 372 | int irq_masks_cache[WM831X_NUM_IRQ_REGS]; /* Cached hardware value */ | 374 | int irq_masks_cache[WM831X_NUM_IRQ_REGS]; /* Cached hardware value */ |
| 373 | 375 | ||
| @@ -417,6 +419,11 @@ int wm831x_irq_init(struct wm831x *wm831x, int irq); | |||
| 417 | void wm831x_irq_exit(struct wm831x *wm831x); | 419 | void wm831x_irq_exit(struct wm831x *wm831x); |
| 418 | void wm831x_auxadc_init(struct wm831x *wm831x); | 420 | void wm831x_auxadc_init(struct wm831x *wm831x); |
| 419 | 421 | ||
| 422 | static inline int wm831x_irq(struct wm831x *wm831x, int irq) | ||
| 423 | { | ||
| 424 | return irq_create_mapping(wm831x->irq_domain, irq); | ||
| 425 | } | ||
| 426 | |||
| 420 | extern struct regmap_config wm831x_regmap_config; | 427 | extern struct regmap_config wm831x_regmap_config; |
| 421 | 428 | ||
| 422 | #endif | 429 | #endif |
