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

regulator: tps6287x-regulator: Enable REGCACHE_MAPLE

Enable regmap cache to reduce i2c transactions and corresponding
interrupts if regulator is accessed frequently.

Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
Link: https://patch.msgid.link/20250629095822.868-1-jszhang@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Jisheng Zhang and committed by
Mark Brown
b402dfe8 bd7c7976

+7
+7
drivers/regulator/tps6287x-regulator.c
··· 27 27 #define TPS6287X_CTRL3 0x03 28 28 #define TPS6287X_STATUS 0x04 29 29 30 + static bool tps6287x_volatile_reg(struct device *dev, unsigned int reg) 31 + { 32 + return reg == TPS6287X_STATUS; 33 + } 34 + 30 35 static const struct regmap_config tps6287x_regmap_config = { 31 36 .reg_bits = 8, 32 37 .val_bits = 8, 33 38 .max_register = TPS6287X_STATUS, 39 + .cache_type = REGCACHE_MAPLE, 40 + .volatile_reg = tps6287x_volatile_reg, 34 41 }; 35 42 36 43 static const struct linear_range tps6287x_voltage_ranges[] = {