Skip to contentSkip to conversation

clk: Convert Silico Labs drivers to use maple tree register cache

PATCH Applied Mark Brown 2 participants 11 messages Sep 29, 2023 – Oct 10, 2023 Common clk

lore
Share & tools
lore

Mark Brown

author
#0 lore raw

cover clk: Convert Silico Labs drivers to use maple tree register cache

The maple tree register cache uses a more modern data structure than the rbtree cache and makes implementation choices which are likely to be more sensible for modern systems so let's convert drivers to use it.

---
Mark Brown (5):
clk: si514: Convert to use maple tree register cache
clk: si5341: Convert to use maple tree register cache
clk: si5351: Convert to use maple tree register cache
clk: si544: Convert to use maple tree register cache
clk: si570: Convert to use maple tree register cache

 drivers/clk/clk-si514.c  | 2 +-
 drivers/clk/clk-si5341.c | 2 +-
 drivers/clk/clk-si5351.c | 2 +-
 drivers/clk/clk-si544.c  | 2 +-
 drivers/clk/clk-si570.c  | 2 +-
 5 files changed, 5 insertions(+), 5 deletions(-)

---
base-commit: 6465e260f48790807eef06b583b38ca9789b6072
change-id: 20230929-clk-maple-si-d4af02cd3de9

Best regards,

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

PATCH 1/5 clk: si514: Convert to use maple tree register cache

The maple tree register cache is based on a much more modern data structure than the rbtree cache and makes optimisation choices which are probably more appropriate for modern systems than those made by the rbtree cache.

---
 drivers/clk/clk-si514.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/clk/clk-si514.c +1 -1
