diff options
| author | Laxman Dewangan <ldewangan@nvidia.com> | 2016-03-02 05:54:48 -0500 |
|---|---|---|
| committer | Mark Brown <broonie@kernel.org> | 2016-03-02 09:31:45 -0500 |
| commit | 51817f468fb1a903d82ff2edd0e611d04910e675 (patch) | |
| tree | c851de723e3b79442f8934259a3c66a22f518ab4 | |
| parent | 909f7ee0b5f30f735e16864a7ed18d2e6123e6d9 (diff) | |
regulator: max77620: Add support to configure active-discharge
Add regulator ops callback for configuration of active-discharge
and provide necessarily information via regulator descriptor.
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
| -rw-r--r-- | drivers/regulator/max77620-regulator.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/regulator/max77620-regulator.c b/drivers/regulator/max77620-regulator.c index 259e7e159c2f..73a3356a5c19 100644 --- a/drivers/regulator/max77620-regulator.c +++ b/drivers/regulator/max77620-regulator.c | |||
| @@ -578,6 +578,7 @@ static struct regulator_ops max77620_regulator_ops = { | |||
| 578 | .get_mode = max77620_regulator_get_mode, | 578 | .get_mode = max77620_regulator_get_mode, |
| 579 | .set_ramp_delay = max77620_regulator_set_ramp_delay, | 579 | .set_ramp_delay = max77620_regulator_set_ramp_delay, |
| 580 | .set_voltage_time_sel = regulator_set_voltage_time_sel, | 580 | .set_voltage_time_sel = regulator_set_voltage_time_sel, |
| 581 | .set_active_discharge = regulator_set_active_discharge_regmap, | ||
| 581 | }; | 582 | }; |
| 582 | 583 | ||
| 583 | #define MAX77620_SD_CNF2_ROVS_EN_NONE 0 | 584 | #define MAX77620_SD_CNF2_ROVS_EN_NONE 0 |
| @@ -606,6 +607,10 @@ static struct regulator_ops max77620_regulator_ops = { | |||
| 606 | .enable_time = 500, \ | 607 | .enable_time = 500, \ |
| 607 | .vsel_mask = MAX77620_##_volt_mask##_VOLT_MASK, \ | 608 | .vsel_mask = MAX77620_##_volt_mask##_VOLT_MASK, \ |
| 608 | .vsel_reg = MAX77620_REG_##_id, \ | 609 | .vsel_reg = MAX77620_REG_##_id, \ |
| 610 | .active_discharge_off = 0, \ | ||
| 611 | .active_discharge_on = MAX77620_SD_CFG1_ADE_ENABLE, \ | ||
| 612 | .active_discharge_mask = MAX77620_SD_CFG1_ADE_MASK, \ | ||
| 613 | .active_discharge_reg = MAX77620_REG_##_id##_CFG, \ | ||
| 609 | .type = REGULATOR_VOLTAGE, \ | 614 | .type = REGULATOR_VOLTAGE, \ |
| 610 | }, \ | 615 | }, \ |
| 611 | } | 616 | } |
| @@ -633,6 +638,10 @@ static struct regulator_ops max77620_regulator_ops = { | |||
| 633 | .enable_time = 500, \ | 638 | .enable_time = 500, \ |
| 634 | .vsel_mask = MAX77620_LDO_VOLT_MASK, \ | 639 | .vsel_mask = MAX77620_LDO_VOLT_MASK, \ |
| 635 | .vsel_reg = MAX77620_REG_##_id##_CFG, \ | 640 | .vsel_reg = MAX77620_REG_##_id##_CFG, \ |
| 641 | .active_discharge_off = 0, \ | ||
| 642 | .active_discharge_on = MAX77620_LDO_CFG2_ADE_ENABLE, \ | ||
| 643 | .active_discharge_mask = MAX77620_LDO_CFG2_ADE_MASK, \ | ||
| 644 | .active_discharge_reg = MAX77620_REG_##_id##_CFG2, \ | ||
| 636 | .type = REGULATOR_VOLTAGE, \ | 645 | .type = REGULATOR_VOLTAGE, \ |
| 637 | }, \ | 646 | }, \ |
| 638 | } | 647 | } |
