regulator: tps62361: make all register as non-volatile
Laxman Dewangan [Tue, 31 Jul 2012 10:14:03 +0000 (15:14 +0530)]
All register fo TPS62361 is non-volatile and so implementing
this api for regmap actual caching.

bug 993297

Change-Id: I7695ed54bdb0fd9dec13e735264c12b60e18777a
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: http://git-master/r/119592

drivers/regulator/tps62360-regulator.c

index dca2c88..30f79e6 100644 (file)
@@ -323,9 +323,15 @@ static int __devinit tps62360_init_dcdc(struct tps62360_chip *tps,
        return ret;
 }
 
+static bool is_volatile_reg(struct device *dev, unsigned int reg)
+{
+       return false;
+}
+
 static const struct regmap_config tps62360_regmap_config = {
        .reg_bits               = 8,
        .val_bits               = 8,
+       .volatile_reg           = is_volatile_reg,
        .max_register           = REG_CHIPID,
        .cache_type             = REGCACHE_RBTREE,
 };