Skip to contentSkip to conversation

mfd: tps65217: Tell regmap what registers are valid

PATCH Applied Mark Brown 2 participants 2 messages Sep 5, 2014 – Sep 8, 2014

Subsystems (2)
lore
Share & tools
lore

Mark Brown

author
#0 lore raw

PATCH 1/1 mfd: tps65217: Tell regmap what registers are valid

Allow regmap to provide debugfs access to the register map by telling it what registers are valid.

---
 drivers/mfd/tps65217.c       | 2 ++
 include/linux/mfd/tps65217.h | 2 ++
 2 files changed, 4 insertions(+)
drivers/mfd/tps65217.c +2 -0
index 3cc4c7084b92..a8ee52c95f2f 100644
@@ -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[] = {
include/linux/mfd/tps65217.h +2 -0
index 95d6938737fd..ac7fba44d7e4 100644
@@ -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
Signature · 1 line
2.1.0
Applied
#1 lore raw
Quoted 8 lines · Mark Brown

Allow regmap to provide debugfs access to the register map by telling it what registers are valid.

---
 drivers/mfd/tps65217.c       | 2 ++
 include/linux/mfd/tps65217.h | 2 ++
 2 files changed, 4 insertions(+)

Applied, thanks.

Quoted 26 lines
drivers/mfd/tps65217.c +2 -0
index 3cc4c7084b92..a8ee52c95f2f 100644
@@ -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[] = {
include/linux/mfd/tps65217.h +2 -0
index 95d6938737fd..ac7fba44d7e4 100644
@@ -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
Signature · 4 lines
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog