regmap: flat: Add flat cache type
While for I2C and SPI devices the overhead of using rbtree for devices with only one block of registers is negligible the same isn't always going to be true for MMIO devices where the I/O costs are very much lower. Cater for these devices by adding a simple flat array type for them where the lookups are simple array accesses, taking us right back to the original ASoC cache implementation. Thanks to Magnus Damm for the discussion which prompted this. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
This commit is contained in:
parent
a49f0d1ea3
commit
2ac902ce17
5 changed files with 77 additions and 2 deletions
|
@ -28,7 +28,8 @@ struct regmap_range_cfg;
|
|||
enum regcache_type {
|
||||
REGCACHE_NONE,
|
||||
REGCACHE_RBTREE,
|
||||
REGCACHE_COMPRESSED
|
||||
REGCACHE_COMPRESSED,
|
||||
REGCACHE_FLAT,
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue