PM / Domains: Fix for domain idle state
Subsystems (7)
PATCH 1/1 PM / Domains: Fix for domain idle state
Hi Rafael,
This follows the discussions we had at LPC. The decision to use a different compatible (different from that of the CPU's idle state) resulted in a new idle state node definition that is specific to PM domains. The patch describes this new binding.
You have already pulled in my earlier changes for domain idle states into your linux-next. This patch is intended to be applied on top of that and fixes the domain idle state and maps it to the new definition.
Thanks,
Lina
Lina Iyer (1):
PM / Domains: Fix compatible for domain idle state
.../bindings/power/domain-idle-state.txt | 33 ++++++++++++++++++++++ .../devicetree/bindings/power/power_domain.txt | 8 +++--- drivers/base/power/domain.c | 2 +- 3 files changed, 38 insertions(+), 5 deletions(-) create mode 100644 Documentation/devicetree/bindings/power/domain-idle-state.txt
Signature · 1 line
2.7.4
PATCH 1/1 PM / Domains: Fix compatible for domain idle state
Re-using idle state definition provided by arm,idle-state for domain idle states creates a lot of confusion and limits further evolution of the domain idle definition. To keep things clear and simple, define a idle states for domain using a new compatible "domain-idle-state".
Fix existing PM domains code to look for the newly defined compatible.
--- .../bindings/power/domain-idle-state.txt | 33 ++++++++++++++++++++++ .../devicetree/bindings/power/power_domain.txt | 8 +++--- drivers/base/power/domain.c | 2 +- 3 files changed, 38 insertions(+), 5 deletions(-) create mode 100644 Documentation/devicetree/bindings/power/domain-idle-state.txt
Documentation/devicetree/bindings/power/domain-idle-state.txt new file +33 -0
@@ -0,0 +1,33 @@ +PM Domain Idle State Node: + +A domain idle state node represents the state parameters that will be used to +select the state when there are no active components in the domain. + +The state node has the following parameters - + +- compatible: + Usage: Required + Value type: <string> + Definition: Must be "domain-idle-state". + +- entry-latency-us + Usage: Required + Value type: <prop-encoded-array> + Definition: u32 value representing worst case latency in + microseconds required to enter the idle state. + The exit-latency-us duration may be guaranteed + only after entry-latency-us has passed. + +- exit-latency-us + Usage: Required + Value type: <prop-encoded-array> + Definition: u32 value representing worst case latency + in microseconds required to exit the idle state. + +- min-residency-us + Usage: Required + Value type: <prop-encoded-array> + Definition: u32 value representing minimum residency duration + in microseconds after which the idle state will yield + power benefits after overcoming the overhead in entering +i the idle state.
Documentation/devicetree/bindings/power/power_domain.txt +4 -4
@@ -31,7 +31,7 @@ Optional properties: - domain-idle-states : A phandle of an idle-state that shall be soaked into a generic domain power state. The idle state definitions are - compatible with arm,idle-state specified in [1]. + compatible with domain-idle-state specified in [1]. The domain-idle-state property reflects the idle state of this PM domain and not the idle states of the devices or sub-domains in the PM domain. Devices and sub-domains have their own idle-states independent of the parent
@@ -85,7 +85,7 @@ Example 3: }; DOMAIN_RET: state at 0 { - compatible = "arm,idle-state"; + compatible = "domain-idle-state"; reg = <0x0>; entry-latency-us = <1000>; exit-latency-us = <2000>;
@@ -93,7 +93,7 @@ Example 3: }; DOMAIN_PWR_DN: state at 1 { - compatible = "arm,idle-state"; + compatible = "domain-idle-state"; reg = <0x1>; entry-latency-us = <5000>; exit-latency-us = <8000>;
@@ -118,4 +118,4 @@ The node above defines a typical PM domain consumer device, which is located inside a PM domain with index 0 of a power controller represented by a node with the label "power". -[1]. Documentation/devicetree/bindings/arm/idle-states.txt +[1]. Documentation/devicetree/bindings/power/domain-idle-state.txt
drivers/base/power/domain.c +1 -1
@@ -2048,7 +2048,7 @@ int genpd_dev_pm_attach(struct device *dev)EXPORT_SYMBOL_GPL (genpd_dev_pm_attach);static const struct of_device_id idle_state_match[] = { - { .compatible ="arm,idle-state" , }, + { .compatible ="domain-idle-state" , }, { } };
Signature · 1 line
2.7.4
PATCH 1/1 PM / Domains: Fix compatible for domain idle state
Quoted 32 lines · Lina Iyer
Re-using idle state definition provided by arm,idle-state for domain idle states creates a lot of confusion and limits further evolution of the domain idle definition. To keep things clear and simple, define a idle states for domain using a new compatible "domain-idle-state".
Fix existing PM domains code to look for the newly defined compatible.
--- .../bindings/power/domain-idle-state.txt | 33 ++++++++++++++++++++++ .../devicetree/bindings/power/power_domain.txt | 8 +++--- drivers/base/power/domain.c | 2 +- 3 files changed, 38 insertions(+), 5 deletions(-) create mode 100644 Documentation/devicetree/bindings/power/domain-idle-state.txtDocumentation/devicetree/bindings/power/domain-idle-state.txt new file +9
-0@@ -0,0 +1,33 @@ +PM Domain Idle State Node: + +A domain idle state node represents the state parameters that will be used to +select the state when there are no active components in the domain. + +The state node has the following parameters - + +- compatible: + Usage: Required
Documentation/devicetree/bindings/power/domain-idle-state.txt line 19
Quoted 10 lines
Documentation/devicetree/bindings/power/domain-idle-state.txt new file +10
-0+ Value type: <string> + Definition: Must be "domain-idle-state". + +- entry-latency-us + Usage: Required + Value type: <prop-encoded-array> + Definition: u32 value representing worst case latency in + microseconds required to enter the idle state. + The exit-latency-us duration may be guaranteed + only after entry-latency-us has passed.
As we anyway are going to change this, why not use an u64 and have the value in ns instead of us?
That should give us better flexibility and I think this would also be what Rob would recommend, if I remember earlier similar comments from him.
Documentation/devicetree/bindings/power/domain-idle-state.txt line 25
Quoted 6 lines
Documentation/devicetree/bindings/power/domain-idle-state.txt new file +6
-0+ +- exit-latency-us + Usage: Required + Value type: <prop-encoded-array> + Definition: u32 value representing worst case latency + in microseconds required to exit the idle state.
Ditto.
Documentation/devicetree/bindings/power/domain-idle-state.txt line 33
Quoted 8 lines
Documentation/devicetree/bindings/power/domain-idle-state.txt new file +8
-0+ +- min-residency-us + Usage: Required + Value type: <prop-encoded-array> + Definition: u32 value representing minimum residency duration + in microseconds after which the idle state will yield + power benefits after overcoming the overhead in entering +i the idle state.
Ditto.
Quoted 51 lines
Documentation/devicetree/bindings/power/power_domain.txt +4
-4@@ -31,7 +31,7 @@ Optional properties: - domain-idle-states : A phandle of an idle-state that shall be soaked into a generic domain power state. The idle state definitions are - compatible with arm,idle-state specified in [1]. + compatible with domain-idle-state specified in [1]. The domain-idle-state property reflects the idle state of this PM domain and not the idle states of the devices or sub-domains in the PM domain. Devices and sub-domains have their own idle-states independent of the parent@@ -85,7 +85,7 @@ Example 3: }; DOMAIN_RET: state at 0 { - compatible = "arm,idle-state"; + compatible = "domain-idle-state"; reg = <0x0>; entry-latency-us = <1000>; exit-latency-us = <2000>;@@ -93,7 +93,7 @@ Example 3: }; DOMAIN_PWR_DN: state at 1 { - compatible = "arm,idle-state"; + compatible = "domain-idle-state"; reg = <0x1>; entry-latency-us = <5000>; exit-latency-us = <8000>;@@ -118,4 +118,4 @@ The node above defines a typical PM domain consumer device, which is located inside a PM domain with index 0 of a power controller represented by a node with the label "power". -[1]. Documentation/devicetree/bindings/arm/idle-states.txt +[1]. Documentation/devicetree/bindings/power/domain-idle-state.txtdrivers/base/power/domain.c +1
-2@@ -2048,7 +2048,7 @@ int genpd_dev_pm_attach(struct device *dev)EXPORT_SYMBOL_GPL (genpd_dev_pm_attach);static const struct of_device_id idle_state_match[] = { - { .compatible ="arm,idle-state" , }, + { .compatible ="domain-idle-state" , }, { } }; --
Quoted 2 lines
2.7.4
Kind regards
Uffe
Rob Herring
maintainerPATCH 1/1 PM / Domains: Fix compatible for domain idle state
Quoted 38 lines · Ulf Hansson
Quoted 37 lines · Lina Iyer
Re-using idle state definition provided by arm,idle-state for domain idle states creates a lot of confusion and limits further evolution of the domain idle definition. To keep things clear and simple, define a idle states for domain using a new compatible "domain-idle-state".
Fix existing PM domains code to look for the newly defined compatible.
--- .../bindings/power/domain-idle-state.txt | 33 ++++++++++++++++++++++ .../devicetree/bindings/power/power_domain.txt | 8 +++--- drivers/base/power/domain.c | 2 +- 3 files changed, 38 insertions(+), 5 deletions(-) create mode 100644 Documentation/devicetree/bindings/power/domain-idle-state.txtDocumentation/devicetree/bindings/power/domain-idle-state.txt new file +14
-0@@ -0,0 +1,33 @@ +PM Domain Idle State Node: + +A domain idle state node represents the state parameters that will be used to +select the state when there are no active components in the domain. + +The state node has the following parameters - + +- compatible: + Usage: Required + Value type: <string> + Definition: Must be "domain-idle-state". + +- entry-latency-us + Usage: Required
Quoted 8 lines
Documentation/devicetree/bindings/power/domain-idle-state.txt line 19
Quoted 5 lines
Documentation/devicetree/bindings/power/domain-idle-state.txt new file +5
-0+ Value type: <prop-encoded-array> + Definition: u32 value representing worst case latency in + microseconds required to enter the idle state. + The exit-latency-us duration may be guaranteed + only after entry-latency-us has passed.As we anyway are going to change this, why not use an u64 and have the value in ns instead of us?
I can't imagine that you would need more resolution or range. For times less than 1us, s/w and register access times are going to dominate the time.
Unless there is a real need, I'd keep alignment with the existing binding.
Rob
PATCH 1/1 PM / Domains: Fix compatible for domain idle state
Quoted 49 lines · Rob Herring
Quoted 38 lines · Ulf Hansson
Quoted 37 lines · Lina Iyer
Re-using idle state definition provided by arm,idle-state for domain idle states creates a lot of confusion and limits further evolution of the domain idle definition. To keep things clear and simple, define a idle states for domain using a new compatible "domain-idle-state".
Fix existing PM domains code to look for the newly defined compatible.
--- .../bindings/power/domain-idle-state.txt | 33 ++++++++++++++++++++++ .../devicetree/bindings/power/power_domain.txt | 8 +++--- drivers/base/power/domain.c | 2 +- 3 files changed, 38 insertions(+), 5 deletions(-) create mode 100644 Documentation/devicetree/bindings/power/domain-idle-state.txtDocumentation/devicetree/bindings/power/domain-idle-state.txt new file +14
-0@@ -0,0 +1,33 @@ +PM Domain Idle State Node: + +A domain idle state node represents the state parameters that will be used to +select the state when there are no active components in the domain. + +The state node has the following parameters - + +- compatible: + Usage: Required + Value type: <string> + Definition: Must be "domain-idle-state". + +- entry-latency-us + Usage: RequiredQuoted 8 lines
Documentation/devicetree/bindings/power/domain-idle-state.txt line 19
Quoted 5 lines
Documentation/devicetree/bindings/power/domain-idle-state.txt new file +5
-0+ Value type: <prop-encoded-array> + Definition: u32 value representing worst case latency in + microseconds required to enter the idle state. + The exit-latency-us duration may be guaranteed + only after entry-latency-us has passed.As we anyway are going to change this, why not use an u64 and have the value in ns instead of us?
Quoted 3 lines
I can't imagine that you would need more resolution or range. For times less than 1us, s/w and register access times are going to dominate the time.
Yep.
Quoted 4 lines
Unless there is a real need, I'd keep alignment with the existing binding.
Agree!
Kind regards
Uffe
PATCH 1/1 PM / Domains: Fix compatible for domain idle state
In reply to Rob HerringQuoted 48 lines · Rob Herring
Quoted 38 lines · Ulf Hansson
Quoted 37 lines · Lina Iyer
Re-using idle state definition provided by arm,idle-state for domain idle states creates a lot of confusion and limits further evolution of the domain idle definition. To keep things clear and simple, define a idle states for domain using a new compatible "domain-idle-state".
Fix existing PM domains code to look for the newly defined compatible.
--- .../bindings/power/domain-idle-state.txt | 33 ++++++++++++++++++++++ .../devicetree/bindings/power/power_domain.txt | 8 +++--- drivers/base/power/domain.c | 2 +- 3 files changed, 38 insertions(+), 5 deletions(-) create mode 100644 Documentation/devicetree/bindings/power/domain-idle-state.txtDocumentation/devicetree/bindings/power/domain-idle-state.txt new file +14
-0@@ -0,0 +1,33 @@ +PM Domain Idle State Node: + +A domain idle state node represents the state parameters that will be used to +select the state when there are no active components in the domain. + +The state node has the following parameters - + +- compatible: + Usage: Required + Value type: <string> + Definition: Must be "domain-idle-state". + +- entry-latency-us + Usage: RequiredQuoted 8 lines
Documentation/devicetree/bindings/power/domain-idle-state.txt line 19
Quoted 5 lines
Documentation/devicetree/bindings/power/domain-idle-state.txt new file +5
-0+ Value type: <prop-encoded-array> + Definition: u32 value representing worst case latency in + microseconds required to enter the idle state. + The exit-latency-us duration may be guaranteed + only after entry-latency-us has passed.As we anyway are going to change this, why not use an u64 and have the value in ns instead of us?
Quoted 6 lines
I can't imagine that you would need more resolution or range. For times less than 1us, s/w and register access times are going to dominate the time.
Unless there is a real need, I'd keep alignment with the existing binding.
Rob, are you fine with this? I thought it would be great to get this in for 4.10 rc1.
Kind regards
Uffe
PATCH 1/1 PM / Domains: Fix compatible for domain idle state
Quoted 53 lines · Ulf Hansson
Quoted 52 lines · Rob Herring
Quoted 38 lines · Ulf Hansson
Quoted 37 lines · Lina Iyer
Re-using idle state definition provided by arm,idle-state for domain idle states creates a lot of confusion and limits further evolution of the domain idle definition. To keep things clear and simple, define a idle states for domain using a new compatible "domain-idle-state".
Fix existing PM domains code to look for the newly defined compatible.
--- .../bindings/power/domain-idle-state.txt | 33 ++++++++++++++++++++++ .../devicetree/bindings/power/power_domain.txt | 8 +++--- drivers/base/power/domain.c | 2 +- 3 files changed, 38 insertions(+), 5 deletions(-) create mode 100644 Documentation/devicetree/bindings/power/domain-idle-state.txtDocumentation/devicetree/bindings/power/domain-idle-state.txt new file +14
-0@@ -0,0 +1,33 @@ +PM Domain Idle State Node: + +A domain idle state node represents the state parameters that will be used to +select the state when there are no active components in the domain. + +The state node has the following parameters - + +- compatible: + Usage: Required + Value type: <string> + Definition: Must be "domain-idle-state". + +- entry-latency-us + Usage: RequiredQuoted 8 lines
Documentation/devicetree/bindings/power/domain-idle-state.txt line 19
Quoted 5 lines
Documentation/devicetree/bindings/power/domain-idle-state.txt new file +5
-0+ Value type: <prop-encoded-array> + Definition: u32 value representing worst case latency in + microseconds required to enter the idle state. + The exit-latency-us duration may be guaranteed + only after entry-latency-us has passed.As we anyway are going to change this, why not use an u64 and have the value in ns instead of us?
I can't imagine that you would need more resolution or range. For times less than 1us, s/w and register access times are going to dominate the time.
Quoted 5 lines
Quoted 2 lines
Unless there is a real need, I'd keep alignment with the existing binding.
Rob, are you fine with this? I thought it would be great to get this in for 4.10 rc1.
Rob, any objections here?
Thanks,
Rafael
PATCH 1/1 PM / Domains: Fix compatible for domain idle state
Quoted 54 lines · Rafael J. Wysocki
Quoted 53 lines · Ulf Hansson
Quoted 52 lines · Rob Herring
Quoted 38 lines · Ulf Hansson
Quoted 37 lines · Lina Iyer
Re-using idle state definition provided by arm,idle-state for domain idle states creates a lot of confusion and limits further evolution of the domain idle definition. To keep things clear and simple, define a idle states for domain using a new compatible "domain-idle-state".
Fix existing PM domains code to look for the newly defined compatible.
--- .../bindings/power/domain-idle-state.txt | 33 ++++++++++++++++++++++ .../devicetree/bindings/power/power_domain.txt | 8 +++--- drivers/base/power/domain.c | 2 +- 3 files changed, 38 insertions(+), 5 deletions(-) create mode 100644 Documentation/devicetree/bindings/power/domain-idle-state.txtDocumentation/devicetree/bindings/power/domain-idle-state.txt new file +14
-0@@ -0,0 +1,33 @@ +PM Domain Idle State Node: + +A domain idle state node represents the state parameters that will be used to +select the state when there are no active components in the domain. + +The state node has the following parameters - + +- compatible: + Usage: Required + Value type: <string> + Definition: Must be "domain-idle-state". + +- entry-latency-us + Usage: RequiredQuoted 8 lines
Documentation/devicetree/bindings/power/domain-idle-state.txt line 19
Quoted 5 lines
Documentation/devicetree/bindings/power/domain-idle-state.txt new file +5
-0+ Value type: <prop-encoded-array> + Definition: u32 value representing worst case latency in + microseconds required to enter the idle state. + The exit-latency-us duration may be guaranteed + only after entry-latency-us has passed.As we anyway are going to change this, why not use an u64 and have the value in ns instead of us?
I can't imagine that you would need more resolution or range. For times less than 1us, s/w and register access times are going to dominate the time.
Quoted 7 lines
Quoted 5 lines
Quoted 2 lines
Unless there is a real need, I'd keep alignment with the existing binding.
Rob, are you fine with this? I thought it would be great to get this in for 4.10 rc1.
Rob, any objections here?
Well, no objections, so applied.
Thanks,
Rafael
Rob Herring
maintainerPATCH 1/1 PM / Domains: Fix compatible for domain idle state
Quoted 58 lines · Rafael J. Wysocki
Quoted 57 lines · Rafael J. Wysocki
Quoted 56 lines · Ulf Hansson
Quoted 54 lines · Rob Herring
Quoted 38 lines · Ulf Hansson
Quoted 37 lines · Lina Iyer
Re-using idle state definition provided by arm,idle-state for domain idle states creates a lot of confusion and limits further evolution of the domain idle definition. To keep things clear and simple, define a idle states for domain using a new compatible "domain-idle-state".
Fix existing PM domains code to look for the newly defined compatible.
--- .../bindings/power/domain-idle-state.txt | 33 ++++++++++++++++++++++ .../devicetree/bindings/power/power_domain.txt | 8 +++--- drivers/base/power/domain.c | 2 +- 3 files changed, 38 insertions(+), 5 deletions(-) create mode 100644 Documentation/devicetree/bindings/power/domain-idle-state.txtDocumentation/devicetree/bindings/power/domain-idle-state.txt new file +14
-0@@ -0,0 +1,33 @@ +PM Domain Idle State Node: + +A domain idle state node represents the state parameters that will be used to +select the state when there are no active components in the domain. + +The state node has the following parameters - + +- compatible: + Usage: Required + Value type: <string> + Definition: Must be "domain-idle-state". + +- entry-latency-us + Usage: RequiredQuoted 8 lines
Documentation/devicetree/bindings/power/domain-idle-state.txt line 19
Quoted 5 lines
Documentation/devicetree/bindings/power/domain-idle-state.txt new file +5
-0+ Value type: <prop-encoded-array> + Definition: u32 value representing worst case latency in + microseconds required to enter the idle state. + The exit-latency-us duration may be guaranteed + only after entry-latency-us has passed.As we anyway are going to change this, why not use an u64 and have the value in ns instead of us?
I can't imagine that you would need more resolution or range. For times less than 1us, s/w and register access times are going to dominate the time.
Unless there is a real need, I'd keep alignment with the existing binding.
Quoted 6 lines
Quoted 4 lines
Quoted 2 lines
Rob, are you fine with this? I thought it would be great to get this in for 4.10 rc1.
Rob, any objections here?
Well, no objections, so applied.
Sorry, just found my ack sitting in my drafts. Thought I had sent it.
Rob
PATCH 1/1 PM / Domains: Fix compatible for domain idle state
In reply to Lina IyerHi,
Quoted 6 lines · Lina Iyer
Re-using idle state definition provided by arm,idle-state for domain idle states creates a lot of confusion and limits further evolution of the domain idle definition. To keep things clear and simple, define a idle states for domain using a new compatible "domain-idle-state".
Fix existing PM domains code to look for the newly defined compatible.
This looks good to me, pinging for review from others/queue for merge.
Best,
Brendan
Quoted 99 lines
--- .../bindings/power/domain-idle-state.txt | 33 ++++++++++++++++++++++ .../devicetree/bindings/power/power_domain.txt | 8 +++--- drivers/base/power/domain.c | 2 +- 3 files changed, 38 insertions(+), 5 deletions(-) create mode 100644 Documentation/devicetree/bindings/power/domain-idle-state.txtDocumentation/devicetree/bindings/power/domain-idle-state.txt new file +33
-0@@ -0,0 +1,33 @@ +PM Domain Idle State Node: + +A domain idle state node represents the state parameters that will be used to +select the state when there are no active components in the domain. + +The state node has the following parameters - + +- compatible: + Usage: Required + Value type: <string> + Definition: Must be "domain-idle-state". + +- entry-latency-us + Usage: Required + Value type: <prop-encoded-array> + Definition: u32 value representing worst case latency in + microseconds required to enter the idle state. + The exit-latency-us duration may be guaranteed + only after entry-latency-us has passed. + +- exit-latency-us + Usage: Required + Value type: <prop-encoded-array> + Definition: u32 value representing worst case latency + in microseconds required to exit the idle state. + +- min-residency-us + Usage: Required + Value type: <prop-encoded-array> + Definition: u32 value representing minimum residency duration + in microseconds after which the idle state will yield + power benefits after overcoming the overhead in entering +i the idle state.Documentation/devicetree/bindings/power/power_domain.txt +4
-4@@ -31,7 +31,7 @@ Optional properties: - domain-idle-states : A phandle of an idle-state that shall be soaked into a generic domain power state. The idle state definitions are - compatible with arm,idle-state specified in [1]. + compatible with domain-idle-state specified in [1]. The domain-idle-state property reflects the idle state of this PM domain and not the idle states of the devices or sub-domains in the PM domain. Devices and sub-domains have their own idle-states independent of the parent@@ -85,7 +85,7 @@ Example 3: }; DOMAIN_RET: state at 0 { - compatible = "arm,idle-state"; + compatible = "domain-idle-state"; reg = <0x0>; entry-latency-us = <1000>; exit-latency-us = <2000>;@@ -93,7 +93,7 @@ Example 3: }; DOMAIN_PWR_DN: state at 1 { - compatible = "arm,idle-state"; + compatible = "domain-idle-state"; reg = <0x1>; entry-latency-us = <5000>; exit-latency-us = <8000>;@@ -118,4 +118,4 @@ The node above defines a typical PM domain consumer device, which is located inside a PM domain with index 0 of a power controller represented by a node with the label "power". -[1]. Documentation/devicetree/bindings/arm/idle-states.txt +[1]. Documentation/devicetree/bindings/power/domain-idle-state.txtdrivers/base/power/domain.c +1
-1@@ -2048,7 +2048,7 @@ int genpd_dev_pm_attach(struct device *dev)EXPORT_SYMBOL_GPL (genpd_dev_pm_attach);static const struct of_device_id idle_state_match[] = { - { .compatible ="arm,idle-state" , }, + { .compatible ="domain-idle-state" , }, { } };
Rafael J. Wysocki
maintainerPATCH 1/1 PM / Domains: Fix compatible for domain idle state
Quoted 11 lines · Brendan Jackman
Hi,
Quoted 6 lines · Lina Iyer
Re-using idle state definition provided by arm,idle-state for domain idle states creates a lot of confusion and limits further evolution of the domain idle definition. To keep things clear and simple, define a idle states for domain using a new compatible "domain-idle-state".
Fix existing PM domains code to look for the newly defined compatible.
This looks good to me, pinging for review from others/queue for merge.
Well, I need an ACK from at least one DT bindings maintainer so that I can queue it up.
Quoted 93 lines
Quoted 93 lines
--- .../bindings/power/domain-idle-state.txt | 33 ++++++++++++++++++++++ .../devicetree/bindings/power/power_domain.txt | 8 +++--- drivers/base/power/domain.c | 2 +- 3 files changed, 38 insertions(+), 5 deletions(-) create mode 100644 Documentation/devicetree/bindings/power/domain-idle-state.txtDocumentation/devicetree/bindings/power/domain-idle-state.txt new file +33
-0@@ -0,0 +1,33 @@ +PM Domain Idle State Node: + +A domain idle state node represents the state parameters that will be used to +select the state when there are no active components in the domain. + +The state node has the following parameters - + +- compatible: + Usage: Required + Value type: <string> + Definition: Must be "domain-idle-state". + +- entry-latency-us + Usage: Required + Value type: <prop-encoded-array> + Definition: u32 value representing worst case latency in + microseconds required to enter the idle state. + The exit-latency-us duration may be guaranteed + only after entry-latency-us has passed. + +- exit-latency-us + Usage: Required + Value type: <prop-encoded-array> + Definition: u32 value representing worst case latency + in microseconds required to exit the idle state. + +- min-residency-us + Usage: Required + Value type: <prop-encoded-array> + Definition: u32 value representing minimum residency duration + in microseconds after which the idle state will yield + power benefits after overcoming the overhead in entering +i the idle state.Documentation/devicetree/bindings/power/power_domain.txt +4
-4@@ -31,7 +31,7 @@ Optional properties: - domain-idle-states : A phandle of an idle-state that shall be soaked into a generic domain power state. The idle state definitions are - compatible with arm,idle-state specified in [1]. + compatible with domain-idle-state specified in [1]. The domain-idle-state property reflects the idle state of this PM domain and not the idle states of the devices or sub-domains in the PM domain. Devices and sub-domains have their own idle-states independent of the parent@@ -85,7 +85,7 @@ Example 3: }; DOMAIN_RET: state at 0 { - compatible = "arm,idle-state"; + compatible = "domain-idle-state"; reg = <0x0>; entry-latency-us = <1000>; exit-latency-us = <2000>;@@ -93,7 +93,7 @@ Example 3: }; DOMAIN_PWR_DN: state at 1 { - compatible = "arm,idle-state"; + compatible = "domain-idle-state"; reg = <0x1>; entry-latency-us = <5000>; exit-latency-us = <8000>;@@ -118,4 +118,4 @@ The node above defines a typical PM domain consumer device, which is located inside a PM domain with index 0 of a power controller represented by a node with the label "power". -[1]. Documentation/devicetree/bindings/arm/idle-states.txt +[1]. Documentation/devicetree/bindings/power/domain-idle-state.txtdrivers/base/power/domain.c +0
-0@@ -2048,7 +2048,7 @@ int genpd_dev_pm_attach(struct device *dev)EXPORT_SYMBOL_GPL (genpd_dev_pm_attach);
Quoted 6 lines
drivers/base/power/domain.c int genpd_dev_pm_attach(struct device *dev) · line 2053
Quoted 5 lines
drivers/base/power/domain.c +1
-1static const struct of_device_id idle_state_match[] = { - { .compatible ="arm,idle-state" , }, + { .compatible ="domain-idle-state" , }, { } };--
Thanks,
Rafael
PATCH 1/1 PM / Domains: Fix compatible for domain idle state
In reply to Lina IyerQuoted 10 lines · Lina Iyer
Re-using idle state definition provided by arm,idle-state for domain idle states creates a lot of confusion and limits further evolution of the domain idle definition. To keep things clear and simple, define a idle states for domain using a new compatible "domain-idle-state".
Fix existing PM domains code to look for the newly defined compatible.
Kind regards
Uffe
Quoted 99 lines
--- .../bindings/power/domain-idle-state.txt | 33 ++++++++++++++++++++++ .../devicetree/bindings/power/power_domain.txt | 8 +++--- drivers/base/power/domain.c | 2 +- 3 files changed, 38 insertions(+), 5 deletions(-) create mode 100644 Documentation/devicetree/bindings/power/domain-idle-state.txtDocumentation/devicetree/bindings/power/domain-idle-state.txt new file +33
-0@@ -0,0 +1,33 @@ +PM Domain Idle State Node: + +A domain idle state node represents the state parameters that will be used to +select the state when there are no active components in the domain. + +The state node has the following parameters - + +- compatible: + Usage: Required + Value type: <string> + Definition: Must be "domain-idle-state". + +- entry-latency-us + Usage: Required + Value type: <prop-encoded-array> + Definition: u32 value representing worst case latency in + microseconds required to enter the idle state. + The exit-latency-us duration may be guaranteed + only after entry-latency-us has passed. + +- exit-latency-us + Usage: Required + Value type: <prop-encoded-array> + Definition: u32 value representing worst case latency + in microseconds required to exit the idle state. + +- min-residency-us + Usage: Required + Value type: <prop-encoded-array> + Definition: u32 value representing minimum residency duration + in microseconds after which the idle state will yield + power benefits after overcoming the overhead in entering +i the idle state.Documentation/devicetree/bindings/power/power_domain.txt +4
-4@@ -31,7 +31,7 @@ Optional properties: - domain-idle-states : A phandle of an idle-state that shall be soaked into a generic domain power state. The idle state definitions are - compatible with arm,idle-state specified in [1]. + compatible with domain-idle-state specified in [1]. The domain-idle-state property reflects the idle state of this PM domain and not the idle states of the devices or sub-domains in the PM domain. Devices and sub-domains have their own idle-states independent of the parent@@ -85,7 +85,7 @@ Example 3: }; DOMAIN_RET: state at 0 { - compatible = "arm,idle-state"; + compatible = "domain-idle-state"; reg = <0x0>; entry-latency-us = <1000>; exit-latency-us = <2000>;@@ -93,7 +93,7 @@ Example 3: }; DOMAIN_PWR_DN: state at 1 { - compatible = "arm,idle-state"; + compatible = "domain-idle-state"; reg = <0x1>; entry-latency-us = <5000>; exit-latency-us = <8000>;@@ -118,4 +118,4 @@ The node above defines a typical PM domain consumer device, which is located inside a PM domain with index 0 of a power controller represented by a node with the label "power". -[1]. Documentation/devicetree/bindings/arm/idle-states.txt +[1]. Documentation/devicetree/bindings/power/domain-idle-state.txtdrivers/base/power/domain.c +1
-2@@ -2048,7 +2048,7 @@ int genpd_dev_pm_attach(struct device *dev)EXPORT_SYMBOL_GPL (genpd_dev_pm_attach);static const struct of_device_id idle_state_match[] = { - { .compatible ="arm,idle-state" , }, + { .compatible ="domain-idle-state" , }, { } }; --2.7.4
PATCH 1/1 PM / Domains: Fix compatible for domain idle state
In reply to Lina IyerHi Lina,
Quoted 7 lines · Lina Iyer
Re-using idle state definition provided by arm,idle-state for domain idle states creates a lot of confusion and limits further evolution of the domain idle definition. To keep things clear and simple, define a idle states for domain using a new compatible "domain-idle-state".
Fix existing PM domains code to look for the newly defined compatible.
Thanks for doing this(reluctantly? :-)). Looks good to me.
Signature · 2 lines
Regards, Sudeep