diff options
| author | Mark Brown <broonie@kernel.org> | 2015-07-17 20:57:41 +0300 |
|---|---|---|
| committer | Mark Brown <broonie@kernel.org> | 2015-07-17 20:57:41 +0300 |
| commit | da7b33739ebefca48259e4741376b9c77015d9d0 (patch) | |
| tree | 43af87fadb48bfaf23e3e09378cfb90edb585f19 /include/linux | |
| parent | d1acd31883d78f905a930493ff145ca4a25ad680 (diff) | |
| parent | 8019ff6cfc0440415fcfb6352c58c3951e6ab053 (diff) | |
| download | linux-da7b33739ebefca48259e4741376b9c77015d9d0.tar.xz | |
Merge tag 'regmap-seq-delay-api' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap into asoc-wm5110
regmap: Create a new struct reg_sequence for register sequences
In order to allow us to start adding extra annotations for sequences
without bloating register default tables duplicate the structure under
the new name reg_sequence and update the APIs to use that instead of
reg_default.
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/regmap.h | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/include/linux/regmap.h b/include/linux/regmap.h index 59c55ea0f0b5..c9ef2ec69142 100644 --- a/include/linux/regmap.h +++ b/include/linux/regmap.h @@ -50,6 +50,17 @@ struct reg_default { unsigned int def; }; +/** + * Register/value pairs for sequences of writes + * + * @reg: Register address. + * @def: Register value. + */ +struct reg_sequence { + unsigned int reg; + unsigned int def; +}; + #ifdef CONFIG_REGMAP enum regmap_endian { @@ -410,10 +421,10 @@ int regmap_raw_write(struct regmap *map, unsigned int reg, const void *val, size_t val_len); int regmap_bulk_write(struct regmap *map, unsigned int reg, const void *val, size_t val_count); -int regmap_multi_reg_write(struct regmap *map, const struct reg_default *regs, +int regmap_multi_reg_write(struct regmap *map, const struct reg_sequence *regs, int num_regs); int regmap_multi_reg_write_bypassed(struct regmap *map, - const struct reg_default *regs, + const struct reg_sequence *regs, int num_regs); int regmap_raw_write_async(struct regmap *map, unsigned int reg, const void *val, size_t val_len); @@ -450,7 +461,7 @@ void regcache_mark_dirty(struct regmap *map); bool regmap_check_range_table(struct regmap *map, unsigned int reg, const struct regmap_access_table *table); -int regmap_register_patch(struct regmap *map, const struct reg_default *regs, +int regmap_register_patch(struct regmap *map, const struct reg_sequence *regs, int num_regs); int regmap_parse_val(struct regmap *map, const void *buf, unsigned int *val); |
