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>
This commit is contained in:

committed by
Mark Brown

parent
10524612e8
commit
adaac45975
@@ -311,6 +311,8 @@ typedef void (*regmap_hw_free_context)(void *context);
|
||||
* @val_format_endian_default: Default endianness for formatted register
|
||||
* values. Used when the regmap_config specifies DEFAULT. If this is
|
||||
* DEFAULT, BIG is assumed.
|
||||
* @max_raw_read: Max raw read size that can be used on the bus.
|
||||
* @max_raw_write: Max raw write size that can be used on the bus.
|
||||
*/
|
||||
struct regmap_bus {
|
||||
bool fast_io;
|
||||
@@ -325,6 +327,8 @@ struct regmap_bus {
|
||||
u8 read_flag_mask;
|
||||
enum regmap_endian reg_format_endian_default;
|
||||
enum regmap_endian val_format_endian_default;
|
||||
size_t max_raw_read;
|
||||
size_t max_raw_write;
|
||||
};
|
||||
|
||||
struct regmap *regmap_init(struct device *dev,
|
||||
|
Reference in New Issue
Block a user