Merge branch 'fixes-omap4-dsp' into fixes-non-critical
[firefly-linux-kernel-4.4.55.git] / include / linux / mfd / wm8400-private.h
index 0147b696851072fde8a6074cb762257aa1654aad..2de565b94d0c39e9c0e3b049bbcf0237cceddb8f 100644 (file)
 #include <linux/mfd/wm8400.h>
 #include <linux/mutex.h>
 #include <linux/platform_device.h>
-
-struct regmap;
+#include <linux/regmap.h>
 
 #define WM8400_REGISTER_COUNT 0x55
 
 struct wm8400 {
        struct device *dev;
-
-       struct mutex io_lock;
        struct regmap *regmap;
 
-       u16 reg_cache[WM8400_REGISTER_COUNT];
-
        struct platform_device regulators[6];
 };
 
@@ -930,6 +925,11 @@ struct wm8400 {
 
 u16 wm8400_reg_read(struct wm8400 *wm8400, u8 reg);
 int wm8400_block_read(struct wm8400 *wm8400, u8 reg, int count, u16 *data);
-int wm8400_set_bits(struct wm8400 *wm8400, u8 reg, u16 mask, u16 val);
+
+static inline int wm8400_set_bits(struct wm8400 *wm8400, u8 reg,
+                                 u16 mask, u16 val)
+{
+       return regmap_update_bits(wm8400->regmap, reg, mask, val);
+}
 
 #endif