[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1450422693-371-1-git-send-email-djkurtz@chromium.org>
Date: Fri, 18 Dec 2015 15:11:33 +0800
From: Daniel Kurtz <djkurtz@...omium.org>
To: Henry Chen <henryc.chen@...iatek.com>
Cc: linux-mediatek@...ts.infradead.org, eddie.huang@...iatek.com,
Matthias Brugger <matthias.bgg@...il.com>,
Daniel Kurtz <djkurtz@...omium.org>,
Liam Girdwood <lgirdwood@...il.com>,
Mark Brown <broonie@...nel.org>,
linux-kernel@...r.kernel.org (open list:VOLTAGE AND CURRENT REGULATOR
FRAMEWORK)
Subject: [RESEND PATCH] 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@...omium.org>
---
I used the wrong commit message subject in the first attempt.
Maybe this time someone will review it ;-).
---
drivers/regulator/mt6311-regulator.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/regulator/mt6311-regulator.c b/drivers/regulator/mt6311-regulator.c
index 02c4e5f..0495716 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 */
--
2.6.0.rc2.230.g3dd15c0
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists