summaryrefslogtreecommitdiffstats
path: root/drivers/mfd/rc5t583.c
diff options
context:
space:
mode:
authorMaciej S. Szmigiero <mail@maciej.szmigiero.name>2016-01-31 22:58:41 +0100
committerLee Jones <lee.jones@linaro.org>2016-03-16 09:50:34 +0100
commita862dc3ea793256a1364991f52e68198a2c5f27d (patch)
tree551c33f00299bc5ccee3e7fc4877d956e58528b5 /drivers/mfd/rc5t583.c
parentgpio: tps65086: Add GPO driver for the TPS65086 PMIC (diff)
downloadlinux-a862dc3ea793256a1364991f52e68198a2c5f27d.tar.xz
linux-a862dc3ea793256a1364991f52e68198a2c5f27d.zip
mfd: rc5t583: Set regmap config reg counts properly
Regmap config max_register field should contain number of device last register, however num_reg_defaults_raw field should be set to register count instead (usually one register more than max_register). rc5t583 driver had both of these fields set to the same value, fix this by introducing separate defines for max register number and total count of registers. Signed-off-by: Maciej S. Szmigiero <mail@maciej.szmigiero.name> Signed-off-by: Lee Jones <lee.jones@linaro.org>
Diffstat (limited to 'drivers/mfd/rc5t583.c')
-rw-r--r--drivers/mfd/rc5t583.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/mfd/rc5t583.c b/drivers/mfd/rc5t583.c
index e10f02f5d551..fc2b2d93f354 100644
--- a/drivers/mfd/rc5t583.c
+++ b/drivers/mfd/rc5t583.c
@@ -241,8 +241,8 @@ static const struct regmap_config rc5t583_regmap_config = {
.reg_bits = 8,
.val_bits = 8,
.volatile_reg = volatile_reg,
- .max_register = RC5T583_MAX_REGS,
- .num_reg_defaults_raw = RC5T583_MAX_REGS,
+ .max_register = RC5T583_MAX_REG,
+ .num_reg_defaults_raw = RC5T583_NUM_REGS,
.cache_type = REGCACHE_RBTREE,
};