regmap: Add bus reg_update_bits() support

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@gmail.com>
Link: https://lore.kernel.org/r/df32fd0529957d1e7e26ba1465723f16cfbe92c8.1586757922.git.baolin.wang7@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
Baolin Wang 2020-04-13 14:13:20 +08:00 committed by Mark Brown
parent 8f3d9f3542
commit 80215f133d
No known key found for this signature in database
GPG Key ID: 24D68B725D5487D0

View File

@ -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;