From: Robert Karszniewicz <r.karszniewicz@phytec.de>
To: linux-kernel@vger.kernel.org
Cc: Liam Girdwood <lgirdwood@gmail.com>, Mark Brown <broonie@kernel.org>
Subject: [PATCH 1/1] regulator: of: Hide wrong warning regarding suspend state configuration
Date: Mon, 16 Dec 2019 18:06:21 +0100 [thread overview]
Message-ID: <1576515981-77867-2-git-send-email-r.karszniewicz@phytec.de> (raw)
In-Reply-To: <1576515981-77867-1-git-send-email-r.karszniewicz@phytec.de>
A "No configuration" warning is falsely emitted in the case when the
of-property regulator-always-on is set but regulator-(on|off)-in-suspend
isn't set.
This patch fixes the warning by explicitly setting always-on regulator's
states to ENABLE_IN_SUSPEND.
Signed-off-by: Robert Karszniewicz <r.karszniewicz@phytec.de>
---
Tested on v4.19.67, applies cleanly on v5.5-rc2.
drivers/regulator/of_regulator.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/drivers/regulator/of_regulator.c b/drivers/regulator/of_regulator.c
index 210fc20..3acb1571 100644
--- a/drivers/regulator/of_regulator.c
+++ b/drivers/regulator/of_regulator.c
@@ -188,8 +188,14 @@ static void of_get_regulation_constraints(struct device_node *np,
continue;
}
+ if (!suspend_state)
+ continue;
+
+ if (constraints->always_on)
+ suspend_state->enabled = ENABLE_IN_SUSPEND;
+
suspend_np = of_get_child_by_name(np, regulator_states[i]);
- if (!suspend_np || !suspend_state)
+ if (!suspend_np)
continue;
if (!of_property_read_u32(suspend_np, "regulator-mode",
--
2.7.4
next prev parent reply other threads:[~2019-12-16 17:21 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-16 17:06 [PATCH 0/1] regulator: of: Does always-on imply on-in-suspend? Robert Karszniewicz
2019-12-16 17:06 ` Robert Karszniewicz [this message]
2019-12-16 17:35 ` [PATCH 1/1] regulator: of: Hide wrong warning regarding suspend state configuration Mark Brown
2019-12-16 17:25 ` [PATCH 0/1] regulator: of: Does always-on imply on-in-suspend? 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=1576515981-77867-2-git-send-email-r.karszniewicz@phytec.de \
--to=r.karszniewicz@phytec.de \
--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®