Skip to contentSkip to conversation

dt-bindings: power: Introduce suspend states supported properties

PATCH In review Keerthy 3 participants 7 messages Sep 12, 2018 Device tree bindings

lore
Share & tools
lore

Keerthy

author
#0 lore raw

PATCH 1/1 dt-bindings: power: Introduce suspend states supported properties

Introuduce linux generic suspend states supported properties. It is convenient for the generic suspend path to have the knowledge of the suspend states supported based on the device tree properties based on which it can either be suspended or safely bailed out of suspend if none of the suspend states are supported.

---
 .../devicetree/bindings/power/power-states.txt     | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/power/power-states.txt
Documentation/devicetree/bindings/power/power-states.txt new file +22 -0
new file mode 100644
index 0000000..bb80b36
@@ -0,0 +1,22 @@
+* Generic system suspend states support
+
+Most platforms support multiple suspend states. Define system
+suspend states so that one can target appropriate low power
+states based on the SoC capabilities.
+
+linux,suspend-to-memory-supported
+
+Upon suspend to memory the system context is saved to primary memory.
+All the clocks for all the peripherals including CPU are gated.
+
+linux,suspend-power-off-supported
+
+In this case in additon to the clocks all the voltage resources are
+turned off except the ones needed to keep the primary memory
+and a wake up source that can trigger a wakeup event.
+
+linux,suspend-to-disk-supported
+
+Upon suspend to disk that system context is saved to secondary memory.
+All the clocks for all the peripherals including CPU are gated. Even
+the primary memory is turned off.
Signature · 1 line
1.9.1
#1 lore raw
Quoted 7 lines · Keerthy

Introuduce linux generic suspend states supported properties. It is convenient for the generic suspend path to have the knowledge of the suspend states supported based on the device tree properties based on which it can either be suspended or safely bailed out of suspend if none of the suspend states are supported.

NACK for any bindings that are linux specific. The suspend feature is so platform dependent that I see no need for generic Linux bindings for the same.

We have power domains and idle states. If you have platforms that doesn't support some of the states, just disable them in the DT.

Quoted 25 lines
---
 .../devicetree/bindings/power/power-states.txt     | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/power/power-states.txt
Documentation/devicetree/bindings/power/power-states.txt new file +12 -0
new file mode 100644
index 0000000..bb80b36
@@ -0,0 +1,22 @@
+* Generic system suspend states support
+
+Most platforms support multiple suspend states. Define system
+suspend states so that one can target appropriate low power
+states based on the SoC capabilities.
+
+linux,suspend-to-memory-supported
+
+Upon suspend to memory the system context is saved to primary memory.
+All the clocks for all the peripherals including CPU are gated.
+
+linux,suspend-power-off-supported

Documentation/devicetree/bindings/power/power-states.txt line 22

Quoted 10 lines
Documentation/devicetree/bindings/power/power-states.txt new file +10 -0
+
+In this case in additon to the clocks all the voltage resources are
+turned off except the ones needed to keep the primary memory
+and a wake up source that can trigger a wakeup event.
+
+linux,suspend-to-disk-supported
+
+Upon suspend to disk that system context is saved to secondary memory.
+All the clocks for all the peripherals including CPU are gated. Even
+the primary memory is turned off.

What makes any of the above linux specific. So once again NACK.

Signature · 2 lines
Regards,
Sudeep
author
#2 lore raw
Quoted 11 lines · Sudeep Holla
Quoted 7 lines · Keerthy

Introuduce linux generic suspend states supported properties. It is convenient for the generic suspend path to have the knowledge of the suspend states supported based on the device tree properties based on which it can either be suspended or safely bailed out of suspend if none of the suspend states are supported.

Quoted 3 lines

NACK for any bindings that are linux specific. The suspend feature is so platform dependent that I see no need for generic Linux bindings for the same.

suspend to mem and suspend to disk are pretty generic states and i agree implementation is platform dependent so why not have properties that convey if they are supported?

Is the disagreement over making the properties being linux specific?

Quoted 43 lines

We have power domains and idle states. If you have platforms that doesn't support some of the states, just disable them in the DT.

Quoted 25 lines
---
 .../devicetree/bindings/power/power-states.txt     | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/power/power-states.txt
Documentation/devicetree/bindings/power/power-states.txt new file +12 -0
new file mode 100644
index 0000000..bb80b36
@@ -0,0 +1,22 @@
+* Generic system suspend states support
+
+Most platforms support multiple suspend states. Define system
+suspend states so that one can target appropriate low power
+states based on the SoC capabilities.
+
+linux,suspend-to-memory-supported
+
+Upon suspend to memory the system context is saved to primary memory.
+All the clocks for all the peripherals including CPU are gated.
+
+linux,suspend-power-off-supported

Documentation/devicetree/bindings/power/power-states.txt line 22

