diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2014-04-01 13:16:04 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-04-01 13:16:04 -0700 |
commit | c6b38ec06e281af0608f02763ac7484ace267024 (patch) | |
tree | 217a1c1c80d5d79ba336b80cc188ba2ab02bbc4d /include | |
parent | d64b3932531cbc0c9d6bdb744446934435e9d6af (diff) | |
parent | 6012b1f3424c4dc36369697845a9ca699887b0c7 (diff) |
Merge tag 'regmap-v3.15' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap
Pull regmap updates from Mark Brown:
"Quite a busy release for regmap this time around, the standout changes
are:
- A real implementation of regmap_multi_write() and a bypassed
version of it for use by drivers doing patch-like things with more
open coding for surrounding startup sequences.
- Support fast_io on bulk operations.
- Support split device binding and map initialisation for use by
devices required in early init (mainly system controllers).
- Fixes for some operations on maps with strides set.
- Export the value parsing operations to help generic code built on
top of the API.
- Support for MMIO regmaps with non-32 bit register sizes.
plus a few smaller fixes"
* tag 'regmap-v3.15' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap: (22 commits)
regmap: mmio: Add regmap_mmio_regbits_check.
regmap: mmio: Add support for 1/2/8 bytes wide register address.
regmap: mmio: add regmap_mmio_{regsize, count}_check.
regmap: cache: Don't attempt to sync non-writeable registers
regmap: cache: Step by stride in default sync
regmap: Fix possible sleep-in-atomic in regmap_bulk_write()
regmap: Ensure regmap_register_patch() is compatible with fast_io
regmap: irq: Set data pointer only on regmap_add_irq_chip success
regmap: Implementation for regmap_multi_reg_write
regmap: add regmap_parse_val api
mfd: arizona: Use new regmap features for manual register patch
regmap: Base regmap_register_patch on _regmap_multi_reg_write
regmap: Add bypassed version of regmap_multi_reg_write
regmap: Mark reg_defaults in regmap_multi_reg_write as const
regmap: fix coccinelle warnings
regmap: Check stride of register patch as we register it
regmap: Clean up _regmap_update_bits()
regmap: Separate regmap dev initialization
regmap: Check readable regs in _regmap_read
regmap: irq: Remove domain on exit
...
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/regmap.h | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/include/linux/regmap.h b/include/linux/regmap.h index 4149f1a9b00..5ad86eacef0 100644 --- a/include/linux/regmap.h +++ b/include/linux/regmap.h @@ -164,6 +164,9 @@ typedef void (*regmap_unlock)(void *); * @use_single_rw: If set, converts the bulk read and write operations into * a series of single read and write operations. This is useful * for device that does not support bulk read and write. + * @can_multi_write: If set, the device supports the multi write mode of bulk + * write operations, if clear multi write requests will be + * split into individual write operations * * @cache_type: The actual cache type. * @reg_defaults_raw: Power on reset values for registers (for use with @@ -215,6 +218,7 @@ struct regmap_config { u8 write_flag_mask; bool use_single_rw; + bool can_multi_write; enum regmap_endian reg_format_endian; enum regmap_endian val_format_endian; @@ -317,6 +321,8 @@ struct regmap *regmap_init(struct device *dev, const struct regmap_bus *bus, void *bus_context, const struct regmap_config *config); +int regmap_attach_dev(struct device *dev, struct regmap *map, + const struct regmap_config *config); struct regmap *regmap_init_i2c(struct i2c_client *i2c, const struct regmap_config *config); struct regmap *regmap_init_spi(struct spi_device *dev, @@ -386,8 +392,11 @@ 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, struct reg_default *regs, +int regmap_multi_reg_write(struct regmap *map, const struct reg_default *regs, int num_regs); +int regmap_multi_reg_write_bypassed(struct regmap *map, + const struct reg_default *regs, + int num_regs); int regmap_raw_write_async(struct regmap *map, unsigned int reg, const void *val, size_t val_len); int regmap_read(struct regmap *map, unsigned int reg, unsigned int *val); @@ -423,6 +432,8 @@ bool regmap_check_range_table(struct regmap *map, unsigned int reg, int regmap_register_patch(struct regmap *map, const struct reg_default *regs, int num_regs); +int regmap_parse_val(struct regmap *map, const void *buf, + unsigned int *val); static inline bool regmap_reg_in_range(unsigned int reg, const struct regmap_range *range) @@ -695,6 +706,13 @@ static inline int regmap_register_patch(struct regmap *map, return -EINVAL; } +static inline int regmap_parse_val(struct regmap *map, const void *buf, + unsigned int *val) +{ + WARN_ONCE(1, "regmap API is disabled"); + return -EINVAL; +} + static inline struct regmap *dev_get_regmap(struct device *dev, const char *name) { |