All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] cpufreq: mediatek: Use REGCACHE_RBTREE
@ 2015-11-30 10:12 ` Daniel Kurtz
  0 siblings, 0 replies; 4+ messages in thread
From: Daniel Kurtz @ 2015-11-30 10:12 UTC (permalink / raw)
  Cc: Daniel Kurtz, Liam Girdwood, Mark Brown, Matthias Brugger,
	open list:VOLTAGE AND CURRENT REGULATOR FRAMEWORK,
	moderated list:ARM/Mediatek SoC support,
	moderated list:ARM/Mediatek SoC support

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>
---
 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


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH] cpufreq: mediatek: Use REGCACHE_RBTREE
@ 2015-11-30 10:12 ` Daniel Kurtz
  0 siblings, 0 replies; 4+ messages in thread
From: Daniel Kurtz @ 2015-11-30 10:12 UTC (permalink / raw)
  Cc: Daniel Kurtz, Liam Girdwood, Mark Brown, Matthias Brugger,
	open list:VOLTAGE AND CURRENT REGULATOR FRAMEWORK,
	moderated list:ARM/Mediatek SoC support,
	moderated list:ARM/Mediatek SoC support

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>
---
 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

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH] cpufreq: mediatek: Use REGCACHE_RBTREE
@ 2015-11-30 10:12 ` Daniel Kurtz
  0 siblings, 0 replies; 4+ messages in thread
From: Daniel Kurtz @ 2015-11-30 10:12 UTC (permalink / raw)
  To: linux-arm-kernel

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>
---
 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

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Applied "regulator: mt6311: Use REGCACHE_RBTREE" to the regulator tree
  2015-11-30 10:12 ` Daniel Kurtz
  (?)
  (?)
@ 2015-12-18 12:15 ` Mark Brown
  -1 siblings, 0 replies; 4+ messages in thread
From: Mark Brown @ 2015-12-18 12:15 UTC (permalink / raw)
  To: Daniel Kurtz, Henry Chen, Mark Brown; +Cc: linux-kernel

The patch

   regulator: mt6311: Use REGCACHE_RBTREE

has been applied to the regulator tree at

   git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator.git 

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.  

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark

>From 47769cbc09ebb13ffd1e2d017b698dddf7fd2855 Mon Sep 17 00:00:00 2001
From: Daniel Kurtz <djkurtz@chromium.org>
Date: Fri, 18 Dec 2015 15:11:33 +0800
Subject: [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@chromium.org>
Acked-by: Henry Chen <henryc.chen@mediatek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 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 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 */
-- 
2.6.2


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-12-18 12:16 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-30 10:12 [PATCH] cpufreq: mediatek: Use REGCACHE_RBTREE Daniel Kurtz
2015-11-30 10:12 ` Daniel Kurtz
2015-11-30 10:12 ` Daniel Kurtz
2015-12-18 12:15 ` Applied "regulator: mt6311: Use REGCACHE_RBTREE" to the regulator tree Mark Brown

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.