summaryrefslogtreecommitdiffstats
path: root/drivers/base/regmap/internal.h
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2013-02-14 17:11:03 +0000
committerMark Brown <broonie@opensource.wolfsonmicro.com>2013-02-14 17:11:03 +0000
commit3689cf7fd17ea50850f9036f398bd56e08c8806d (patch)
tree18006137f618f7a2ff99417bb1029081bcc88fbf /drivers/base/regmap/internal.h
parent3bef9059dd8d50c011ea22ae60eaa03996bd4ad1 (diff)
parent95601d65a1aa0902f838a2919e11ee6311efe371 (diff)
downloadop-kernel-dev-3689cf7fd17ea50850f9036f398bd56e08c8806d.zip
op-kernel-dev-3689cf7fd17ea50850f9036f398bd56e08c8806d.tar.gz
Merge remote-tracking branch 'regmap/topic/async' into regmap-next
Diffstat (limited to 'drivers/base/regmap/internal.h')
-rw-r--r--drivers/base/regmap/internal.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/drivers/base/regmap/internal.h b/drivers/base/regmap/internal.h
index 401d191..2025186 100644
--- a/drivers/base/regmap/internal.h
+++ b/drivers/base/regmap/internal.h
@@ -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;
@@ -39,6 +40,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 +61,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;
@@ -74,6 +87,9 @@ struct regmap {
const struct regmap_access_table *volatile_table;
const struct regmap_access_table *precious_table;
+ int (*reg_read)(void *context, unsigned int reg, unsigned int *val);
+ int (*reg_write)(void *context, unsigned int reg, unsigned int val);
+
u8 read_flag_mask;
u8 write_flag_mask;
@@ -175,6 +191,8 @@ 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;
OpenPOWER on IntegriCloud