diff options
author | Keerthy <j-keerthy@ti.com> | 2017-05-23 17:46:56 +0530 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2017-05-25 17:24:47 +0100 |
commit | be035303182a1260803a1871065d7b1e67c9ebe9 (patch) | |
tree | 666f25c496d73bc3e8d4a87893942013f0c97a60 /drivers/regulator/palmas-regulator.c | |
parent | 2ea659a9ef488125eb46da6eb571de5eae5c43f6 (diff) | |
download | linux-be035303182a1260803a1871065d7b1e67c9ebe9.tar.gz linux-be035303182a1260803a1871065d7b1e67c9ebe9.tar.bz2 linux-be035303182a1260803a1871065d7b1e67c9ebe9.zip |
regulator: tps65917: Add support for SMPS12
App support for SMPS12 dual phase regulator.
Signed-off-by: Keerthy <j-keerthy@ti.com>
Acked-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/regulator/palmas-regulator.c')
-rw-r--r-- | drivers/regulator/palmas-regulator.c | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/drivers/regulator/palmas-regulator.c b/drivers/regulator/palmas-regulator.c index 31ae5ee3a80d..8018a44ed4f7 100644 --- a/drivers/regulator/palmas-regulator.c +++ b/drivers/regulator/palmas-regulator.c @@ -264,6 +264,13 @@ static struct palmas_regs_info tps65917_regs_info[] = { .sleep_id = TPS65917_EXTERNAL_REQSTR_ID_SMPS5, }, { + .name = "SMPS12", + .sname = "smps1-in", + .vsel_addr = TPS65917_SMPS1_VOLTAGE, + .ctrl_addr = TPS65917_SMPS1_CTRL, + .sleep_id = TPS65917_EXTERNAL_REQSTR_ID_SMPS12, + }, + { .name = "LDO1", .sname = "ldo1-in", .vsel_addr = TPS65917_LDO1_VOLTAGE, @@ -367,6 +374,7 @@ static struct palmas_sleep_requestor_info tps65917_sleep_req_info[] = { EXTERNAL_REQUESTOR_TPS65917(SMPS3, 1, 2), EXTERNAL_REQUESTOR_TPS65917(SMPS4, 1, 3), EXTERNAL_REQUESTOR_TPS65917(SMPS5, 1, 4), + EXTERNAL_REQUESTOR_TPS65917(SMPS12, 1, 5), EXTERNAL_REQUESTOR_TPS65917(LDO1, 2, 0), EXTERNAL_REQUESTOR_TPS65917(LDO2, 2, 1), EXTERNAL_REQUESTOR_TPS65917(LDO3, 2, 2), @@ -1305,7 +1313,8 @@ static int tps65917_smps_registration(struct palmas_pmic *pmic, */ desc = &pmic->desc[id]; desc->n_linear_ranges = 3; - if ((id == TPS65917_REG_SMPS2) && pmic->smps12) + if ((id == TPS65917_REG_SMPS2 || id == TPS65917_REG_SMPS1) && + pmic->smps12) continue; /* Initialise sleep/init values from platform data */ @@ -1427,6 +1436,7 @@ static struct of_regulator_match tps65917_matches[] = { { .name = "smps3", }, { .name = "smps4", }, { .name = "smps5", }, + { .name = "smps12",}, { .name = "ldo1", }, { .name = "ldo2", }, { .name = "ldo3", }, @@ -1455,7 +1465,7 @@ static struct palmas_pmic_driver_data palmas_ddata = { static struct palmas_pmic_driver_data tps65917_ddata = { .smps_start = TPS65917_REG_SMPS1, - .smps_end = TPS65917_REG_SMPS5, + .smps_end = TPS65917_REG_SMPS12, .ldo_begin = TPS65917_REG_LDO1, .ldo_end = TPS65917_REG_LDO5, .max_reg = TPS65917_NUM_REGS, @@ -1643,8 +1653,10 @@ static int palmas_regulators_probe(struct platform_device *pdev) if (ret) return ret; - if (reg & PALMAS_SMPS_CTRL_SMPS12_SMPS123_EN) + if (reg & PALMAS_SMPS_CTRL_SMPS12_SMPS123_EN) { pmic->smps123 = 1; + pmic->smps12 = 1; + } if (reg & PALMAS_SMPS_CTRL_SMPS45_SMPS457_EN) pmic->smps457 = 1; |