linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: linux-kernel@vger.kernel.org
Cc: Liam Girdwood <lgirdwood@gmail.com>,
	Mark Brown <broonie@kernel.org>,
	kernel@pengutronix.de, linux-arm-kernel@lists.infradead.org,
	Sascha Hauer <s.hauer@pengutronix.de>
Subject: [PATCH 1/6] Revert "regulator: core: Handle full constraints systems when resolving supplies"
Date: Wed, 30 Sep 2015 16:05:41 +0200	[thread overview]
Message-ID: <1443621946-8712-2-git-send-email-s.hauer@pengutronix.de> (raw)
In-Reply-To: <1443621946-8712-1-git-send-email-s.hauer@pengutronix.de>

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


  reply	other threads:[~2015-09-30 14:06 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-30 14:05 [RFC] regulator: Propagate voltage changes to supply regulators Sascha Hauer
2015-09-30 14:05 ` Sascha Hauer [this message]
2015-09-30 18:03   ` [PATCH 1/6] Revert "regulator: core: Handle full constraints systems when resolving supplies" Mark Brown
2015-09-30 14:05 ` [PATCH 2/6] regulator: core: introduce function to lock regulators and its supplies Sascha Hauer
2015-09-30 14:21   ` kbuild test robot
2015-09-30 14:05 ` [PATCH 3/6] regulator: core: create unlocked version of regulator_list_voltage Sascha Hauer
2015-09-30 22:36   ` Mark Brown
2015-10-01 11:29     ` Mark Brown
2015-09-30 14:05 ` [PATCH 4/6] regulator: core: Propagate voltage changes to supply regulators Sascha Hauer
2015-10-02 17:32   ` Mark Brown
2015-10-12 11:42     ` Sascha Hauer
2015-10-12 14:07       ` Mark Brown
2015-10-13  9:30         ` Sascha Hauer
2015-09-30 14:05 ` [PATCH 5/6] regulator: i.MX anatop: Allow supply regulator Sascha Hauer
2015-09-30 14:05 ` [PATCH 6/6] ARM: i.MX6 Phytec PFLA02: Add supplies for the SoC internal regulators Sascha Hauer
2015-10-02 17:33   ` Mark Brown
  -- strict thread matches above, loose matches on Subject: below --
2015-09-30 13:57 [RFC] regulator: Propagate voltage changes to supply regulators Sascha Hauer
2015-09-30 13:57 ` [PATCH 1/6] Revert "regulator: core: Handle full constraints systems when resolving supplies" Sascha Hauer
2015-09-30 18:02   ` Mark Brown
2015-09-30 18:48     ` Sascha Hauer
2015-09-30 19:26       ` Mark Brown

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=1443621946-8712-2-git-send-email-s.hauer@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=broonie@kernel.org \
    --cc=kernel@pengutronix.de \
    --cc=lgirdwood@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).