Commit 575343d1 authored by Krzysztof Kozlowski's avatar Krzysztof Kozlowski Committed by Lee Jones

mfd: max14577: Add muic prefix to regmap config

Add muic prefix to regmap config to differentiate between another regmap
config for MAX77836 PMIC node. Additionally remove unused
symbols: MAX14577_REG_INVALID and max14577_irq_source.
Signed-off-by: default avatarKrzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
parent 4005da5c
...@@ -37,7 +37,7 @@ static struct mfd_cell max14577_devs[] = { ...@@ -37,7 +37,7 @@ static struct mfd_cell max14577_devs[] = {
{ .name = "max14577-charger", }, { .name = "max14577-charger", },
}; };
static bool max14577_volatile_reg(struct device *dev, unsigned int reg) static bool max14577_muic_volatile_reg(struct device *dev, unsigned int reg)
{ {
switch (reg) { switch (reg) {
case MAX14577_REG_INT1 ... MAX14577_REG_STATUS3: case MAX14577_REG_INT1 ... MAX14577_REG_STATUS3:
...@@ -48,10 +48,10 @@ static bool max14577_volatile_reg(struct device *dev, unsigned int reg) ...@@ -48,10 +48,10 @@ static bool max14577_volatile_reg(struct device *dev, unsigned int reg)
return false; return false;
} }
static const struct regmap_config max14577_regmap_config = { static const struct regmap_config max14577_muic_regmap_config = {
.reg_bits = 8, .reg_bits = 8,
.val_bits = 8, .val_bits = 8,
.volatile_reg = max14577_volatile_reg, .volatile_reg = max14577_muic_volatile_reg,
.max_register = MAX14577_REG_END, .max_register = MAX14577_REG_END,
}; };
...@@ -113,7 +113,8 @@ static int max14577_i2c_probe(struct i2c_client *i2c, ...@@ -113,7 +113,8 @@ static int max14577_i2c_probe(struct i2c_client *i2c,
max14577->i2c = i2c; max14577->i2c = i2c;
max14577->irq = i2c->irq; max14577->irq = i2c->irq;
max14577->regmap = devm_regmap_init_i2c(i2c, &max14577_regmap_config); max14577->regmap = devm_regmap_init_i2c(i2c,
&max14577_muic_regmap_config);
if (IS_ERR(max14577->regmap)) { if (IS_ERR(max14577->regmap)) {
ret = PTR_ERR(max14577->regmap); ret = PTR_ERR(max14577->regmap);
dev_err(max14577->dev, "Failed to allocate register map: %d\n", dev_err(max14577->dev, "Failed to allocate register map: %d\n",
......
...@@ -22,9 +22,7 @@ ...@@ -22,9 +22,7 @@
#include <linux/i2c.h> #include <linux/i2c.h>
#include <linux/regmap.h> #include <linux/regmap.h>
#define MAX14577_REG_INVALID (0xff) /* Slave addr = 0x4A: MUIC and Charger */
/* Slave addr = 0x4A: Interrupt */
enum max14577_reg { enum max14577_reg {
MAX14577_REG_DEVICEID = 0x00, MAX14577_REG_DEVICEID = 0x00,
MAX14577_REG_INT1 = 0x01, MAX14577_REG_INT1 = 0x01,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment