summaryrefslogtreecommitdiffstats
path: root/drivers/regulator
diff options
context:
space:
mode:
authorDaniel Kurtz <djkurtz@chromium.org>2015-12-18 08:11:33 +0100
committerMark Brown <broonie@kernel.org>2015-12-18 13:14:27 +0100
commit47769cbc09ebb13ffd1e2d017b698dddf7fd2855 (patch)
tree14054f85d8ea302c9a531c48838bf31e539b0f21 /drivers/regulator
parentLinux 4.4-rc1 (diff)
downloadlinux-47769cbc09ebb13ffd1e2d017b698dddf7fd2855.tar.xz
linux-47769cbc09ebb13ffd1e2d017b698dddf7fd2855.zip
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>
Diffstat (limited to 'drivers/regulator')
-rw-r--r--drivers/regulator/mt6311-regulator.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/regulator/mt6311-regulator.c b/drivers/regulator/mt6311-regulator.c
index 02c4e5feca8e..0495716fd35f 100644
--- a/drivers/regulator/mt6311-regulator.c
+++ b/drivers/regulator/mt6311-regulator.c
@@ -30,6 +30,7 @@ static const struct regmap_config mt6311_regmap_config = {
.reg_bits = 8,
.val_bits = 8,
.max_register = MT6311_FQMTR_CON4,
+ .cache_type = REGCACHE_RBTREE,
};
/* Default limits measured in millivolts and milliamps */