Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

mfd: axp20x: Update 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. In
v6.5 it has also acquired the ability to generate multi-register writes in
sync operations, bringing performance up to parity with the rbtree cache
there.

Update the axp20x driver to use the more modern data structure, really it
should have been fine even without the most recent round of updates.

Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20230712-mfd-axp20x-maple-v1-1-4df3749107a6@kernel.org
Signed-off-by: Lee Jones <lee@kernel.org>

authored by

Mark Brown and committed by
Lee Jones
cdc707f7 c8f2e7f9

+6 -6
+6 -6
drivers/mfd/axp20x.c
··· 342 342 .wr_table = &axp152_writeable_table, 343 343 .volatile_table = &axp152_volatile_table, 344 344 .max_register = AXP152_PWM1_DUTY_CYCLE, 345 - .cache_type = REGCACHE_RBTREE, 345 + .cache_type = REGCACHE_MAPLE, 346 346 }; 347 347 348 348 static const struct regmap_config axp192_regmap_config = { ··· 360 360 .wr_table = &axp20x_writeable_table, 361 361 .volatile_table = &axp20x_volatile_table, 362 362 .max_register = AXP20X_OCV(AXP20X_OCV_MAX), 363 - .cache_type = REGCACHE_RBTREE, 363 + .cache_type = REGCACHE_MAPLE, 364 364 }; 365 365 366 366 static const struct regmap_config axp22x_regmap_config = { ··· 369 369 .wr_table = &axp22x_writeable_table, 370 370 .volatile_table = &axp22x_volatile_table, 371 371 .max_register = AXP22X_BATLOW_THRES1, 372 - .cache_type = REGCACHE_RBTREE, 372 + .cache_type = REGCACHE_MAPLE, 373 373 }; 374 374 375 375 static const struct regmap_config axp288_regmap_config = { ··· 378 378 .wr_table = &axp288_writeable_table, 379 379 .volatile_table = &axp288_volatile_table, 380 380 .max_register = AXP288_FG_TUNE5, 381 - .cache_type = REGCACHE_RBTREE, 381 + .cache_type = REGCACHE_MAPLE, 382 382 }; 383 383 384 384 static const struct regmap_config axp313a_regmap_config = { ··· 396 396 .wr_table = &axp806_writeable_table, 397 397 .volatile_table = &axp806_volatile_table, 398 398 .max_register = AXP806_REG_ADDR_EXT, 399 - .cache_type = REGCACHE_RBTREE, 399 + .cache_type = REGCACHE_MAPLE, 400 400 }; 401 401 402 402 static const struct regmap_config axp15060_regmap_config = { ··· 405 405 .wr_table = &axp15060_writeable_table, 406 406 .volatile_table = &axp15060_volatile_table, 407 407 .max_register = AXP15060_IRQ2_STATE, 408 - .cache_type = REGCACHE_RBTREE, 408 + .cache_type = REGCACHE_MAPLE, 409 409 }; 410 410 411 411 #define INIT_REGMAP_IRQ(_variant, _irq, _off, _mask) \