aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/mfd/wm831x
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2011-06-10 14:28:10 -0400
committerMark Brown <broonie@opensource.wolfsonmicro.com>2011-08-22 07:23:22 -0400
commit1df5981b82d9eabdd6e66d1d9514164c02329345 (patch)
treec5fc2653d70a884d42957b2c7bc0c8cd49d8b895 /include/linux/mfd/wm831x
parentbd20eb541ebbb17a5e047cd20e74b9ccf19a4123 (diff)
mfd: Convert WM831x to use regmap API
Factor out the register read/write code to use the register map API. We still need some wm831x specific code and locking in place to check that the user key is handled correctly but only on the write side, reads are not affected by the key. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'include/linux/mfd/wm831x')
-rw-r--r--include/linux/mfd/wm831x/core.h9
1 files changed, 4 insertions, 5 deletions
diff --git a/include/linux/mfd/wm831x/core.h b/include/linux/mfd/wm831x/core.h
index 8dda8ded5cda..44acdb25681b 100644
--- a/include/linux/mfd/wm831x/core.h
+++ b/include/linux/mfd/wm831x/core.h
@@ -18,6 +18,7 @@
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#include <linux/list.h>
21#include <linux/regmap.h>
21 22
22/* 23/*
23 * Register values. 24 * Register values.
@@ -361,12 +362,8 @@ struct wm831x {
361 struct mutex io_lock; 362 struct mutex io_lock;
362 363
363 struct device *dev; 364 struct device *dev;
364 int (*read_dev)(struct wm831x *wm831x, unsigned short reg,
365 int bytes, void *dest);
366 int (*write_dev)(struct wm831x *wm831x, unsigned short reg,
367 int bytes, void *src);
368 365
369 void *control_data; 366 struct regmap *regmap;
370 367
371 int irq; /* Our chip IRQ */ 368 int irq; /* Our chip IRQ */
372 struct mutex irq_lock; 369 struct mutex irq_lock;
@@ -416,4 +413,6 @@ int wm831x_irq_init(struct wm831x *wm831x, int irq);
416void wm831x_irq_exit(struct wm831x *wm831x); 413void wm831x_irq_exit(struct wm831x *wm831x);
417void wm831x_auxadc_init(struct wm831x *wm831x); 414void wm831x_auxadc_init(struct wm831x *wm831x);
418 415
416extern struct regmap_config wm831x_regmap_config;
417
419#endif 418#endif