ASoC: cs4271: flat regcache, trivial simplifications
- Switch to REGCACHE_FLAT, the whole overhead of RBTREE is not worth it with non sparse register set in the address range 1..7. - Move register width to central location Signed-off-by: Alexander Sverdlin <alexander.sverdlin@gmail.com> Link: https://lore.kernel.org/r/20230410223902.2321834-3-alexander.sverdlin@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
80f4712253
commit
2e9688c81c
@ -17,7 +17,6 @@ static int cs4271_i2c_probe(struct i2c_client *client)
|
||||
|
||||
config = cs4271_regmap_config;
|
||||
config.reg_bits = 8;
|
||||
config.val_bits = 8;
|
||||
|
||||
return cs4271_probe(&client->dev,
|
||||
devm_regmap_init_i2c(client, &config));
|
||||
|
@ -17,7 +17,6 @@ static int cs4271_spi_probe(struct spi_device *spi)
|
||||
|
||||
config = cs4271_regmap_config;
|
||||
config.reg_bits = 16;
|
||||
config.val_bits = 8;
|
||||
config.read_flag_mask = 0x21;
|
||||
config.write_flag_mask = 0x20;
|
||||
|
||||
|
@ -689,8 +689,8 @@ const struct regmap_config cs4271_regmap_config = {
|
||||
|
||||
.reg_defaults = cs4271_reg_defaults,
|
||||
.num_reg_defaults = ARRAY_SIZE(cs4271_reg_defaults),
|
||||
.cache_type = REGCACHE_RBTREE,
|
||||
|
||||
.cache_type = REGCACHE_FLAT,
|
||||
.val_bits = 8,
|
||||
.volatile_reg = cs4271_volatile_reg,
|
||||
};
|
||||
EXPORT_SYMBOL_GPL(cs4271_regmap_config);
|
||||
|
Loading…
x
Reference in New Issue
Block a user