diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2013-03-13 15:19:34 -0400 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2013-03-26 15:17:32 -0400 |
commit | 584de329ca43cc6d73eb74885e1d5d9fc0549423 (patch) | |
tree | 58e6e6d728d5c0f0d43a33d48914c9032bebf971 /drivers/base | |
parent | f1b5c5c3423b59056d3ca956d2e795b7927d6008 (diff) |
regmap: core: Make raw write available to regcache
This allows the cache to sync values directly to the device when stored
in native format and also allows asynchronous I/O.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'drivers/base')
-rw-r--r-- | drivers/base/regmap/internal.h | 3 | ||||
-rw-r--r-- | drivers/base/regmap/regmap.c | 4 |
2 files changed, 5 insertions, 2 deletions
diff --git a/drivers/base/regmap/internal.h b/drivers/base/regmap/internal.h index 2b5851d42dbb..6d409350f50a 100644 --- a/drivers/base/regmap/internal.h +++ b/drivers/base/regmap/internal.h | |||
@@ -195,6 +195,9 @@ bool regcache_set_val(struct regmap *map, void *base, unsigned int idx, | |||
195 | unsigned int val); | 195 | unsigned int val); |
196 | int regcache_lookup_reg(struct regmap *map, unsigned int reg); | 196 | int regcache_lookup_reg(struct regmap *map, unsigned int reg); |
197 | 197 | ||
198 | int _regmap_raw_write(struct regmap *map, unsigned int reg, | ||
199 | const void *val, size_t val_len, bool async); | ||
200 | |||
198 | void regmap_async_complete_cb(struct regmap_async *async, int ret); | 201 | void regmap_async_complete_cb(struct regmap_async *async, int ret); |
199 | 202 | ||
200 | extern struct regcache_ops regcache_rbtree_ops; | 203 | extern struct regcache_ops regcache_rbtree_ops; |
diff --git a/drivers/base/regmap/regmap.c b/drivers/base/regmap/regmap.c index 44a45cf0644b..9174c9d45a16 100644 --- a/drivers/base/regmap/regmap.c +++ b/drivers/base/regmap/regmap.c | |||
@@ -937,8 +937,8 @@ static int _regmap_select_page(struct regmap *map, unsigned int *reg, | |||
937 | return 0; | 937 | return 0; |
938 | } | 938 | } |
939 | 939 | ||
940 | static int _regmap_raw_write(struct regmap *map, unsigned int reg, | 940 | int _regmap_raw_write(struct regmap *map, unsigned int reg, |
941 | const void *val, size_t val_len, bool async) | 941 | const void *val, size_t val_len, bool async) |
942 | { | 942 | { |
943 | struct regmap_range_node *range; | 943 | struct regmap_range_node *range; |
944 | unsigned long flags; | 944 | unsigned long flags; |