[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210519221224.2868496-2-dmitry.baryshkov@linaro.org>
Date: Thu, 20 May 2021 01:12:24 +0300
From: Dmitry Baryshkov <dmitry.baryshkov@...aro.org>
To: Liam Girdwood <lgirdwood@...il.com>,
Mark Brown <broonie@...nel.org>
Cc: Michał Mirosław <mirq-linux@...e.qmqm.pl>,
linux-kernel@...r.kernel.org
Subject: [PATCH 2/2] regulator: core: always use enable_delay when enabling regulators
Some regulators (e.g. fixed) do not have .enable callback per se, but
use supply regulator and enable_delay. Do not return early from
_regulator_do_enable in such cases, so that enable_delay is properly
handled.
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@...aro.org>
---
drivers/regulator/core.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
index e20e77e4c159..66c465bd00ca 100644
--- a/drivers/regulator/core.c
+++ b/drivers/regulator/core.c
@@ -2516,7 +2516,8 @@ static int _regulator_do_enable(struct regulator_dev *rdev)
ret = rdev->desc->ops->enable(rdev);
if (ret < 0)
return ret;
- } else {
+ } else if (!rdev->supply) {
+ /* Still handle delay if the regulator was just turned on using the supply */
return -EINVAL;
}
--
2.30.2
Powered by blists - more mailing lists