diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2011-06-10 22:28:10 +0400 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2011-08-22 15:23:22 +0400 |
commit | 1df5981b82d9eabdd6e66d1d9514164c02329345 (patch) | |
tree | c5fc2653d70a884d42957b2c7bc0c8cd49d8b895 /include/linux/mfd/wm831x/core.h | |
parent | bd20eb541ebbb17a5e047cd20e74b9ccf19a4123 (diff) | |
download | linux-1df5981b82d9eabdd6e66d1d9514164c02329345.tar.xz |
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/core.h')
-rw-r--r-- | include/linux/mfd/wm831x/core.h | 9 |
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 @@ #include <linux/completion.h> #include <linux/interrupt.h> #include <linux/list.h> +#include <linux/regmap.h> /* * Register values. @@ -361,12 +362,8 @@ struct wm831x { struct mutex io_lock; struct device *dev; - int (*read_dev)(struct wm831x *wm831x, unsigned short reg, - int bytes, void *dest); - int (*write_dev)(struct wm831x *wm831x, unsigned short reg, - int bytes, void *src); - void *control_data; + struct regmap *regmap; int irq; /* Our chip IRQ */ struct mutex irq_lock; @@ -416,4 +413,6 @@ int wm831x_irq_init(struct wm831x *wm831x, int irq); void wm831x_irq_exit(struct wm831x *wm831x); void wm831x_auxadc_init(struct wm831x *wm831x); +extern struct regmap_config wm831x_regmap_config; + #endif |