Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1236338 > unrolled thread
| Started by | Sascha Hauer <s.hauer@pengutronix.de> |
|---|---|
| First post | 2015-09-30 16:10 +0200 |
| Last post | 2015-09-30 20:10 +0200 |
| Articles | 3 — 2 participants |
Back to article view | Back to linux.kernel
[RFC] regulator: Propagate voltage changes to supply regulators Sascha Hauer <s.hauer@pengutronix.de> - 2015-09-30 16:10 +0200
[PATCH 1/6] Revert "regulator: core: Handle full constraints systems when resolving supplies" Sascha Hauer <s.hauer@pengutronix.de> - 2015-09-30 16:10 +0200
Re: [PATCH 1/6] Revert "regulator: core: Handle full constraints systems when resolving supplies" Mark Brown <broonie@kernel.org> - 2015-09-30 20:10 +0200
| From | Sascha Hauer <s.hauer@pengutronix.de> |
|---|---|
| Date | 2015-09-30 16:10 +0200 |
| Subject | [RFC] regulator: Propagate voltage changes to supply regulators |
| Message-ID | <qeqf0-7dN-3@gated-at.bofh.it> |
Until now changing the voltage of a regulator only ever effected the regulator itself, but never its supplies. It's a common pattern though to put LDO regulators behind switching regulators. The switching regulators efficiently drop the input voltage but have a high ripple on their output. The output is then cleaned up by the LDOs. For higher energy efficiency the voltage drop at the LDOs should be minimized. This patch adds support for such a scenario. A new min_dropout_uv field is added to struct regulator_desc. Regulators can specify the minimun dropout voltage they need for proper function here. Now when the voltage is changed on a regulator the regulator core makes sure that a) before increasing the voltage on the current regulator the supply provides at least the desired voltage plus the minimum dropout b) after decreasing the voltage on the current regulator the supply is optimized to the minimum required voltage within the needs of the consumers of the supply. Calculating the optimum voltage for the supply regulator is a bit tricky since the simple approach of just adding the desired minimum voltage and the minimum dropout is not enough. It may happen that the current regulator does not support the desired minimum voltage, but only a higher one. This means we have to figure out the lowest voltage supported by the regulator that is higher than the minimum desired voltage. The regulator_get_voltage_floor introduced with this series does exactly that. This is a first RFC for this series which probably has some rough edges, but it was already tested successfully on a Phytec PFLA02 i.MX6 board. Please review, any input welcome. Sascha -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [next] | [standalone]
| From | Sascha Hauer <s.hauer@pengutronix.de> |
|---|---|
| Date | 2015-09-30 16:10 +0200 |
| Subject | [PATCH 1/6] Revert "regulator: core: Handle full constraints systems when resolving supplies" |
| Message-ID | <qeqf1-7dN-43@gated-at.bofh.it> |
| In reply to | #1236338 |
This reverts commit 9f7e25edb1575a6d2363dc003f9cc09d840657e2.
When a regulator A is registered and is supplied by regulator B which is
not yet registered then a regulator_get on regulator A will set the As
supply to the dummy regulator. This is not correct, we should return
-EPROBE_DEFER instead as done without this patch.
Of course reverting this patch brings back the issue it fixed, so this
is not a solution, but what is the correct solution?
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
drivers/regulator/core.c | 10 +++-------
1 file changed, 3 insertions(+), 7 deletions(-)
diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
index 7849187..bd9db70 100644
--- a/drivers/regulator/core.c
+++ b/drivers/regulator/core.c
@@ -1403,13 +1403,9 @@ static int regulator_resolve_supply(struct regulator_dev *rdev)
return 0;
}
- if (have_full_constraints()) {
- r = dummy_regulator_rdev;
- } else {
- dev_err(dev, "Failed to resolve %s-supply for %s\n",
- rdev->supply_name, rdev->desc->name);
- return -EPROBE_DEFER;
- }
+ dev_err(dev, "Failed to resolve %s-supply for %s\n",
+ rdev->supply_name, rdev->desc->name);
+ return -EPROBE_DEFER;
}
/* Recursively resolve the supply of the supply */
--
2.5.3
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Mark Brown <broonie@kernel.org> |
|---|---|
| Date | 2015-09-30 20:10 +0200 |
| Subject | Re: [PATCH 1/6] Revert "regulator: core: Handle full constraints systems when resolving supplies" |
| Message-ID | <qetZf-4bK-9@gated-at.bofh.it> |
| In reply to | #1236340 |
[Multipart message — attachments visible in raw view] — view raw
On Wed, Sep 30, 2015 at 04:05:41PM +0200, Sascha Hauer wrote: > This reverts commit 9f7e25edb1575a6d2363dc003f9cc09d840657e2. > > When a regulator A is registered and is supplied by regulator B which is > not yet registered then a regulator_get on regulator A will set the As > supply to the dummy regulator. This is not correct, we should return > -EPROBE_DEFER instead as done without this patch. What makes you say this is not correct? In a system with fully specified supplies if we fail to resolve the supply we know that no supply will ever appear and so substitute in the dummy on the assumption that there is a supply with no software control.
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web