Skip to content

Commit 292d64f

Browse files
wensbroonie
authored andcommitted
regulator: mt6315: Add regulator supplies
The MT6315 family of PMICs has 4 buck regulators. Each regulator has a separate supply. Add these supplies to the driver. Signed-off-by: Chen-Yu Tsai <wenst@chromium.org> Link: https://patch.msgid.link/20260326081050.1115201-3-wenst@chromium.org Signed-off-by: Mark Brown <broonie@kernel.org>
1 parent d15d0f1 commit 292d64f

1 file changed

Lines changed: 6 additions & 5 deletions

File tree

drivers/regulator/mt6315-regulator.c

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,11 @@ struct mt6315_chip {
3131
struct regmap *regmap;
3232
};
3333

34-
#define MT_BUCK(_name, _bid, _vsel) \
34+
#define MT_BUCK(_name, _bid, _supply, _vsel) \
3535
[_bid] = { \
3636
.desc = { \
3737
.name = _name, \
38+
.supply_name = _supply, \
3839
.of_match = of_match_ptr(_name), \
3940
.regulators_node = "regulators", \
4041
.ops = &mt6315_volt_range_ops, \
@@ -190,10 +191,10 @@ static const struct regulator_ops mt6315_volt_range_ops = {
190191
};
191192

192193
static const struct mt6315_regulator_info mt6315_regulators[MT6315_VBUCK_MAX] = {
193-
MT_BUCK("vbuck1", MT6315_VBUCK1, MT6315_BUCK_TOP_ELR0),
194-
MT_BUCK("vbuck2", MT6315_VBUCK2, MT6315_BUCK_TOP_ELR2),
195-
MT_BUCK("vbuck3", MT6315_VBUCK3, MT6315_BUCK_TOP_ELR4),
196-
MT_BUCK("vbuck4", MT6315_VBUCK4, MT6315_BUCK_TOP_ELR6),
194+
MT_BUCK("vbuck1", MT6315_VBUCK1, "pvdd1", MT6315_BUCK_TOP_ELR0),
195+
MT_BUCK("vbuck2", MT6315_VBUCK2, "pvdd2", MT6315_BUCK_TOP_ELR2),
196+
MT_BUCK("vbuck3", MT6315_VBUCK3, "pvdd3", MT6315_BUCK_TOP_ELR4),
197+
MT_BUCK("vbuck4", MT6315_VBUCK4, "pvdd4", MT6315_BUCK_TOP_ELR6),
197198
};
198199

199200
static const struct regmap_config mt6315_regmap_config = {

0 commit comments

Comments
 (0)