aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/mfd
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/mfd')
-rw-r--r--include/linux/mfd/wm831x/core.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/include/linux/mfd/wm831x/core.h b/include/linux/mfd/wm831x/core.h
index 592e4fd6ab3f..9fa14cdc1590 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/list.h>
20 21
21/* 22/*
22 * Register values. 23 * Register values.
@@ -249,6 +250,12 @@ enum wm831x_parent {
249 WM8326 = 0x8326, 250 WM8326 = 0x8326,
250}; 251};
251 252
253struct wm831x;
254enum wm831x_auxadc;
255
256typedef int (*wm831x_auxadc_read_fn)(struct wm831x *wm831x,
257 enum wm831x_auxadc input);
258
252struct wm831x { 259struct wm831x {
253 struct mutex io_lock; 260 struct mutex io_lock;
254 261
@@ -277,8 +284,9 @@ struct wm831x {
277 int gpio_update[WM831X_NUM_GPIO_REGS]; 284 int gpio_update[WM831X_NUM_GPIO_REGS];
278 285
279 struct mutex auxadc_lock; 286 struct mutex auxadc_lock;
280 struct completion auxadc_done; 287 struct list_head auxadc_pending;
281 u16 auxadc_data; 288 u16 auxadc_active;
289 wm831x_auxadc_read_fn auxadc_read;
282 290
283 /* The WM831x has a security key blocking access to certain 291 /* The WM831x has a security key blocking access to certain
284 * registers. The mutex is taken by the accessors for locking 292 * registers. The mutex is taken by the accessors for locking
@@ -305,5 +313,6 @@ void wm831x_device_exit(struct wm831x *wm831x);
305int wm831x_device_suspend(struct wm831x *wm831x); 313int wm831x_device_suspend(struct wm831x *wm831x);
306int wm831x_irq_init(struct wm831x *wm831x, int irq); 314int wm831x_irq_init(struct wm831x *wm831x, int irq);
307void wm831x_irq_exit(struct wm831x *wm831x); 315void wm831x_irq_exit(struct wm831x *wm831x);
316void wm831x_auxadc_init(struct wm831x *wm831x);
308 317
309#endif 318#endif