summaryrefslogtreecommitdiff
path: root/drivers/mfd/max77693.c
diff options
context:
space:
mode:
authorKrzysztof Kozlowski <k.kozlowski@samsung.com>2013-12-20 10:35:08 +0100
committerLee Jones <lee.jones@linaro.org>2014-01-21 08:28:13 +0000
commit75ad13278cb16a0d7f5d24644d36884bfdc92044 (patch)
tree2bc518efec3fbb41e90315342044de3345497a0c /drivers/mfd/max77693.c
parent74142ffc0b52cfe6f9d2f6f34a5f3eedbfe3ce51 (diff)
mfd: max77693: Set proper maximum register for MUIC regmap
The MUIC block in max77693 has different I2C address than PMIC. The driver allocated two regmaps: for PMIC and MUIC. However it used the same regmap_config (with max_register field) for both regmaps. Actual maximum address of register for MUIC is different than for PMIC. Define another regmap_config for MUIC with proper max_register value. Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
Diffstat (limited to 'drivers/mfd/max77693.c')
-rw-r--r--drivers/mfd/max77693.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/mfd/max77693.c b/drivers/mfd/max77693.c
index a0093a839d4b..e0859987ab6b 100644
--- a/drivers/mfd/max77693.c
+++ b/drivers/mfd/max77693.c
@@ -107,6 +107,12 @@ static const struct regmap_config max77693_regmap_config = {
.max_register = MAX77693_PMIC_REG_END,
};
+static const struct regmap_config max77693_regmap_muic_config = {
+ .reg_bits = 8,
+ .val_bits = 8,
+ .max_register = MAX77693_MUIC_REG_END,
+};
+
static int max77693_i2c_probe(struct i2c_client *i2c,
const struct i2c_device_id *id)
{
@@ -153,7 +159,7 @@ static int max77693_i2c_probe(struct i2c_client *i2c,
* before call max77693-muic probe() function.
*/
max77693->regmap_muic = devm_regmap_init_i2c(max77693->muic,
- &max77693_regmap_config);
+ &max77693_regmap_muic_config);
if (IS_ERR(max77693->regmap_muic)) {
ret = PTR_ERR(max77693->regmap_muic);
dev_err(max77693->dev,