diff options
author | Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> | 2015-06-16 11:52:39 +0300 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2015-07-10 13:38:00 +0300 |
commit | fd4b7286ccc469bf5dde22db6b8fcc455c3c4a66 (patch) | |
tree | 04b3b7a077e81f1e8036c723963396b62bb91340 /include/linux/regmap.h | |
parent | 7ff0589c7bff4ca31b255ac2028f633f14047762 (diff) | |
download | linux-fd4b7286ccc469bf5dde22db6b8fcc455c3c4a66.tar.xz |
regmap: add regmap_write_bits()
regmap_write_bits() is similar to regmap_update_bits(),
but regmap_write_bits() write data to register even though
it is same value.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'include/linux/regmap.h')
-rw-r--r-- | include/linux/regmap.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/linux/regmap.h b/include/linux/regmap.h index 59c55ea0f0b5..e4b9ad4f05ef 100644 --- a/include/linux/regmap.h +++ b/include/linux/regmap.h @@ -424,6 +424,8 @@ int regmap_bulk_read(struct regmap *map, unsigned int reg, void *val, size_t val_count); int regmap_update_bits(struct regmap *map, unsigned int reg, unsigned int mask, unsigned int val); +int regmap_write_bits(struct regmap *map, unsigned int reg, + unsigned int mask, unsigned int val); int regmap_update_bits_async(struct regmap *map, unsigned int reg, unsigned int mask, unsigned int val); int regmap_update_bits_check(struct regmap *map, unsigned int reg, @@ -645,6 +647,13 @@ static inline int regmap_update_bits(struct regmap *map, unsigned int reg, return -EINVAL; } +static inline int regmap_write_bits(struct regmap *map, unsigned int reg, + unsigned int mask, unsigned int val) +{ + WARN_ONCE(1, "regmap API is disabled"); + return -EINVAL; +} + static inline int regmap_update_bits_async(struct regmap *map, unsigned int reg, unsigned int mask, unsigned int val) |