summaryrefslogtreecommitdiff
path: root/drivers/regulator/mp5416.c
diff options
context:
space:
mode:
authorRobert Marko <robimarko@gmail.com>2022-06-04 17:58:16 +0300
committerMark Brown <broonie@kernel.org>2022-06-06 14:39:09 +0300
commitfcdaf74a0abb6a4410b69dd80b525562457daafd (patch)
treed2fa56445dcc3be8fa7f6f69e11848938b393e0c /drivers/regulator/mp5416.c
parentdf43c245dd0535f6e2256e0261d43a4dd72b8b28 (diff)
downloadlinux-fcdaf74a0abb6a4410b69dd80b525562457daafd.tar.xz
regulator: mp5416: add support for MP5496
MP5496 is the updated version of MP5416 with the only difference being that now all Buck regulators have the same 0.6-2.1875V range with a 12.5mV step. Signed-off-by: Robert Marko <robimarko@gmail.com> Acked-by: Saravanan Sekar <sravanhome@gmail.com> Link: https://lore.kernel.org/r/20220604145816.47576-4-robimarko@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/regulator/mp5416.c')
-rw-r--r--drivers/regulator/mp5416.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/regulator/mp5416.c b/drivers/regulator/mp5416.c
index 011a825570ea..71e20e8d78ac 100644
--- a/drivers/regulator/mp5416.c
+++ b/drivers/regulator/mp5416.c
@@ -175,6 +175,17 @@ static struct regulator_desc mp5416_regulators_desc[MP5416_MAX_REGULATORS] = {
MP5416LDO("ldo4", 4, BIT(1)),
};
+static struct regulator_desc mp5496_regulators_desc[MP5416_MAX_REGULATORS] = {
+ MP5416BUCK("buck1", 1, mp5416_I_limits1, MP5416_REG_CTL1, BIT(0), 1),
+ MP5416BUCK("buck2", 2, mp5416_I_limits2, MP5416_REG_CTL1, BIT(1), 1),
+ MP5416BUCK("buck3", 3, mp5416_I_limits1, MP5416_REG_CTL1, BIT(2), 1),
+ MP5416BUCK("buck4", 4, mp5416_I_limits2, MP5416_REG_CTL2, BIT(5), 1),
+ MP5416LDO("ldo1", 1, BIT(4)),
+ MP5416LDO("ldo2", 2, BIT(3)),
+ MP5416LDO("ldo3", 3, BIT(2)),
+ MP5416LDO("ldo4", 4, BIT(1)),
+};
+
static int mp5416_i2c_probe(struct i2c_client *client)
{
struct device *dev = &client->dev;
@@ -212,12 +223,14 @@ static int mp5416_i2c_probe(struct i2c_client *client)
static const struct of_device_id mp5416_of_match[] = {
{ .compatible = "mps,mp5416", .data = &mp5416_regulators_desc },
+ { .compatible = "mps,mp5496", .data = &mp5496_regulators_desc },
{},
};
MODULE_DEVICE_TABLE(of, mp5416_of_match);
static const struct i2c_device_id mp5416_id[] = {
{ "mp5416", },
+ { "mp5496", },
{ },
};
MODULE_DEVICE_TABLE(i2c, mp5416_id);