Skip to contentSkip to conversation

regulator: Document binding for regulator suspend voltage

PATCH In review Doug Anderson 4 participants 10 messages Nov 1, 2014 – Nov 3, 2014

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/2 regulator: Document binding for regulator suspend voltage

This patch builds upon (291d761 regulator: Document binding for regulator suspend state for PM state) to allow setting the uV in addition to the state at suspend time.

---
 Documentation/devicetree/bindings/regulator/regulator.txt | 2 ++
 1 file changed, 2 insertions(+)
Documentation/devicetree/bindings/regulator/regulator.txt +2 -0
index aaad615..4e7ed76 100644
@@ -28,6 +28,8 @@ Optional properties:
 - regulator-state-[mem/disk] node has following common properties:
 	- regulator-on-in-suspend: regulator should be on in suspend state.
 	- regulator-off-in-suspend: regulator should be off in suspend state.
+	- regulator-suspend-microvolt: regulator should be set to this voltage
+	  in suspend.
 
 Deprecated properties:
 - regulator-compatible: If a regulator chip contains multiple
Signature · 1 line
2.1.0.rc2.206.gedb03e5
#1 lore raw

PATCH 2/2 regulator: of: Add support for parsing microvolts for suspend state

Leverage all the work that was done in (40e20d6 regulator: of: Add support for parsing regulator_state for suspend state) and throw in the ability to set suspend microvolts from the device tree.

---
 drivers/regulator/of_regulator.c | 4 ++++
 1 file changed, 4 insertions(+)
drivers/regulator/of_regulator.c +4 -0
index f0d19fc..7fe93c5 100644
@@ -107,6 +107,10 @@ static void of_get_regulation_constraints(struct device_node *np,
 					"regulator-off-in-suspend"))
 			suspend_state->disabled = true;
 
+		if (!of_property_read_u32(suspend_np,
+					"regulator-suspend-microvolt", &pval))
+			suspend_state->uV = pval;
+
 		of_node_put(suspend_np);
 		suspend_state = NULL;
 		suspend_np = NULL;
Signature · 1 line
2.1.0.rc2.206.gedb03e5
Reviewed-by on v1 2/2
#2 lore raw

Re: [PATCH 2/2] regulator: of: Add support for parsing microvolts for suspend state

Hello Doug,

Quoted 15 lines · Doug Anderson

Leverage all the work that was done in (40e20d6 regulator: of: Add support for parsing regulator_state for suspend state) and throw in the ability to set suspend microvolts from the device tree.

---
 drivers/regulator/of_regulator.c | 4 ++++
 1 file changed, 4 insertions(+)
drivers/regulator/of_regulator.c +0 -0
index f0d19fc..7fe93c5 100644

drivers/regulator/of_regulator.c static void of_get_regulation_constraints(struct device_node *np, · line 116

Quoted 10 lines
drivers/regulator/of_regulator.c +4 -0
@@ -107,6 +107,10 @@ static void of_get_regulation_constraints(struct device_node *np,
 					"regulator-off-in-suspend"))
 			suspend_state->disabled = true;
 
+		if (!of_property_read_u32(suspend_np,
+					"regulator-suspend-microvolt", &pval))
+			suspend_state->uV = pval;
+
 		of_node_put(suspend_np);
 		suspend_state = NULL;
 		suspend_np = NULL;

Looks good to me.

Best regards,
Javier

Reviewed-by
#3 lore raw

Re: [PATCH 2/2] regulator: of: Add support for parsing microvolts for suspend state

Quoted 30 lines · Javier Martinez Canillas

Hello Doug,

Quoted 15 lines · Doug Anderson

Leverage all the work that was done in (40e20d6 regulator: of: Add support for parsing regulator_state for suspend state) and throw in the ability to set suspend microvolts from the device tree.

---
  drivers/regulator/of_regulator.c | 4 ++++
  1 file changed, 4 insertions(+)
drivers/regulator/of_regulator.c +0 -0
index f0d19fc..7fe93c5 100644

drivers/regulator/of_regulator.c static void of_get_regulation_constraints(struct device_node *np, · line 116

Quoted 10 lines
drivers/regulator/of_regulator.c +4 -0
@@ -107,6 +107,10 @@ static void of_get_regulation_constraints(struct device_node *np,
  					"regulator-off-in-suspend"))
  			suspend_state->disabled = true;
 
+		if (!of_property_read_u32(suspend_np,
+					"regulator-suspend-microvolt", &pval))
+			suspend_state->uV = pval;
+
  		of_node_put(suspend_np);
  		suspend_state = NULL;
  		suspend_np = NULL;

Looks good to me.

Quoted 7 lines

Best regards,
Javier

maintainer
#4 lore raw

