Re: [PATCH 4/4] iio: light: apds9960: convert to use maple tree register cache
From: Andy Shevchenko
Date: Fri Oct 24 2025 - 04:48:34 EST
On Fri, Oct 24, 2025 at 03:38:23PM +0800, Chu Guangqing wrote:
> 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.
...
> .reg_defaults = apds9960_reg_defaults,
> .num_reg_defaults = ARRAY_SIZE(apds9960_reg_defaults),
^^^^ Be careful with such cases, the cache implementations may behave
differently. Have you tested this on the actual HW?
> .max_register = APDS9960_REG_GFIFO_DIR(RIGHT),
> - .cache_type = REGCACHE_RBTREE,
> + .cache_type = REGCACHE_MAPLE,
> };
--
With Best Regards,
Andy Shevchenko