diff options
author | Boris BREZILLON <boris.brezillon@free-electrons.com> | 2014-04-17 05:40:11 -0400 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2014-04-18 11:07:22 -0400 |
commit | 3ac170376f2c5123414e0267aa0f9cf218965e24 (patch) | |
tree | 2c825d39794623bdd034190f72a8acb1617d54ba /include/linux/regmap.h | |
parent | c9eaa447e77efe77b7fa4c953bd62de8297fd6c5 (diff) |
regmap: add reg_read/reg_write callbacks to regmap_bus struct
Some busses do not support sending/receiving multiple registers in one go.
Such kind of busses just unpack the registers that have been previously
packed by the regmap core or pack registers that will be later unpacked by
the core code.
Add reg_write and reg_read callbacks in order to optimize access through
this kind of busses.
Signed-off-by: Boris BREZILLON <boris.brezillon@free-electrons.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'include/linux/regmap.h')
-rw-r--r-- | include/linux/regmap.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/regmap.h b/include/linux/regmap.h index 85691b9b4fa7..7b0e4b425cdf 100644 --- a/include/linux/regmap.h +++ b/include/linux/regmap.h | |||
@@ -276,6 +276,10 @@ typedef int (*regmap_hw_async_write)(void *context, | |||
276 | typedef int (*regmap_hw_read)(void *context, | 276 | typedef int (*regmap_hw_read)(void *context, |
277 | const void *reg_buf, size_t reg_size, | 277 | const void *reg_buf, size_t reg_size, |
278 | void *val_buf, size_t val_size); | 278 | void *val_buf, size_t val_size); |
279 | typedef int (*regmap_hw_reg_read)(void *context, unsigned int reg, | ||
280 | unsigned int *val); | ||
281 | typedef int (*regmap_hw_reg_write)(void *context, unsigned int reg, | ||
282 | unsigned int val); | ||
279 | typedef struct regmap_async *(*regmap_hw_async_alloc)(void); | 283 | typedef struct regmap_async *(*regmap_hw_async_alloc)(void); |
280 | typedef void (*regmap_hw_free_context)(void *context); | 284 | typedef void (*regmap_hw_free_context)(void *context); |
281 | 285 | ||
@@ -309,7 +313,9 @@ struct regmap_bus { | |||
309 | regmap_hw_write write; | 313 | regmap_hw_write write; |
310 | regmap_hw_gather_write gather_write; | 314 | regmap_hw_gather_write gather_write; |
311 | regmap_hw_async_write async_write; | 315 | regmap_hw_async_write async_write; |
316 | regmap_hw_reg_write reg_write; | ||
312 | regmap_hw_read read; | 317 | regmap_hw_read read; |
318 | regmap_hw_reg_read reg_read; | ||
313 | regmap_hw_free_context free_context; | 319 | regmap_hw_free_context free_context; |
314 | regmap_hw_async_alloc async_alloc; | 320 | regmap_hw_async_alloc async_alloc; |
315 | u8 read_flag_mask; | 321 | u8 read_flag_mask; |