[RFC PATCH v2 2/3] regmap: Add bus reg_update_bits() support

From: Baolin Wang
Date: Mon Apr 13 2020 - 02:14:03 EST


Add reg_update_bits() support in case some platforms use a special method
to update bits of registers.

Signed-off-by: Baolin Wang <baolin.wang7@xxxxxxxxx>
---
drivers/base/regmap/regmap.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/base/regmap/regmap.c b/drivers/base/regmap/regmap.c
index 59f911e57719..553d92aa0c68 100644
--- a/drivers/base/regmap/regmap.c
+++ b/drivers/base/regmap/regmap.c
@@ -827,6 +827,7 @@ struct regmap *__regmap_init(struct device *dev,
} else if (!bus->read || !bus->write) {
map->reg_read = _regmap_bus_reg_read;
map->reg_write = _regmap_bus_reg_write;
+ map->reg_update_bits = bus->reg_update_bits;

map->defer_caching = false;
goto skip_format_initialization;
--
2.17.1