Merge remote-tracking branch 'regmap/topic/no-bus' into regmap-next
[pandora-kernel.git] / drivers / base / regmap / internal.h
index b55fde5..5a22bd3 100644 (file)
@@ -16,6 +16,7 @@
 #include <linux/regmap.h>
 #include <linux/fs.h>
 #include <linux/list.h>
+#include <linux/wait.h>
 
 struct regmap;
 struct regcache_ops;
@@ -25,6 +26,7 @@ struct regmap_debugfs_off_cache {
        off_t min;
        off_t max;
        unsigned int base_reg;
+       unsigned int max_reg;
 };
 
 struct regmap_format {
@@ -39,6 +41,13 @@ struct regmap_format {
        unsigned int (*parse_val)(void *buf);
 };
 
+struct regmap_async {
+       struct list_head list;
+       struct work_struct cleanup;
+       struct regmap *map;
+       void *work_buf;
+};
+
 struct regmap {
        struct mutex mutex;
        spinlock_t spinlock;
@@ -53,6 +62,11 @@ struct regmap {
        void *bus_context;
        const char *name;
 
+       spinlock_t async_lock;
+       wait_queue_head_t async_waitq;
+       struct list_head async_list;
+       int async_ret;
+
 #ifdef CONFIG_DEBUG_FS
        struct dentry *debugfs;
        const char *debugfs_name;
@@ -180,7 +194,10 @@ bool regcache_set_val(void *base, unsigned int idx,
                      unsigned int val, unsigned int word_size);
 int regcache_lookup_reg(struct regmap *map, unsigned int reg);
 
+void regmap_async_complete_cb(struct regmap_async *async, int ret);
+
 extern struct regcache_ops regcache_rbtree_ops;
 extern struct regcache_ops regcache_lzo_ops;
+extern struct regcache_ops regcache_flat_ops;
 
 #endif