diff options
author | Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> | 2016-02-15 00:24:15 -0500 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2016-02-19 11:15:56 -0500 |
commit | 3674124b35894631f8f4d33ab041e713078bfd4b (patch) | |
tree | 27f0987b3eba12f88b3c154deacebbb161712362 /include | |
parent | 28972eaa34f384eef5e33f36e00d8fa21ca44375 (diff) |
regmap: merge regmap_field_write() into macro
This patch merges regmap_field_write() into macro
by using regmap_field_update_bits_base().
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/regmap.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/include/linux/regmap.h b/include/linux/regmap.h index 23bf7657e485..13e9ebdea1c7 100644 --- a/include/linux/regmap.h +++ b/include/linux/regmap.h | |||
@@ -74,6 +74,9 @@ struct reg_sequence { | |||
74 | #define regmap_update_bits_check_async(map, reg, mask, val, change)\ | 74 | #define regmap_update_bits_check_async(map, reg, mask, val, change)\ |
75 | regmap_update_bits_base(map, reg, mask, val, change, true, false) | 75 | regmap_update_bits_base(map, reg, mask, val, change, true, false) |
76 | 76 | ||
77 | #define regmap_field_write(field, val) \ | ||
78 | regmap_field_update_bits_base(field, ~0, val, NULL, false, false) | ||
79 | |||
77 | #ifdef CONFIG_REGMAP | 80 | #ifdef CONFIG_REGMAP |
78 | 81 | ||
79 | enum regmap_endian { | 82 | enum regmap_endian { |
@@ -772,7 +775,6 @@ struct regmap_field *devm_regmap_field_alloc(struct device *dev, | |||
772 | void devm_regmap_field_free(struct device *dev, struct regmap_field *field); | 775 | void devm_regmap_field_free(struct device *dev, struct regmap_field *field); |
773 | 776 | ||
774 | int regmap_field_read(struct regmap_field *field, unsigned int *val); | 777 | int regmap_field_read(struct regmap_field *field, unsigned int *val); |
775 | int regmap_field_write(struct regmap_field *field, unsigned int val); | ||
776 | int regmap_field_update_bits_base(struct regmap_field *field, | 778 | int regmap_field_update_bits_base(struct regmap_field *field, |
777 | unsigned int mask, unsigned int val, | 779 | unsigned int mask, unsigned int val, |
778 | bool *change, bool async, bool force); | 780 | bool *change, bool async, bool force); |