diff options
author | Mark Brown <broonie@kernel.org> | 2022-02-22 21:52:44 +0000 |
---|---|---|
committer | Hans Verkuil <hverkuil-cisco@xs4all.nl> | 2022-03-07 17:21:53 +0100 |
commit | 42a55435b0ef6b80a3e81e8ca642cd866d260b08 (patch) | |
tree | 34fc99305ed8926329308bb06e5f000092efcfea /lib/refcount.c | |
parent | 12fdba564afd1f80eeaeed55c1c81761addda161 (diff) | |
download | linux-42a55435b0ef6b80a3e81e8ca642cd866d260b08.tar.bz2 |
media: i2c: max2175: Use rbtree rather than flat register cache
The max2175 uses a flat register cache but supplies only a single default
value and has many volatile registers. This is a poor fit for a flat cache
since the cache will assume a default of zero for any register not yet
written which can lead to bugs for example when regmap_update_bits()
suppresses a noop write. A rbtree cache is a much better fit, this will
only cache default values and values that have been written to the device
with any reads of uncached values going to the hardware. Convert the driver
to use a rbtree cache.
Since the device is controlled via I2C the cost of manging the rbtree
should be immaterial compared to the cost of accessing the device.
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Diffstat (limited to 'lib/refcount.c')
0 files changed, 0 insertions, 0 deletions