summaryrefslogtreecommitdiff
path: root/drivers/regulator
diff options
context:
space:
mode:
authorRobin Gong <yibin.gong@nxp.com>2018-06-21 23:26:05 +0800
committerJason Liu <jason.hui.liu@nxp.com>2019-02-12 10:32:25 +0800
commit3baab35103f9c0fc0b1d4239f6dba69af8481ff0 (patch)
tree2bf2fb26ad4860fe8f5e33a75e46784972046766 /drivers/regulator
parent9961bd9227cb019d24ed84eaeab76d44bbfd326d (diff)
MLK-18653-1: regulator: bd71837: correct ldo setting for BD71840
For customed BD71840 on i.mx8mm-evk board, LDO1/LDO2 setting is different as BD71837, and no LDOx_SEL for LDO3/4. Correct LDO1_VOLT_SEL/ LDO1_VOLT_SEL and remove unused LDO enable code in probe, since those can be done by 'regulator-boot-on'/'regulator-always-on' in dts. Signed-off-by: Robin Gong <yibin.gong@nxp.com>
Diffstat (limited to 'drivers/regulator')
-rw-r--r--drivers/regulator/bd71837-regulator.c26
1 files changed, 4 insertions, 22 deletions
diff --git a/drivers/regulator/bd71837-regulator.c b/drivers/regulator/bd71837-regulator.c
index a4cd4205af01..05ceb6a0af03 100644
--- a/drivers/regulator/bd71837-regulator.c
+++ b/drivers/regulator/bd71837-regulator.c
@@ -346,7 +346,7 @@ static const struct regulator_desc bd71837_regulators[] = {
.vsel_reg = BD71837_REG_LDO1_VOLT,
.vsel_mask = LDO1_MASK,
.enable_reg = BD71837_REG_LDO1_VOLT,
- .enable_mask = LDO1_SEL|LDO1_EN,
+ .enable_mask = LDO1_EN,
.owner = THIS_MODULE,
},
/*
@@ -361,7 +361,7 @@ static const struct regulator_desc bd71837_regulators[] = {
.n_voltages = BD71837_LDO2_VOLTAGE_NUM,
.min_uV = 900000,
.enable_reg = BD71837_REG_LDO2_VOLT,
- .enable_mask = LDO2_SEL|LDO2_EN,
+ .enable_mask = LDO2_EN,
.owner = THIS_MODULE,
},
{
@@ -375,7 +375,7 @@ static const struct regulator_desc bd71837_regulators[] = {
.vsel_reg = BD71837_REG_LDO3_VOLT,
.vsel_mask = LDO3_MASK,
.enable_reg = BD71837_REG_LDO3_VOLT,
- .enable_mask = LDO3_SEL|LDO3_EN,
+ .enable_mask = LDO3_EN,
.owner = THIS_MODULE,
},
{
@@ -389,7 +389,7 @@ static const struct regulator_desc bd71837_regulators[] = {
.vsel_reg = BD71837_REG_LDO4_VOLT,
.vsel_mask = LDO4_MASK,
.enable_reg = BD71837_REG_LDO4_VOLT,
- .enable_mask = LDO4_SEL|LDO4_EN,
+ .enable_mask = LDO4_EN,
.owner = THIS_MODULE,
},
{
@@ -861,24 +861,6 @@ static int bd71837_probe(struct platform_device *pdev)
dev_err(&pdev->dev, "Failed to write LOCK register(%d)\n", err);
goto err;
}
- /* Enable LDO5 */
- err = bd71837_set_bits(bd71837, BD71837_REG_LDO5_VOLT, LDO5_EN);
- if (err != 0) {
- dev_err(&pdev->dev, "Failed to enable LDO5 register(%d)\n", err);
- goto err;
- }
- /* Enable LDO6 */
- err = bd71837_set_bits(bd71837, BD71837_REG_LDO6_VOLT, LDO6_EN);
- if (err != 0) {
- dev_err(&pdev->dev, "Failed to enable LDO6 register(%d)\n", err);
- goto err;
- }
- /* Enable LDO7 */
- err = bd71837_set_bits(bd71837, BD71837_REG_LDO7_VOLT, LDO7_EN);
- if (err != 0) {
- dev_err(&pdev->dev, "Failed to enable LDO7 register(%d)\n", err);
- goto err;
- }
for (i = 0; i < BD71837_REGULATOR_CNT; i++) {
struct regulator_init_data *init_data;