diff options
| author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-05-09 17:53:48 -0400 |
|---|---|---|
| committer | Samuel Ortiz <sameo@linux.intel.com> | 2012-05-20 11:27:01 -0400 |
| commit | 879eed68265c8dcb2f2856ec96820fc93b7038c9 (patch) | |
| tree | b290c707e1d9eb3033f8a93eff1d81f4b7afb185 /include/linux/mfd | |
| parent | 27757e8262669321b496c55f06f4844e827fd1c5 (diff) | |
mfd: Remove wm8400 custom cache implementation
Save a useful amount of code by removing the custom cache implementation
for wm8400 and using the regmap cache. Also simplify things by not
separately reseting the CODEC registers, this is a sufficiently infrequent
operation that we can simply invalidate the entire cache when this happens.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'include/linux/mfd')
| -rw-r--r-- | include/linux/mfd/wm8400-private.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/include/linux/mfd/wm8400-private.h b/include/linux/mfd/wm8400-private.h index 0147b6968510..2de565b94d0c 100644 --- a/include/linux/mfd/wm8400-private.h +++ b/include/linux/mfd/wm8400-private.h | |||
| @@ -24,19 +24,14 @@ | |||
| 24 | #include <linux/mfd/wm8400.h> | 24 | #include <linux/mfd/wm8400.h> |
| 25 | #include <linux/mutex.h> | 25 | #include <linux/mutex.h> |
| 26 | #include <linux/platform_device.h> | 26 | #include <linux/platform_device.h> |
| 27 | 27 | #include <linux/regmap.h> | |
| 28 | struct regmap; | ||
| 29 | 28 | ||
| 30 | #define WM8400_REGISTER_COUNT 0x55 | 29 | #define WM8400_REGISTER_COUNT 0x55 |
| 31 | 30 | ||
| 32 | struct wm8400 { | 31 | struct wm8400 { |
| 33 | struct device *dev; | 32 | struct device *dev; |
| 34 | |||
| 35 | struct mutex io_lock; | ||
| 36 | struct regmap *regmap; | 33 | struct regmap *regmap; |
| 37 | 34 | ||
| 38 | u16 reg_cache[WM8400_REGISTER_COUNT]; | ||
| 39 | |||
| 40 | struct platform_device regulators[6]; | 35 | struct platform_device regulators[6]; |
| 41 | }; | 36 | }; |
| 42 | 37 | ||
| @@ -930,6 +925,11 @@ struct wm8400 { | |||
| 930 | 925 | ||
| 931 | u16 wm8400_reg_read(struct wm8400 *wm8400, u8 reg); | 926 | u16 wm8400_reg_read(struct wm8400 *wm8400, u8 reg); |
| 932 | int wm8400_block_read(struct wm8400 *wm8400, u8 reg, int count, u16 *data); | 927 | int wm8400_block_read(struct wm8400 *wm8400, u8 reg, int count, u16 *data); |
| 933 | int wm8400_set_bits(struct wm8400 *wm8400, u8 reg, u16 mask, u16 val); | 928 | |
| 929 | static inline int wm8400_set_bits(struct wm8400 *wm8400, u8 reg, | ||
| 930 | u16 mask, u16 val) | ||
| 931 | { | ||
| 932 | return regmap_update_bits(wm8400->regmap, reg, mask, val); | ||
| 933 | } | ||
| 934 | 934 | ||
| 935 | #endif | 935 | #endif |
