Skip to content

Commit

Permalink
regulator: sy8824x: add SY20276 support
Browse files Browse the repository at this point in the history
The differences between SY8824C and SY20276 are different vsel_min,
vsel_step, vsel_count and regs for mode/enable.

Signed-off-by: Jisheng Zhang <Jisheng.Zhang@synaptics.com>
Link: https://lore.kernel.org/r/20190827163721.1947f7a0@xhacker.debian
Signed-off-by: Mark Brown <broonie@kernel.org>
  • Loading branch information
Jisheng Zhang authored and Mark Brown committed Aug 27, 2019
1 parent 253f6cb commit 92fd0db
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions drivers/regulator/sy8824x.c
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,15 @@ static const struct sy8824_config sy8824e_cfg = {
.vsel_count = 64,
};

static const struct sy8824_config sy20276_cfg = {
.vol_reg = 0x00,
.mode_reg = 0x01,
.enable_reg = 0x01,
.vsel_min = 600000,
.vsel_step = 10000,
.vsel_count = 128,
};

static const struct of_device_id sy8824_dt_ids[] = {
{
.compatible = "silergy,sy8824c",
Expand All @@ -180,6 +189,10 @@ static const struct of_device_id sy8824_dt_ids[] = {
.compatible = "silergy,sy8824e",
.data = &sy8824e_cfg
},
{
.compatible = "silergy,sy20276",
.data = &sy20276_cfg
},
{ }
};
MODULE_DEVICE_TABLE(of, sy8824_dt_ids);
Expand Down

0 comments on commit 92fd0db

Please sign in to comment.