regmap: split up regmap_config.use_single_rw
Split regmap_config.use_single_rw into use_single_read and use_single_write. This change enables drivers of devices which only support bulk operations in one direction to use the regmap_bulk_*() functions for both directions and have their bulk operation split into single operations only when necessary. Update all struct regmap_config instances where use_single_rw==true to instead set both use_single_read and use_single_write. No attempt was made to evaluate whether it is possible to set only one of use_single_read or use_single_write. Signed-off-by: David Frey <dpfrey@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:

zatwierdzone przez
Mark Brown

rodzic
9ad8eb0168
commit
1c96a2f67c
@@ -206,7 +206,8 @@ static const struct regmap_config apds9960_regmap_config = {
|
||||
.name = APDS9960_REGMAP_NAME,
|
||||
.reg_bits = 8,
|
||||
.val_bits = 8,
|
||||
.use_single_rw = 1,
|
||||
.use_single_read = true,
|
||||
.use_single_write = true,
|
||||
|
||||
.volatile_table = &apds9960_volatile_table,
|
||||
.precious_table = &apds9960_precious_table,
|
||||
|
@@ -473,17 +473,18 @@ static bool max44000_precious_reg(struct device *dev, unsigned int reg)
|
||||
}
|
||||
|
||||
static const struct regmap_config max44000_regmap_config = {
|
||||
.reg_bits = 8,
|
||||
.val_bits = 8,
|
||||
.reg_bits = 8,
|
||||
.val_bits = 8,
|
||||
|
||||
.max_register = MAX44000_REG_PRX_DATA,
|
||||
.readable_reg = max44000_readable_reg,
|
||||
.writeable_reg = max44000_writeable_reg,
|
||||
.volatile_reg = max44000_volatile_reg,
|
||||
.precious_reg = max44000_precious_reg,
|
||||
.max_register = MAX44000_REG_PRX_DATA,
|
||||
.readable_reg = max44000_readable_reg,
|
||||
.writeable_reg = max44000_writeable_reg,
|
||||
.volatile_reg = max44000_volatile_reg,
|
||||
.precious_reg = max44000_precious_reg,
|
||||
|
||||
.use_single_rw = 1,
|
||||
.cache_type = REGCACHE_RBTREE,
|
||||
.use_single_read = true,
|
||||
.use_single_write = true,
|
||||
.cache_type = REGCACHE_RBTREE,
|
||||
};
|
||||
|
||||
static irqreturn_t max44000_trigger_handler(int irq, void *p)
|
||||
|
Reference in New Issue
Block a user