mfd: tps65217: Tell regmap what registers are valid
authorMark Brown <broonie@kernel.org>
Fri, 5 Sep 2014 21:16:18 +0000 (22:16 +0100)
committerLee Jones <lee.jones@linaro.org>
Fri, 26 Sep 2014 07:23:50 +0000 (08:23 +0100)
Allow regmap to provide debugfs access to the register map by telling it
what registers are valid.

Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
drivers/mfd/tps65217.c
include/linux/mfd/tps65217.h

index 3cc4c7084b9244dcc18dd42a7ab77a3550e59ddb..a8ee52c95f2fd4b51c4b6989ad840527739031eb 100644 (file)
@@ -146,6 +146,8 @@ EXPORT_SYMBOL_GPL(tps65217_clear_bits);
 static struct regmap_config tps65217_regmap_config = {
        .reg_bits = 8,
        .val_bits = 8,
+
+       .max_register = TPS65217_REG_MAX,
 };
 
 static const struct of_device_id tps65217_of_match[] = {
index 95d6938737fd291b3ab4c340053f21415521bdb9..ac7fba44d7e4d6bde9180e21743d4daae9f9882f 100644 (file)
@@ -60,6 +60,8 @@
 #define TPS65217_REG_SEQ5              0X1D
 #define TPS65217_REG_SEQ6              0X1E
 
+#define TPS65217_REG_MAX               TPS65217_REG_SEQ6
+
 /* Register field definitions */
 #define TPS65217_CHIPID_CHIP_MASK      0xF0
 #define TPS65217_CHIPID_REV_MASK       0x0F