* [PATCH 0/1] regulator: of: Does always-on imply on-in-suspend?
@ 2019-12-16 17:06 Robert Karszniewicz
2019-12-16 17:06 ` [PATCH 1/1] regulator: of: Hide wrong warning regarding suspend state configuration Robert Karszniewicz
2019-12-16 17:25 ` [PATCH 0/1] regulator: of: Does always-on imply on-in-suspend? Mark Brown
0 siblings, 2 replies; 4+ messages in thread
From: Robert Karszniewicz @ 2019-12-16 17:06 UTC (permalink / raw)
To: linux-kernel; +Cc: Liam Girdwood, Mark Brown
Hi all.
Just to make sure; the oftree property regulator-always-on implies that for
every suspend state, the property regulator-on-in-suspend is implicit? With no
other side-effect? Reading the documentation, this is what I interpret.
So if that is true, the next message is a patch to fix a bogus
"No configuration" warning in the case when regulator-always-on exists and
suspend states are not set explicitly.
Robert Karszniewicz (1):
regulator: of: Hide wrong warning regarding suspend state
configuration
drivers/regulator/of_regulator.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
--
2.7.4
^ permalink raw reply [flat|nested] 4+ messages in thread* [PATCH 1/1] regulator: of: Hide wrong warning regarding suspend state configuration
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
2019-12-16 17:35 ` Mark Brown
2019-12-16 17:25 ` [PATCH 0/1] regulator: of: Does always-on imply on-in-suspend? Mark Brown
1 sibling, 1 reply; 4+ messages in thread
From: Robert Karszniewicz @ 2019-12-16 17:06 UTC (permalink / raw)
To: linux-kernel; +Cc: Liam Girdwood, Mark Brown
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 0/1] regulator: of: Does always-on imply on-in-suspend?
2019-12-16 17:06 [PATCH 0/1] regulator: of: Does always-on imply on-in-suspend? Robert Karszniewicz
2019-12-16 17:06 ` [PATCH 1/1] regulator: of: Hide wrong warning regarding suspend state configuration Robert Karszniewicz
@ 2019-12-16 17:25 ` Mark Brown
1 sibling, 0 replies; 4+ messages in thread
From: Mark Brown @ 2019-12-16 17:25 UTC (permalink / raw)
To: Robert Karszniewicz; +Cc: linux-kernel, Liam Girdwood
[-- Attachment #1: Type: text/plain, Size: 627 bytes --]
On Mon, Dec 16, 2019 at 06:06:20PM +0100, Robert Karszniewicz wrote:
> Hi all.
>
> Just to make sure; the oftree property regulator-always-on implies that for
> every suspend state, the property regulator-on-in-suspend is implicit? With no
> other side-effect? Reading the documentation, this is what I interpret.
Please don't send cover letters for single patches, if there is anything
that needs saying put it in the changelog of the patch or after the ---
if it's administrative stuff. This reduces mail volume and ensures that
any important information is recorded in the changelog rather than being
lost.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-12-16 17:35 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-16 17:06 [PATCH 0/1] regulator: of: Does always-on imply on-in-suspend? Robert Karszniewicz
2019-12-16 17:06 ` [PATCH 1/1] regulator: of: Hide wrong warning regarding suspend state configuration Robert Karszniewicz
2019-12-16 17:35 ` Mark Brown
2019-12-16 17:25 ` [PATCH 0/1] regulator: of: Does always-on imply on-in-suspend? Mark Brown
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®