Quoted 10 lines
Documentation/devicetree/bindings/power/power-states.txt new file +10 -0
+
+In this case in additon to the clocks all the voltage resources are
+turned off except the ones needed to keep the primary memory
+and a wake up source that can trigger a wakeup event.
+
+linux,suspend-to-disk-supported
+
+Upon suspend to disk that system context is saved to secondary memory.
+All the clocks for all the peripherals including CPU are gated. Even
+the primary memory is turned off.

What makes any of the above linux specific. So once again NACK.

#3 lore raw
Quoted 14 lines · Keerthy
Quoted 11 lines · Sudeep Holla
Quoted 7 lines · Keerthy

Introuduce linux generic suspend states supported properties. It is convenient for the generic suspend path to have the knowledge of the suspend states supported based on the device tree properties based on which it can either be suspended or safely bailed out of suspend if none of the suspend states are supported.

Quoted 8 lines
Quoted 3 lines

NACK for any bindings that are linux specific. The suspend feature is so platform dependent that I see no need for generic Linux bindings for the same.

suspend to mem and suspend to disk are pretty generic states and i agree implementation is platform dependent so why not have properties that convey if they are supported?

We already have power domains and idle states for that. If you need to restrict few states on some platform for whatever reasons, just disable those states. I don't see the need to add any more bindings for the same.

Quoted 2 lines

Is the disagreement over making the properties being linux specific?

Yes.

Signature · 2 lines
Regards,
Sudeep
#4 lore raw
Quoted 9 lines · Sudeep Holla
Quoted 4 lines · Keerthy

suspend to mem and suspend to disk are pretty generic states and i agree implementation is platform dependent so why not have properties that convey if they are supported?

We already have power domains and idle states for that. If you need to restrict few states on some platform for whatever reasons, just disable those states. I don't see the need to add any more bindings for the same.

Oh do you mean the "domain-idle-states" property as mentioned in the Documentation/devicetree/bindings/power/power_domain.txt?

Yeah that should do and the DOMAIN_PWR_DN and DOMAIN_RET can be SoC specific and then the board can select which ones to use depending on how things are wired for GPIOs, memory, PMIC and so on.

Hmm I don't see any users for this binding though?

Regards,

Tony

#5 lore raw
Quoted 7 lines · Tony Lindgren
Quoted 6 lines · Sudeep Holla
Quoted 4 lines · Keerthy

suspend to mem and suspend to disk are pretty generic states and i agree implementation is platform dependent so why not have properties that convey if they are supported?

Quoted 7 lines
Quoted 3 lines

We already have power domains and idle states for that. If you need to restrict few states on some platform for whatever reasons, just disable those states. I don't see the need to add any more bindings for the same.

Oh do you mean the "domain-idle-states" property as mentioned in the Documentation/devicetree/bindings/power/power_domain.txt?

Yes, exactly that.

Quoted 4 lines

Yeah that should do and the DOMAIN_PWR_DN and DOMAIN_RET can be SoC specific and then the board can select which ones to use depending on how things are wired for GPIOs, memory, PMIC and so on.

All the idle-states are platform specific. DOMAIN_RET and DOMAIN_PWR_DN are just examples used in the bindings.

Quoted 2 lines

Hmm I don't see any users for this binding though?

It was added specifically to deal with such SoC idles states or hierarchical CPU power domains states, no users in upstream yet. But IMO it fits what $subject is trying to address.

Signature · 2 lines
Regards,
Sudeep
#6 lore raw
Quoted 14 lines · Sudeep Holla
Quoted 11 lines · Tony Lindgren
Quoted 9 lines · Sudeep Holla
Quoted 4 lines · Keerthy

suspend to mem and suspend to disk are pretty generic states and i agree implementation is platform dependent so why not have properties that convey if they are supported?

We already have power domains and idle states for that. If you need to restrict few states on some platform for whatever reasons, just disable those states. I don't see the need to add any more bindings for the same.

Quoted 5 lines
Quoted 3 lines

Oh do you mean the "domain-idle-states" property as mentioned in the Documentation/devicetree/bindings/power/power_domain.txt?

Yes, exactly that.

OK

Quoted 8 lines
Quoted 4 lines

Yeah that should do and the DOMAIN_PWR_DN and DOMAIN_RET can be SoC specific and then the board can select which ones to use depending on how things are wired for GPIOs, memory, PMIC and so on.

All the idle-states are platform specific. DOMAIN_RET and DOMAIN_PWR_DN are just examples used in the bindings.

Quoted 6 lines
Quoted 2 lines

Hmm I don't see any users for this binding though?

It was added specifically to deal with such SoC idles states or hierarchical CPU power domains states, no users in upstream yet. But IMO it fits what $subject is trying to address.

OK great thanks for confirming that.

Regards,

Tony