diff mbox series

[3/5] dt-bindings: thermal: Add generic power domain warming device binding

Message ID 1568135676-9328-4-git-send-email-thara.gopinath@linaro.org (mailing list archive)
State New, archived
Delegated to: Eduardo Valentin
Headers show
Series Introduce Power domain based warming device driver | expand

Commit Message

Thara Gopinath Sept. 10, 2019, 5:14 p.m. UTC
Add binding to define power domains as thermal warming
devices.

Signed-off-by: Thara Gopinath <thara.gopinath@linaro.org>
---
 .../bindings/thermal/pwr-domain-warming.txt        | 32 ++++++++++++++++++++++
 1 file changed, 32 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/thermal/pwr-domain-warming.txt

Comments

Rob Herring (Arm) Sept. 30, 2019, 2:42 p.m. UTC | #1
On Tue, Sep 10, 2019 at 01:14:34PM -0400, Thara Gopinath wrote:
> Add binding to define power domains as thermal warming
> devices.
> 
> Signed-off-by: Thara Gopinath <thara.gopinath@linaro.org>
> ---
>  .../bindings/thermal/pwr-domain-warming.txt        | 32 ++++++++++++++++++++++
>  1 file changed, 32 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/thermal/pwr-domain-warming.txt
> 
> diff --git a/Documentation/devicetree/bindings/thermal/pwr-domain-warming.txt b/Documentation/devicetree/bindings/thermal/pwr-domain-warming.txt
> new file mode 100644
> index 0000000..25fc568
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/thermal/pwr-domain-warming.txt
> @@ -0,0 +1,32 @@
> +* Generic power domain based thermal warming device.
> +
> +This binding describes the power domains that can be used as a
> +thermal warming device.

This looks like just a gathering of properties and way to instantiate 
some driver.

I think this all belongs in the power domain provider. Make it a cooling 
device and you should know which domains are relevant based on the 
compatible (though perhaps we could consider a list in DT). If you want 
to instantiate a separate driver to handle this, then make the power 
domain driver do that.

Rob

> +
> +- compatible:
> +	Usage: required
> +	Value type: <string>
> +	Definition: must be "thermal-power-domain-wdev"
> +
> +- #temp-reg-cells:
> +	Usage: required
> +	Value type: <u32>
> +	Definition: Must be 2
> +
> +- power-domains:
> +	Usage: required
> +	Value type: <phandle>
> +	Definition: reference to power-domains that match power-domain-names
> +
> +- power-domain-names:
> +	Usage: required
> +	Value type: <stringlist>
> +	Definition: The power-domains that can behave as warming devices
> +
> +Example 1
> +thermal_wdev: rpmhpd_mx_wdev {
> +		compatible = "thermal-power-domain-wdev";
> +		#cooling-cells = <2>;
> +		power-domains =  <&rpmhpd SDM845_MX>;
> +		power-domain-names = "mx";
> +	};
> -- 
> 2.1.4
>
Thara Gopinath Oct. 9, 2019, 12:18 p.m. UTC | #2
Hi Rob,
Thanks for the review

On 09/30/2019 10:42 AM, Rob Herring wrote:
> On Tue, Sep 10, 2019 at 01:14:34PM -0400, Thara Gopinath wrote:
>> Add binding to define power domains as thermal warming
>> devices.
>>
>> Signed-off-by: Thara Gopinath <thara.gopinath@linaro.org>
>> ---
>>  .../bindings/thermal/pwr-domain-warming.txt        | 32 ++++++++++++++++++++++
>>  1 file changed, 32 insertions(+)
>>  create mode 100644 Documentation/devicetree/bindings/thermal/pwr-domain-warming.txt
>>
>> diff --git a/Documentation/devicetree/bindings/thermal/pwr-domain-warming.txt b/Documentation/devicetree/bindings/thermal/pwr-domain-warming.txt
>> new file mode 100644
>> index 0000000..25fc568
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/thermal/pwr-domain-warming.txt
>> @@ -0,0 +1,32 @@
>> +* Generic power domain based thermal warming device.
>> +
>> +This binding describes the power domains that can be used as a
>> +thermal warming device.
> 
> This looks like just a gathering of properties and way to instantiate 
> some driver.
> 
> I think this all belongs in the power domain provider. Make it a cooling 
> device and you should know which domains are relevant based on the 
> compatible (though perhaps we could consider a list in DT). If you want 
> to instantiate a separate driver to handle this, then make the power 
> domain driver do that.

This sounds fine. A list in DT might be needed though. I have a separate
driver. I should be able to get the genpd provider driver call
into it. I had asked this to Ulf and he seemed to be fine with it as well


> 
> Rob
> 
>
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/thermal/pwr-domain-warming.txt b/Documentation/devicetree/bindings/thermal/pwr-domain-warming.txt
new file mode 100644
index 0000000..25fc568
--- /dev/null
+++ b/Documentation/devicetree/bindings/thermal/pwr-domain-warming.txt
@@ -0,0 +1,32 @@ 
+* Generic power domain based thermal warming device.
+
+This binding describes the power domains that can be used as a
+thermal warming device.
+
+- compatible:
+	Usage: required
+	Value type: <string>
+	Definition: must be "thermal-power-domain-wdev"
+
+- #temp-reg-cells:
+	Usage: required
+	Value type: <u32>
+	Definition: Must be 2
+
+- power-domains:
+	Usage: required
+	Value type: <phandle>
+	Definition: reference to power-domains that match power-domain-names
+
+- power-domain-names:
+	Usage: required
+	Value type: <stringlist>
+	Definition: The power-domains that can behave as warming devices
+
+Example 1
+thermal_wdev: rpmhpd_mx_wdev {
+		compatible = "thermal-power-domain-wdev";
+		#cooling-cells = <2>;
+		power-domains =  <&rpmhpd SDM845_MX>;
+		power-domain-names = "mx";
+	};