summaryrefslogtreecommitdiffstats
path: root/include/linux/regmap.h
diff options
context:
space:
mode:
authorMarkus Pargmann <mpa@pengutronix.de>2015-08-30 03:33:53 -0400
committerMark Brown <broonie@kernel.org>2015-08-30 05:19:22 -0400
commitadaac459759db4a1fd35baddbe47bac700095496 (patch)
tree189657c7dffdc13de7f780eb35c1299fb8dbf3fa /include/linux/regmap.h
parent10524612e8aa98804190ec7d0b380cf99c3bdbd7 (diff)
regmap: Introduce max_raw_read/write for regmap_bulk_read/write
There are some buses which have a limit on the maximum number of bytes that can be send/received. An example for this is I2C_FUNC_SMBUS_I2C_BLOCK which does not support any reads/writes of more than 32 bytes. The regmap_bulk operations should still be able to utilize the full 32 bytes in this case. Signed-off-by: Markus Pargmann <mpa@pengutronix.de> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'include/linux/regmap.h')
-rw-r--r--include/linux/regmap.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/regmap.h b/include/linux/regmap.h
index 73fc34d0c4c2..327b8f291d3f 100644
--- a/include/linux/regmap.h
+++ b/include/linux/regmap.h
@@ -311,6 +311,8 @@ typedef void (*regmap_hw_free_context)(void *context);
311 * @val_format_endian_default: Default endianness for formatted register 311 * @val_format_endian_default: Default endianness for formatted register
312 * values. Used when the regmap_config specifies DEFAULT. If this is 312 * values. Used when the regmap_config specifies DEFAULT. If this is
313 * DEFAULT, BIG is assumed. 313 * DEFAULT, BIG is assumed.
314 * @max_raw_read: Max raw read size that can be used on the bus.
315 * @max_raw_write: Max raw write size that can be used on the bus.
314 */ 316 */
315struct regmap_bus { 317struct regmap_bus {
316 bool fast_io; 318 bool fast_io;
@@ -325,6 +327,8 @@ struct regmap_bus {
325 u8 read_flag_mask; 327 u8 read_flag_mask;
326 enum regmap_endian reg_format_endian_default; 328 enum regmap_endian reg_format_endian_default;
327 enum regmap_endian val_format_endian_default; 329 enum regmap_endian val_format_endian_default;
330 size_t max_raw_read;
331 size_t max_raw_write;
328}; 332};
329 333
330struct regmap *regmap_init(struct device *dev, 334struct regmap *regmap_init(struct device *dev,