mfd: Cache tps65910 register when we need it
authorLaxman Dewangan <ldewangan@nvidia.com>
Wed, 9 May 2012 13:10:54 +0000 (18:40 +0530)
committerSamuel Ortiz <sameo@linux.intel.com>
Sun, 20 May 2012 15:26:59 +0000 (17:26 +0200)
During regmap initialization, we do not provide the default value and
hence in place of caching register during regmap_init(), cache it
when actually we need it i.e. after reading of that register.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
drivers/mfd/tps65910.c

index a00c09ea0793ac2bbd18799d5801e34944e3bbeb..01570a789cf186ba091b0d2b7670ddec97042645 100644 (file)
@@ -62,8 +62,7 @@ static const struct regmap_config tps65910_regmap_config = {
        .reg_bits = 8,
        .val_bits = 8,
        .volatile_reg = is_volatile_reg,
-       .max_register = TPS65910_MAX_REGISTER,
-       .num_reg_defaults_raw = TPS65910_MAX_REGISTER,
+       .max_register = TPS65910_MAX_REGISTER - 1,
        .cache_type = REGCACHE_RBTREE,
 };