Skip to content

Commit df7878f

Browse files
marexLee Jones
authored andcommitted
mfd: da9063: Rename PMIC_DA9063 to PMIC_CHIP_ID_DA9063
The PMIC_DA9063 is a complete misnomer, it denotes the value of the DA9063 chip ID register, so rename it as such. It is also the value of chip ID register of DA9063L though, so drop the enum as all the DA9063 "models" share the same chip ID and thus the distinction will have to be made using DT or otherwise. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Acked-by: Mark Brown <broonie@kernel.org> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Acked-by: Steve Twiss <stwiss.opensource@diasemi.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
1 parent c727eea commit df7878f

4 files changed

Lines changed: 4 additions & 6 deletions

File tree

‎drivers/mfd/da9063-core.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ int da9063_device_init(struct da9063 *da9063, unsigned int irq)
192192
dev_err(da9063->dev, "Cannot read chip model id.\n");
193193
return -EIO;
194194
}
195-
if (model != PMIC_DA9063) {
195+
if (model != PMIC_CHIP_ID_DA9063) {
196196
dev_err(da9063->dev, "Invalid chip model id: 0x%02x\n", model);
197197
return -ENODEV;
198198
}

‎drivers/mfd/da9063-i2c.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ static int da9063_i2c_probe(struct i2c_client *i2c,
181181
}
182182

183183
static const struct i2c_device_id da9063_i2c_id[] = {
184-
{"da9063", PMIC_DA9063},
184+
{ "da9063", PMIC_CHIP_ID_DA9063 },
185185
{},
186186
};
187187
MODULE_DEVICE_TABLE(i2c, da9063_i2c_id);

‎drivers/regulator/da9063-regulator.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -585,7 +585,7 @@ static struct da9063_dev_model regulators_models[] = {
585585
{
586586
.regulator_info = da9063_regulator_info,
587587
.n_regulators = ARRAY_SIZE(da9063_regulator_info),
588-
.dev_model = PMIC_DA9063,
588+
.dev_model = PMIC_CHIP_ID_DA9063,
589589
},
590590
{ }
591591
};

‎include/linux/mfd/da9063/core.h‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,7 @@
2929
#define DA9063_DRVNAME_RTC "da9063-rtc"
3030
#define DA9063_DRVNAME_VIBRATION "da9063-vibration"
3131

32-
enum da9063_models {
33-
PMIC_DA9063 = 0x61,
34-
};
32+
#define PMIC_CHIP_ID_DA9063 0x61
3533

3634
enum da9063_variant_codes {
3735
PMIC_DA9063_AD = 0x3,

0 commit comments

Comments
 (0)