diff options
author | Mark Brown <broonie@linaro.org> | 2013-10-10 13:29:32 +0200 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2013-10-10 13:29:32 +0200 |
commit | 40aaddd0438944b41ae507a01b0842309bb9ea79 (patch) | |
tree | 8557f1cf6036d7253a04bd6c2c3ec9fff8ef7c37 /include | |
parent | ASoC: dapm: Add support for virtual mixer controls (diff) | |
parent | regmap: Provide asynchronous write and update bits operations (diff) | |
download | linux-40aaddd0438944b41ae507a01b0842309bb9ea79.tar.xz linux-40aaddd0438944b41ae507a01b0842309bb9ea79.zip |
Merge tag 'regmap-async-reg' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap into asoc-dapm
regmap: Provide async single register operations
This helps make it easier for users to take advantage of async I/O by
allowing single register writes to be inserted into sequences.
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/regmap.h | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/include/linux/regmap.h b/include/linux/regmap.h index a10380bfbeac..114565befbd2 100644 --- a/include/linux/regmap.h +++ b/include/linux/regmap.h @@ -374,6 +374,7 @@ int regmap_reinit_cache(struct regmap *map, const struct regmap_config *config); struct regmap *dev_get_regmap(struct device *dev, const char *name); int regmap_write(struct regmap *map, unsigned int reg, unsigned int val); +int regmap_write_async(struct regmap *map, unsigned int reg, unsigned int val); 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, @@ -387,9 +388,14 @@ 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_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, unsigned int mask, unsigned int val, bool *change); +int regmap_update_bits_check_async(struct regmap *map, unsigned int reg, + unsigned int mask, unsigned int val, + bool *change); int regmap_get_val_bytes(struct regmap *map); int regmap_async_complete(struct regmap *map); bool regmap_can_raw_write(struct regmap *map); @@ -527,6 +533,13 @@ static inline int regmap_write(struct regmap *map, unsigned int reg, return -EINVAL; } +static inline int regmap_write_async(struct regmap *map, unsigned int reg, + unsigned int val) +{ + WARN_ONCE(1, "regmap API is disabled"); + return -EINVAL; +} + static inline int regmap_raw_write(struct regmap *map, unsigned int reg, const void *val, size_t val_len) { @@ -576,6 +589,14 @@ static inline int regmap_update_bits(struct regmap *map, unsigned int reg, return -EINVAL; } +static inline int regmap_update_bits_async(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_check(struct regmap *map, unsigned int reg, unsigned int mask, unsigned int val, @@ -585,6 +606,16 @@ static inline int regmap_update_bits_check(struct regmap *map, return -EINVAL; } +static inline int regmap_update_bits_check_async(struct regmap *map, + unsigned int reg, + unsigned int mask, + unsigned int val, + bool *change) +{ + WARN_ONCE(1, "regmap API is disabled"); + return -EINVAL; +} + static inline int regmap_get_val_bytes(struct regmap *map) { WARN_ONCE(1, "regmap API is disabled"); |