regulator: of: Does always-on imply on-in-suspend?
cover regulator: of: Does always-on imply on-in-suspend?
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(-)
Signature · 1 line
2.7.4
PATCH 1/1 regulator: of: Hide wrong warning regarding suspend state configuration
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.
---
Tested on v4.19.67, applies cleanly on v5.5-rc2.
drivers/regulator/of_regulator.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
drivers/regulator/of_regulator.c +7 -1
@@ -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",
Signature · 1 line
2.7.4
Mark Brown
maintainerRe: [PATCH 1/1] regulator: of: Hide wrong warning regarding suspend state configuration
Quoted 5 lines · Robert Karszniewicz
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 toENABLE_IN_SUSPEND.
Suspend states are basically completely separate to runtime states (and we quite often have no software control over them) so it's not expected that always-on will have an effect on suspend mode; the documentation could use some cleanup here as it's mostly written from a runtime only perspective.
Mark Brown
maintainerQuoted 5 lines · Robert Karszniewicz
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.