Skip to content

Commit

Permalink
regmap: permit to set reg_update_bits with bulk implementation
Browse files Browse the repository at this point in the history
A regmap may still require to set a custom reg_update_bits instead of
relying to the regmap_bus_read/write general function.

Permit to set it in the map if provided by the regmap config.

Signed-off-by: Christian Marangi <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Mark Brown <[email protected]>
  • Loading branch information
Ansuel authored and broonie committed Jul 18, 2022
1 parent cf39ed2 commit 739f872
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/base/regmap/regmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -882,6 +882,8 @@ struct regmap *__regmap_init(struct device *dev,

if (config && config->read && config->write) {
map->reg_read = _regmap_bus_read;
if (config->reg_update_bits)
map->reg_update_bits = config->reg_update_bits;

/* Bulk read/write */
map->read = config->read;
Expand Down

0 comments on commit 739f872

Please sign in to comment.