From: Pablo Mazzini <pmazzini@gmail.com>
To: Mark Brown <broonie@kernel.org>, Liam Girdwood <lgirdwood@gmail.com>
Cc: Pablo Mazzini <pmazzini@gmail.com>,
Alistair Francis <alistair@alistair23.me>,
Andreas Kemnade <andreas@kemnade.info>,
linux-kernel@vger.kernel.org
Subject: [PATCH v3 1/5] regulator: sy7636a: don't wait for power good if already on
Date: Sun, 8 Nov 2026 09:35:58 +0000 [thread overview]
Message-ID: <20261108093602.329554-2-pmazzini@gmail.com> (raw)
In-Reply-To: <20261108093602.329554-1-pmazzini@gmail.com>
A boot-on regulator is already on when the core enables it, so there is
no power good edge and the enable waits for the full timeout. Return
early if power good is already set.
Fixes: 9037a00f3845 ("regulator: sy7636a: wait for power good on enable")
Signed-off-by: Pablo Mazzini <pmazzini@gmail.com>
---
drivers/regulator/sy7636a-regulator.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/regulator/sy7636a-regulator.c b/drivers/regulator/sy7636a-regulator.c
index f87144e921da..6269c50348ac 100644
--- a/drivers/regulator/sy7636a-regulator.c
+++ b/drivers/regulator/sy7636a-regulator.c
@@ -90,6 +90,10 @@ static int sy7636a_enable(struct regulator_dev *rdev)
if (ret)
return ret;
+ /* already on, e.g. a boot-on regulator left on by the bootloader */
+ if (gpiod_get_value_cansleep(data->pgood_gpio) > 0)
+ return 0;
+
wait_for_completion_timeout(&data->pgood_completion,
msecs_to_jiffies(PGOOD_TIMEOUT_MSECS));
ret = gpiod_get_value_cansleep(data->pgood_gpio);
--
2.52.0
next prev parent reply other threads:[~2026-11-08 9:36 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-08 9:35 [PATCH v3 0/5] sy7636a: power the panel only during updates Pablo Mazzini
2026-11-08 9:35 ` Pablo Mazzini [this message]
2026-11-08 9:35 ` [PATCH v3 2/5] hwmon: sy7636a: fix negative temperatures Pablo Mazzini
2026-11-08 9:36 ` [PATCH v3 3/5] regulator: sy7636a: bind to the I2C device directly Pablo Mazzini
2026-11-08 9:36 ` [PATCH v3 4/5] hwmon: sy7636a: read the temperature only while the rails are on Pablo Mazzini
2026-11-08 9:36 ` [PATCH v3 5/5] ARM: imx_v6_v7_defconfig: drop the SY7636A MFD option Pablo Mazzini
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=20261108093602.329554-2-pmazzini@gmail.com \
--to=pmazzini@gmail.com \
--cc=alistair@alistair23.me \
--cc=andreas@kemnade.info \
--cc=broonie@kernel.org \
--cc=lgirdwood@gmail.com \
--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
all inboxes | Powered by JetHome®