index e8c18afac184..6ee148e5469d 100644
@@ -321,7 +321,7 @@ static bool si514_regmap_is_writeable(struct device *dev, unsigned int reg)
 static const struct regmap_config si514_regmap_config = {
 	.reg_bits = 8,
 	.val_bits = 8,
-	.cache_type = REGCACHE_RBTREE,
+	.cache_type = REGCACHE_MAPLE,
 	.max_register = SI514_REG_CONTROL,
 	.writeable_reg = si514_regmap_is_writeable,
 	.volatile_reg = si514_regmap_is_volatile,
Signature · 1 line
2.39.2
maintainer Applied
#2 lore raw

Re: [PATCH 1/5] clk: si514: Convert to use maple tree register cache

Quoting Mark Brown (2023-09-29 05:21:59)

Quoted 6 lines

The maple tree register cache is based on a much more modern data structure than the rbtree cache and makes optimisation choices which are probably more appropriate for modern systems than those made by the rbtree cache.

---

Applied to clk-next

author
#3 lore raw

PATCH 2/5 clk: si5341: Convert to use maple tree register cache

In reply to Mark Brown

The maple tree register cache is based on a much more modern data structure than the rbtree cache and makes optimisation choices which are probably more appropriate for modern systems than those made by the rbtree cache.

---
 drivers/clk/clk-si5341.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/clk/clk-si5341.c +1 -1
index 9599857842c7..845b451511d2 100644
@@ -1260,7 +1260,7 @@ static int si5341_wait_device_ready(struct i2c_client *client)
 static const struct regmap_config si5341_regmap_config = {
 	.reg_bits = 8,
 	.val_bits = 8,
-	.cache_type = REGCACHE_RBTREE,
+	.cache_type = REGCACHE_MAPLE,
 	.ranges = si5341_regmap_ranges,
 	.num_ranges = ARRAY_SIZE(si5341_regmap_ranges),
 	.max_register = SI5341_REGISTER_MAX,
Signature · 1 line
2.39.2
maintainer Applied
#4 lore raw

Re: [PATCH 2/5] clk: si5341: Convert to use maple tree register cache

Quoting Mark Brown (2023-09-29 05:22:00)

Quoted 6 lines

The maple tree register cache is based on a much more modern data structure than the rbtree cache and makes optimisation choices which are probably more appropriate for modern systems than those made by the rbtree cache.

---

Applied to clk-next

author
#5 lore raw

PATCH 3/5 clk: si5351: Convert to use maple tree register cache

In reply to Mark Brown

The maple tree register cache is based on a much more modern data structure than the rbtree cache and makes optimisation choices which are probably more appropriate for modern systems than those made by the rbtree cache.

---
 drivers/clk/clk-si5351.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/clk/clk-si5351.c +1 -1
index 00fb9b09e030..cbf7cde01157 100644
@@ -206,7 +206,7 @@ static bool si5351_regmap_is_writeable(struct device *dev, unsigned int reg)
 static const struct regmap_config si5351_regmap_config = {
 	.reg_bits = 8,
 	.val_bits = 8,
-	.cache_type = REGCACHE_RBTREE,
+	.cache_type = REGCACHE_MAPLE,
 	.max_register = 187,
 	.writeable_reg = si5351_regmap_is_writeable,
 	.volatile_reg = si5351_regmap_is_volatile,
Signature · 1 line
2.39.2
maintainer Applied
#6 lore raw

Re: [PATCH 3/5] clk: si5351: Convert to use maple tree register cache

Quoting Mark Brown (2023-09-29 05:22:01)

Quoted 6 lines

The maple tree register cache is based on a much more modern data structure than the rbtree cache and makes optimisation choices which are probably more appropriate for modern systems than those made by the rbtree cache.

---

Applied to clk-next

author
#7 lore raw

PATCH 4/5 clk: si544: Convert to use maple tree register cache

In reply to Mark Brown

The maple tree register cache is based on a much more modern data structure than the rbtree cache and makes optimisation choices which are probably more appropriate for modern systems than those made by the rbtree cache.

---
 drivers/clk/clk-si544.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/clk/clk-si544.c +1 -1
index 22925968aa35..c4288cf83f9f 100644
@@ -446,7 +446,7 @@ static bool si544_regmap_is_volatile(struct device *dev, unsigned int reg)
 static const struct regmap_config si544_regmap_config = {
 	.reg_bits = 8,
 	.val_bits = 8,
-	.cache_type = REGCACHE_RBTREE,
+	.cache_type = REGCACHE_MAPLE,
 	.max_register = SI544_REG_PAGE_SELECT,
 	.volatile_reg = si544_regmap_is_volatile,
 };
Signature · 1 line
2.39.2
maintainer Applied
#8 lore raw

Re: [PATCH 4/5] clk: si544: Convert to use maple tree register cache

Quoting Mark Brown (2023-09-29 05:22:02)

Quoted 6 lines

The maple tree register cache is based on a much more modern data structure than the rbtree cache and makes optimisation choices which are probably more appropriate for modern systems than those made by the rbtree cache.

---

Applied to clk-next

author
#9 lore raw

PATCH 5/5 clk: si570: Convert to use maple tree register cache

In reply to Mark Brown

The maple tree register cache is based on a much more modern data structure than the rbtree cache and makes optimisation choices which are probably more appropriate for modern systems than those made by the rbtree cache.

---
 drivers/clk/clk-si570.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/clk/clk-si570.c +1 -1
index de0212fb5f87..262f582c9213 100644
@@ -392,7 +392,7 @@ static bool si570_regmap_is_writeable(struct device *dev, unsigned int reg)
 static const struct regmap_config si570_regmap_config = {
 	.reg_bits = 8,
 	.val_bits = 8,
-	.cache_type = REGCACHE_RBTREE,
+	.cache_type = REGCACHE_MAPLE,
 	.max_register = 137,
 	.writeable_reg = si570_regmap_is_writeable,
 	.volatile_reg = si570_regmap_is_volatile,
Signature · 1 line
2.39.2
maintainer Applied
#10 lore raw

Re: [PATCH 5/5] clk: si570: Convert to use maple tree register cache

Quoting Mark Brown (2023-09-29 05:22:03)

Quoted 6 lines

The maple tree register cache is based on a much more modern data structure than the rbtree cache and makes optimisation choices which are probably more appropriate for modern systems than those made by the rbtree cache.

---

Applied to clk-next