Skip to contentSkip to conversation

regulator: Convert Linear Technologies driver to maple tree cache

PATCH In review Mark Brown 1 participant 4 messages Jun 10, 2023 – Jun 19, 2023 Voltage and current regulator framework

lore
Share & tools
lore

Mark Brown

author maintainer
#0 lore raw

cover regulator: Convert Linear Technologies driver to maple tree cache

There are a couple of Linear Technologies devices which can only do single register reads and writes so don't benefit from using the rbtree register cache rather than the more modern maple tree cache, update them to use maple tree.

---
Mark Brown (2):
regulator: ltc3589: Use maple tree register cache
regulator: ltc3676: Use maple tree register cache

 drivers/regulator/ltc3589.c | 2 +-
 drivers/regulator/ltc3676.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

---
base-commit: 9561de3a55bed6bdd44a12820ba81ec416e705a7
change-id: 20230609-regulator-ltc-maple-f7715f2b8686

Best regards,

Signature · 1 line
Mark Brown <[email protected]>
author maintainer
#1 lore raw

PATCH 1/2 regulator: ltc3589: Use maple tree register cache

The ltc3589 can only support single register read and write operations so does not benefit from block writes. This means it gets no benefit from using the rbtree register cache over the maple tree register cache so convert it to use maple trees instead, it is more modern.

---
 drivers/regulator/ltc3589.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/regulator/ltc3589.c +1 -1
index 359b534d8c70..06cfc165ab5f 100644
@@ -348,7 +348,7 @@ static const struct regmap_config ltc3589_regmap_config = {
 	.num_reg_defaults = ARRAY_SIZE(ltc3589_reg_defaults),
 	.use_single_read = true,
 	.use_single_write = true,
-	.cache_type = REGCACHE_RBTREE,
+	.cache_type = REGCACHE_MAPLE,
 };
 
 static irqreturn_t ltc3589_isr(int irq, void *dev_id)
Signature · 1 line
2.30.2
author maintainer
#2 lore raw

PATCH 2/2 regulator: ltc3676: Use maple tree register cache

In reply to Mark Brown

The ltc3676 can only support single register read and write operations so does not benefit from block writes. This means it gets no benefit from using the rbtree register cache over the maple tree register cache so convert it to use maple trees instead, it is more modern.

---
 drivers/regulator/ltc3676.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/regulator/ltc3676.c +1 -1
index a28e6c3460f1..fa3da8134e55 100644
@@ -261,7 +261,7 @@ static const struct regmap_config ltc3676_regmap_config = {
 	.max_register = LTC3676_CLIRQ,
 	.use_single_read = true,
 	.use_single_write = true,
-	.cache_type = REGCACHE_RBTREE,
+	.cache_type = REGCACHE_MAPLE,
 };
 
 static irqreturn_t ltc3676_isr(int irq, void *dev_id)
Signature · 1 line
2.30.2
author maintainer
#3 lore raw
In reply to Mark Brown
Quoted 6 lines · Mark Brown

There are a couple of Linear Technologies devices which can only do single register reads and writes so don't benefit from using the rbtree register cache rather than the more modern maple tree cache, update them to use maple tree.

Applied to

https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator.git for-next

Thanks!

[1/2] regulator: ltc3589: Use maple tree register cache

      commit: 29890a15865deaf7f446119bcb5617b0cc76be03
[2/2] regulator: ltc3676: Use maple tree register cache
      commit: ce44a03db73f7ce7cca152e07bd9cbfc3c10a0ba

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