From: Leonard Crestez <leonard.crestez@nxp.com>
To: Mark Brown <broonie@kernel.org>,
Liam Girdwood <lgirdwood@gmail.com>,
Viresh Kumar <viresh.kumar@linaro.org>,
"Rafael J. Wysocki" <rjw@rjwysocki.net>,
Shawn Guo <shawnguo@kernel.org>,
Sascha Hauer <kernel@pengutronix.de>
Cc: Leonard Crestez <leonard.crestez@nxp.com>,
Robin Gong <yibin.gong@nxp.com>,
Anson Huang <Anson.Huang@nxp.com>,
Irina Tirdea <irina.tirdea@nxp.com>,
Rob Herring <robh+dt@kernel.org>,
Mark Rutland <mark.rutland@arm.com>,
Fabio Estevam <fabio.estevam@nxp.com>,
Octavian Purdila <octavian.purdila@nxp.com>,
<linux-pm@vger.kernel.org>,
<linux-arm-kernel@lists.infradead.org>,
<devicetree@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: [RFC 5/8] regulator: anatop: fix min dropout for bypass mode
Date: Wed, 22 Mar 2017 18:53:07 +0200 [thread overview]
Message-ID: <cd944a7223cfe68788c299082a5f262e8bea2136.1490199005.git.leonard.crestez@nxp.com> (raw)
In-Reply-To: <cover.1490199005.git.leonard.crestez@nxp.com>
From: Irina Tirdea <irina.tirdea@nxp.com>
In bypass mode, the anatop digital regulators do not have any minimum
dropout value (the input voltage is equal to the output voltage according
to documentation).
Having a min dropout value of 125mV will lead to an increased voltage
for PMIC supplies.
Only set minimum dropout value for ldo enabled mode.
Signed-off-by: Irina Tirdea <irina.tirdea@nxp.com>
Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com>
---
drivers/regulator/anatop-regulator.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/drivers/regulator/anatop-regulator.c b/drivers/regulator/anatop-regulator.c
index b041f27..64554e8 100644
--- a/drivers/regulator/anatop-regulator.c
+++ b/drivers/regulator/anatop-regulator.c
@@ -38,6 +38,8 @@
#define LDO_POWER_GATE 0x00
#define LDO_FET_FULL_ON 0x1f
+#define LDO_MIN_DROPOUT_UV 125000
+
struct anatop_regulator {
const char *name;
u32 control_reg;
@@ -153,6 +155,10 @@ static int anatop_regmap_set_bypass(struct regulator_dev *reg, bool enable)
sel = enable ? LDO_FET_FULL_ON : anatop_reg->sel;
anatop_reg->bypass = enable;
+ if (anatop_reg->bypass)
+ anatop_reg->rdesc.min_dropout_uV = 0;
+ else
+ anatop_reg->rdesc.min_dropout_uV = LDO_MIN_DROPOUT_UV;
return regulator_set_voltage_sel_regmap(reg, sel);
}
@@ -264,7 +270,7 @@ static int anatop_regulator_probe(struct platform_device *pdev)
rdesc->vsel_reg = sreg->control_reg;
rdesc->vsel_mask = ((1 << sreg->vol_bit_width) - 1) <<
sreg->vol_bit_shift;
- rdesc->min_dropout_uV = 125000;
+ rdesc->min_dropout_uV = LDO_MIN_DROPOUT_UV;
config.dev = &pdev->dev;
config.init_data = initdata;
@@ -286,6 +292,7 @@ static int anatop_regulator_probe(struct platform_device *pdev)
if (sreg->sel == LDO_FET_FULL_ON) {
sreg->sel = 0;
sreg->bypass = true;
+ rdesc->min_dropout_uV = 0;
}
/*
--
2.7.4
next prev parent reply other threads:[~2017-03-22 17:09 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-22 16:53 [RFC 0/8] ARM: imx: Upstream fsl,ldo-bypass Leonard Crestez
2017-03-22 16:53 ` [RFC 1/8] ARM: imx: gpc: Do not print error message for EPROBE_DEFER Leonard Crestez
2017-03-22 16:53 ` [RFC 2/8] cpufreq: imx6q: Fix handling EPROBE_DEFER from regulator Leonard Crestez
2017-03-23 4:33 ` Viresh Kumar
2017-03-22 16:53 ` [RFC 3/8] cpufreq: imx6q: Set max suspend_freq to avoid changes during suspend Leonard Crestez
2017-03-23 4:34 ` Viresh Kumar
2017-03-28 20:03 ` Leonard Crestez
2017-03-28 20:50 ` Rafael J. Wysocki
2017-03-28 22:23 ` Rafael J. Wysocki
2017-03-22 16:53 ` [RFC 4/8] regulator: core: Check enabling bypass respects constraints Leonard Crestez
2017-03-24 12:52 ` Mark Brown
2017-03-28 12:39 ` Leonard Crestez
2017-03-28 16:47 ` Mark Brown
2017-03-28 19:49 ` Leonard Crestez
2017-04-06 18:52 ` Mark Brown
2017-04-07 10:51 ` Leonard Crestez
2017-04-07 11:22 ` Mark Brown
2017-04-13 20:46 ` Leonard Crestez
2017-03-22 16:53 ` Leonard Crestez [this message]
2017-03-24 12:54 ` [RFC 5/8] regulator: anatop: fix min dropout for bypass mode Mark Brown
2017-03-28 11:52 ` Leonard Crestez
2017-03-22 16:53 ` [RFC 6/8] regulator: core: Add regulator_is_bypass function Leonard Crestez
2017-03-24 12:55 ` Mark Brown
2017-03-28 14:53 ` Leonard Crestez
2017-03-22 16:53 ` [RFC 7/8] cpufreq: imx6q: Initialize LDO bypass Leonard Crestez
2017-03-22 17:09 ` Lucas Stach
2017-03-22 17:48 ` Leonard Crestez
2017-03-22 18:00 ` Lucas Stach
2017-03-22 16:53 ` [RFC 8/8] ARM: dts: imx6qdl-sabresd: Enable fsl,ldo-bypass Leonard Crestez
2017-03-22 17:13 ` Lucas Stach
2017-03-29 13:32 ` Leonard Crestez
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cd944a7223cfe68788c299082a5f262e8bea2136.1490199005.git.leonard.crestez@nxp.com \
--to=leonard.crestez@nxp.com \
--cc=Anson.Huang@nxp.com \
--cc=broonie@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=fabio.estevam@nxp.com \
--cc=irina.tirdea@nxp.com \
--cc=kernel@pengutronix.de \
--cc=lgirdwood@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=octavian.purdila@nxp.com \
--cc=rjw@rjwysocki.net \
--cc=robh+dt@kernel.org \
--cc=shawnguo@kernel.org \
--cc=viresh.kumar@linaro.org \
--cc=yibin.gong@nxp.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®