diff options
| author | Kiran Gunda <kgunda@codeaurora.org> | 2017-01-23 12:44:02 +0530 |
|---|---|---|
| committer | Kiran Gunda <kgunda@codeaurora.org> | 2017-01-24 10:29:12 +0530 |
| commit | 08db9f492da3f362262cd37d6ff779359ab0b9d8 (patch) | |
| tree | 4440c177d7d7f0bcd0ec86d7e955a0d30d00dcc9 | |
| parent | 9335a12bb020a88365919c6f44850a5b1c4b94b9 (diff) | |
regulator: qpnp-labibb: Do not program LAB_CURRENT_SENSE for PM660A
Programming the default (1.5x) LAB_CURRENT_SENSE configuration is not
required for PM660A. Configure it only if explicitly specified in the
DT config.
CRs-Fixed: 1114628
Change-Id: Ib09e6430e99a7f39a9d2f837494a977daff354ba
Signed-off-by: Kiran Gunda <kgunda@codeaurora.org>
| -rw-r--r-- | drivers/regulator/qpnp-labibb-regulator.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/regulator/qpnp-labibb-regulator.c b/drivers/regulator/qpnp-labibb-regulator.c index 8dbe3080873c..52282cca6b9a 100644 --- a/drivers/regulator/qpnp-labibb-regulator.c +++ b/drivers/regulator/qpnp-labibb-regulator.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2014-2016, The Linux Foundation. All rights reserved. +/* Copyright (c) 2014-2017, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -2643,7 +2643,8 @@ static int register_qpnp_lab_regulator(struct qpnp_labibb *labibb, return rc; } - if (labibb->mode == QPNP_LABIBB_AMOLED_MODE) { + if (labibb->mode == QPNP_LABIBB_AMOLED_MODE && + labibb->pmic_rev_id->pmic_subtype != PM660L_SUBTYPE) { /* * default to 1.5 times current gain if * user doesn't specify the current-sense @@ -2684,7 +2685,7 @@ static int register_qpnp_lab_regulator(struct qpnp_labibb *labibb, val = (labibb->standalone) ? 0 : LAB_IBB_EN_RDY_EN; rc = qpnp_labibb_sec_write(labibb, labibb->lab_base, - REG_LAB_IBB_EN_RDY, val); + REG_LAB_IBB_EN_RDY, val); if (rc < 0) { pr_err("qpnp_lab_sec_write register %x failed rc = %d\n", @@ -3829,9 +3830,10 @@ static int qpnp_labibb_regulator_probe(struct platform_device *pdev) } } dev_set_drvdata(&pdev->dev, labibb); - pr_info("LAB/IBB registered successfully, lab_vreg enable=%d ibb_vreg enable=%d\n", + pr_info("LAB/IBB registered successfully, lab_vreg enable=%d ibb_vreg enable=%d swire_control=%d\n", labibb->lab_vreg.vreg_enabled, - labibb->ibb_vreg.vreg_enabled); + labibb->ibb_vreg.vreg_enabled, + labibb->swire_control); return 0; |