Re: [PATCH 2/2] regulator: of: Add support for parsing microvolts for suspend state

In reply to Javier Martinez Canillas
Quoted 10 lines · Javier Martinez Canillas

drivers/regulator/of_regulator.c static void of_get_regulation_constraints(struct device_node *np, · line 116

Quoted 4 lines · Doug Anderson
drivers/regulator/of_regulator.c +1 -0
+
 		of_node_put(suspend_np);
 		suspend_state = NULL;
 		suspend_np = NULL;

Looks good to me.

If you're reviewing something please don't quote the entire patch, the
same rule applies as always - just include relevant context - and
especially don't include your one line of content at the very end of the
patch. Otherwise people have to page through the entire thing to find
what you've said (if they don't get fed up first).
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20141103/a691f5e7/attachment.sig>

#5 lore raw

Re: [PATCH 2/2] regulator: of: Add support for parsing microvolts for suspend state

Quoted 7 lines · Mark Brown

If you're reviewing something please don't quote the entire patch, the same rule applies as always - just include relevant context - and especially don't include your one line of content at the very end of the patch. Otherwise people have to page through the entire thing to find what you've said (if they don't get fed up first).

Yes, I usually add my {Review,Acked,Tested}-by tags at the end of the commit message and remove the complete patch but since it was a 4-lines patch I didn't think it was that bad.

Sorry about that, I will do it next time no matter the patch size.

Best regards,
Javier

maintainer
#6 lore raw

Re: [PATCH 2/2] regulator: of: Add support for parsing microvolts for suspend state

Quoted 3 lines · Javier Martinez Canillas

Yes, I usually add my {Review,Acked,Tested}-by tags at the end of the commit message and remove the complete patch but since it was a 4-lines patch I didn't think it was that bad.

It's the patch, the diffstat, the signoff, the commit message...
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20141103/1b2b9ca6/attachment.sig>

Reviewed-by on v1 1/2
#7 lore raw
In reply to Doug Anderson

Hello Doug,

Quoted 14 lines · Doug Anderson

This patch builds upon (291d761 regulator: Document binding for regulator suspend state for PM state) to allow setting the uV in addition to the state at suspend time.

---
 Documentation/devicetree/bindings/regulator/regulator.txt | 2 ++
 1 file changed, 2 insertions(+)
Documentation/devicetree/bindings/regulator/regulator.txt +0 -0
index aaad615..4e7ed76 100644

Documentation/devicetree/bindings/regulator/regulator.txt Optional properties: · line 32

Quoted 5 lines
Documentation/devicetree/bindings/regulator/regulator.txt +2 -0
@@ -28,6 +28,8 @@ Optional properties:
 - regulator-state-[mem/disk] node has following common properties:
 	- regulator-on-in-suspend: regulator should be on in suspend state.
 	- regulator-off-in-suspend: regulator should be off in suspend state.
+	- regulator-suspend-microvolt: regulator should be set to this voltage
+	  in suspend.

The patch looks good to me:

On thing I wonder is if the binding should say that the suspend voltage is independent of the runtime one and it may be outside of the runtime range?

Best regards,
Javier

Reviewed-by
#8 lore raw
Quoted 24 lines · Javier Martinez Canillas

Hello Doug,

Quoted 14 lines · Doug Anderson

This patch builds upon (291d761 regulator: Document binding for regulator suspend state for PM state) to allow setting the uV in addition to the state at suspend time.

---
  Documentation/devicetree/bindings/regulator/regulator.txt | 2 ++
  1 file changed, 2 insertions(+)
Documentation/devicetree/bindings/regulator/regulator.txt +0 -0
index aaad615..4e7ed76 100644

Documentation/devicetree/bindings/regulator/regulator.txt Optional properties: · line 32

Quoted 5 lines
Documentation/devicetree/bindings/regulator/regulator.txt +2 -0
@@ -28,6 +28,8 @@ Optional properties:
  - regulator-state-[mem/disk] node has following common properties:
  	- regulator-on-in-suspend: regulator should be on in suspend state.
  	- regulator-off-in-suspend: regulator should be off in suspend state.
+	- regulator-suspend-microvolt: regulator should be set to this voltage
+	  in suspend.

The patch looks good to me:

Quoted 10 lines

On thing I wonder is if the binding should say that the suspend voltage is independent of the runtime one and it may be outside of the runtime range?

Best regards,
Javier

maintainer
#9 lore raw
In reply to Doug Anderson
Quoted 3 lines · Doug Anderson

This patch builds upon (291d761 regulator: Document binding for regulator suspend state for PM state) to allow setting the uV in addition to the state at suspend time.

Applied both, thanks.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20141103/73e99b4b/attachment.sig>