regulator: mt6311: Use REGCACHE_RBTREE
authorDaniel Kurtz <djkurtz@chromium.org>
Fri, 18 Dec 2015 07:11:33 +0000 (15:11 +0800)
committerMark Brown <broonie@kernel.org>
Fri, 18 Dec 2015 12:14:27 +0000 (12:14 +0000)
commit47769cbc09ebb13ffd1e2d017b698dddf7fd2855
tree14054f85d8ea302c9a531c48838bf31e539b0f21
parent8005c49d9aea74d382f474ce11afbbc7d7130bec
regulator: mt6311: Use REGCACHE_RBTREE

This regulator is on a slow i2c bus.  Register accesses are very simple,
they all either enable/disable a regulator channel, or select a new
voltage level.  Thus, reading registers from the device will always
return what was last written.

Therefore we can save a lot of time when reading registers by using a
regmap_cache.  Since the register map is relatively large, but we only
ever access a few of them, we use an RBTREE cache.

Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
Acked-by: Henry Chen <henryc.chen@mediatek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/regulator/mt6311-regulator.c