* [PATCH] arm64: dts: juno: align thermal zone names with bindings
@ 2023-12-09 17:16 ` Krzysztof Kozlowski
0 siblings, 0 replies; 12+ messages in thread
From: Krzysztof Kozlowski @ 2023-12-09 17:16 UTC (permalink / raw)
To: Liviu Dudau, Sudeep Holla, Lorenzo Pieralisi, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, linux-arm-kernel, devicetree,
linux-kernel
Cc: Krzysztof Kozlowski
Thermal bindings require thermal zone node names to match
certain patterns:
juno.dtb: thermal-zones: 'big-cluster', 'gpu0', 'gpu1', 'little-cluster', 'pmic', 'soc'
do not match any of the regexes: '^[a-zA-Z][a-zA-Z0-9\\-]{1,12}-thermal$', 'pinctrl-[0-9]+'
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
arch/arm64/boot/dts/arm/juno-base.dtsi | 12 ++++++------
arch/arm64/boot/dts/arm/juno-scmi.dtsi | 12 ++++++------
2 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/arch/arm64/boot/dts/arm/juno-base.dtsi b/arch/arm64/boot/dts/arm/juno-base.dtsi
index 8b4d280b1e7e..b897f5542c0a 100644
--- a/arch/arm64/boot/dts/arm/juno-base.dtsi
+++ b/arch/arm64/boot/dts/arm/juno-base.dtsi
@@ -747,7 +747,7 @@ scpi_sensors0: sensors {
};
thermal-zones {
- pmic {
+ pmic-thermal {
polling-delay = <1000>;
polling-delay-passive = <100>;
thermal-sensors = <&scpi_sensors0 0>;
@@ -760,7 +760,7 @@ pmic_crit0: trip0 {
};
};
- soc {
+ soc-thermal {
polling-delay = <1000>;
polling-delay-passive = <100>;
thermal-sensors = <&scpi_sensors0 3>;
@@ -773,28 +773,28 @@ soc_crit0: trip0 {
};
};
- big_cluster_thermal_zone: big-cluster {
+ big_cluster_thermal_zone: big-cluster-thermal {
polling-delay = <1000>;
polling-delay-passive = <100>;
thermal-sensors = <&scpi_sensors0 21>;
status = "disabled";
};
- little_cluster_thermal_zone: little-cluster {
+ little_cluster_thermal_zone: little-cluster-thermal {
polling-delay = <1000>;
polling-delay-passive = <100>;
thermal-sensors = <&scpi_sensors0 22>;
status = "disabled";
};
- gpu0_thermal_zone: gpu0 {
+ gpu0_thermal_zone: gpu0-thermal {
polling-delay = <1000>;
polling-delay-passive = <100>;
thermal-sensors = <&scpi_sensors0 23>;
status = "disabled";
};
- gpu1_thermal_zone: gpu1 {
+ gpu1_thermal_zone: gpu1-thermal {
polling-delay = <1000>;
polling-delay-passive = <100>;
thermal-sensors = <&scpi_sensors0 24>;
diff --git a/arch/arm64/boot/dts/arm/juno-scmi.dtsi b/arch/arm64/boot/dts/arm/juno-scmi.dtsi
index ec85cd2c733c..31929e2377d8 100644
--- a/arch/arm64/boot/dts/arm/juno-scmi.dtsi
+++ b/arch/arm64/boot/dts/arm/juno-scmi.dtsi
@@ -76,27 +76,27 @@ scmi_sensors0: protocol@15 {
};
thermal-zones {
- pmic {
+ pmic-thermal {
thermal-sensors = <&scmi_sensors0 0>;
};
- soc {
+ soc-thermal {
thermal-sensors = <&scmi_sensors0 3>;
};
- big-cluster {
+ big-cluster-thermal {
thermal-sensors = <&scmi_sensors0 21>;
};
- little-cluster {
+ little-cluster-thermal {
thermal-sensors = <&scmi_sensors0 22>;
};
- gpu0 {
+ gpu0-thermal {
thermal-sensors = <&scmi_sensors0 23>;
};
- gpu1 {
+ gpu1-thermal {
thermal-sensors = <&scmi_sensors0 24>;
};
};
--
2.34.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: [PATCH] arm64: dts: juno: align thermal zone names with bindings
2023-12-09 17:16 ` Krzysztof Kozlowski
@ 2023-12-11 10:27 ` Liviu Dudau
-1 siblings, 0 replies; 12+ messages in thread
From: Liviu Dudau @ 2023-12-11 10:27 UTC (permalink / raw)
To: Krzysztof Kozlowski
Cc: Sudeep Holla, Lorenzo Pieralisi, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, linux-arm-kernel, devicetree,
linux-kernel
On Sat, Dec 09, 2023 at 06:16:12PM +0100, Krzysztof Kozlowski wrote:
> Thermal bindings require thermal zone node names to match
> certain patterns:
>
> juno.dtb: thermal-zones: 'big-cluster', 'gpu0', 'gpu1', 'little-cluster', 'pmic', 'soc'
> do not match any of the regexes: '^[a-zA-Z][a-zA-Z0-9\\-]{1,12}-thermal$', 'pinctrl-[0-9]+'
>
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Acked-by: Liviu Dudau <liviu.dudau@arm.com>
Thanks for fixing this!
Best regards,
Liviu
> ---
> arch/arm64/boot/dts/arm/juno-base.dtsi | 12 ++++++------
> arch/arm64/boot/dts/arm/juno-scmi.dtsi | 12 ++++++------
> 2 files changed, 12 insertions(+), 12 deletions(-)
>
> diff --git a/arch/arm64/boot/dts/arm/juno-base.dtsi b/arch/arm64/boot/dts/arm/juno-base.dtsi
> index 8b4d280b1e7e..b897f5542c0a 100644
> --- a/arch/arm64/boot/dts/arm/juno-base.dtsi
> +++ b/arch/arm64/boot/dts/arm/juno-base.dtsi
> @@ -747,7 +747,7 @@ scpi_sensors0: sensors {
> };
>
> thermal-zones {
> - pmic {
> + pmic-thermal {
> polling-delay = <1000>;
> polling-delay-passive = <100>;
> thermal-sensors = <&scpi_sensors0 0>;
> @@ -760,7 +760,7 @@ pmic_crit0: trip0 {
> };
> };
>
> - soc {
> + soc-thermal {
> polling-delay = <1000>;
> polling-delay-passive = <100>;
> thermal-sensors = <&scpi_sensors0 3>;
> @@ -773,28 +773,28 @@ soc_crit0: trip0 {
> };
> };
>
> - big_cluster_thermal_zone: big-cluster {
> + big_cluster_thermal_zone: big-cluster-thermal {
> polling-delay = <1000>;
> polling-delay-passive = <100>;
> thermal-sensors = <&scpi_sensors0 21>;
> status = "disabled";
> };
>
> - little_cluster_thermal_zone: little-cluster {
> + little_cluster_thermal_zone: little-cluster-thermal {
> polling-delay = <1000>;
> polling-delay-passive = <100>;
> thermal-sensors = <&scpi_sensors0 22>;
> status = "disabled";
> };
>
> - gpu0_thermal_zone: gpu0 {
> + gpu0_thermal_zone: gpu0-thermal {
> polling-delay = <1000>;
> polling-delay-passive = <100>;
> thermal-sensors = <&scpi_sensors0 23>;
> status = "disabled";
> };
>
> - gpu1_thermal_zone: gpu1 {
> + gpu1_thermal_zone: gpu1-thermal {
> polling-delay = <1000>;
> polling-delay-passive = <100>;
> thermal-sensors = <&scpi_sensors0 24>;
> diff --git a/arch/arm64/boot/dts/arm/juno-scmi.dtsi b/arch/arm64/boot/dts/arm/juno-scmi.dtsi
> index ec85cd2c733c..31929e2377d8 100644
> --- a/arch/arm64/boot/dts/arm/juno-scmi.dtsi
> +++ b/arch/arm64/boot/dts/arm/juno-scmi.dtsi
> @@ -76,27 +76,27 @@ scmi_sensors0: protocol@15 {
> };
>
> thermal-zones {
> - pmic {
> + pmic-thermal {
> thermal-sensors = <&scmi_sensors0 0>;
> };
>
> - soc {
> + soc-thermal {
> thermal-sensors = <&scmi_sensors0 3>;
> };
>
> - big-cluster {
> + big-cluster-thermal {
> thermal-sensors = <&scmi_sensors0 21>;
> };
>
> - little-cluster {
> + little-cluster-thermal {
> thermal-sensors = <&scmi_sensors0 22>;
> };
>
> - gpu0 {
> + gpu0-thermal {
> thermal-sensors = <&scmi_sensors0 23>;
> };
>
> - gpu1 {
> + gpu1-thermal {
> thermal-sensors = <&scmi_sensors0 24>;
> };
> };
> --
> 2.34.1
>
--
====================
| I would like to |
| fix the world, |
| but they're not |
| giving me the |
\ source code! /
---------------
¯\_(ツ)_/¯
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] arm64: dts: juno: align thermal zone names with bindings
@ 2023-12-11 10:27 ` Liviu Dudau
0 siblings, 0 replies; 12+ messages in thread
From: Liviu Dudau @ 2023-12-11 10:27 UTC (permalink / raw)
To: Krzysztof Kozlowski
Cc: Sudeep Holla, Lorenzo Pieralisi, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, linux-arm-kernel, devicetree,
linux-kernel
On Sat, Dec 09, 2023 at 06:16:12PM +0100, Krzysztof Kozlowski wrote:
> Thermal bindings require thermal zone node names to match
> certain patterns:
>
> juno.dtb: thermal-zones: 'big-cluster', 'gpu0', 'gpu1', 'little-cluster', 'pmic', 'soc'
> do not match any of the regexes: '^[a-zA-Z][a-zA-Z0-9\\-]{1,12}-thermal$', 'pinctrl-[0-9]+'
>
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Acked-by: Liviu Dudau <liviu.dudau@arm.com>
Thanks for fixing this!
Best regards,
Liviu
> ---
> arch/arm64/boot/dts/arm/juno-base.dtsi | 12 ++++++------
> arch/arm64/boot/dts/arm/juno-scmi.dtsi | 12 ++++++------
> 2 files changed, 12 insertions(+), 12 deletions(-)
>
> diff --git a/arch/arm64/boot/dts/arm/juno-base.dtsi b/arch/arm64/boot/dts/arm/juno-base.dtsi
> index 8b4d280b1e7e..b897f5542c0a 100644
> --- a/arch/arm64/boot/dts/arm/juno-base.dtsi
> +++ b/arch/arm64/boot/dts/arm/juno-base.dtsi
> @@ -747,7 +747,7 @@ scpi_sensors0: sensors {
> };
>
> thermal-zones {
> - pmic {
> + pmic-thermal {
> polling-delay = <1000>;
> polling-delay-passive = <100>;
> thermal-sensors = <&scpi_sensors0 0>;
> @@ -760,7 +760,7 @@ pmic_crit0: trip0 {
> };
> };
>
> - soc {
> + soc-thermal {
> polling-delay = <1000>;
> polling-delay-passive = <100>;
> thermal-sensors = <&scpi_sensors0 3>;
> @@ -773,28 +773,28 @@ soc_crit0: trip0 {
> };
> };
>
> - big_cluster_thermal_zone: big-cluster {
> + big_cluster_thermal_zone: big-cluster-thermal {
> polling-delay = <1000>;
> polling-delay-passive = <100>;
> thermal-sensors = <&scpi_sensors0 21>;
> status = "disabled";
> };
>
> - little_cluster_thermal_zone: little-cluster {
> + little_cluster_thermal_zone: little-cluster-thermal {
> polling-delay = <1000>;
> polling-delay-passive = <100>;
> thermal-sensors = <&scpi_sensors0 22>;
> status = "disabled";
> };
>
> - gpu0_thermal_zone: gpu0 {
> + gpu0_thermal_zone: gpu0-thermal {
> polling-delay = <1000>;
> polling-delay-passive = <100>;
> thermal-sensors = <&scpi_sensors0 23>;
> status = "disabled";
> };
>
> - gpu1_thermal_zone: gpu1 {
> + gpu1_thermal_zone: gpu1-thermal {
> polling-delay = <1000>;
> polling-delay-passive = <100>;
> thermal-sensors = <&scpi_sensors0 24>;
> diff --git a/arch/arm64/boot/dts/arm/juno-scmi.dtsi b/arch/arm64/boot/dts/arm/juno-scmi.dtsi
> index ec85cd2c733c..31929e2377d8 100644
> --- a/arch/arm64/boot/dts/arm/juno-scmi.dtsi
> +++ b/arch/arm64/boot/dts/arm/juno-scmi.dtsi
> @@ -76,27 +76,27 @@ scmi_sensors0: protocol@15 {
> };
>
> thermal-zones {
> - pmic {
> + pmic-thermal {
> thermal-sensors = <&scmi_sensors0 0>;
> };
>
> - soc {
> + soc-thermal {
> thermal-sensors = <&scmi_sensors0 3>;
> };
>
> - big-cluster {
> + big-cluster-thermal {
> thermal-sensors = <&scmi_sensors0 21>;
> };
>
> - little-cluster {
> + little-cluster-thermal {
> thermal-sensors = <&scmi_sensors0 22>;
> };
>
> - gpu0 {
> + gpu0-thermal {
> thermal-sensors = <&scmi_sensors0 23>;
> };
>
> - gpu1 {
> + gpu1-thermal {
> thermal-sensors = <&scmi_sensors0 24>;
> };
> };
> --
> 2.34.1
>
--
====================
| I would like to |
| fix the world, |
| but they're not |
| giving me the |
\ source code! /
---------------
¯\_(ツ)_/¯
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] arm64: dts: juno: align thermal zone names with bindings
2023-12-09 17:16 ` Krzysztof Kozlowski
@ 2023-12-13 11:57 ` Sudeep Holla
-1 siblings, 0 replies; 12+ messages in thread
From: Sudeep Holla @ 2023-12-13 11:57 UTC (permalink / raw)
To: Liviu Dudau, Lorenzo Pieralisi, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, linux-arm-kernel, devicetree, linux-kernel,
Krzysztof Kozlowski
Cc: Sudeep Holla
On Sat, 09 Dec 2023 18:16:12 +0100, Krzysztof Kozlowski wrote:
> Thermal bindings require thermal zone node names to match
> certain patterns:
>
> juno.dtb: thermal-zones: 'big-cluster', 'gpu0', 'gpu1', 'little-cluster', 'pmic', 'soc'
> do not match any of the regexes: '^[a-zA-Z][a-zA-Z0-9\\-]{1,12}-thermal$', 'pinctrl-[0-9]+'
>
>
> [...]
Applied to sudeep.holla/linux (for-next/juno/updates), thanks!
[1/1] arm64: dts: juno: align thermal zone names with bindings
https://git.kernel.org/sudeep.holla/c/fb4d25d7a33f
--
Regards,
Sudeep
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] arm64: dts: juno: align thermal zone names with bindings
@ 2023-12-13 11:57 ` Sudeep Holla
0 siblings, 0 replies; 12+ messages in thread
From: Sudeep Holla @ 2023-12-13 11:57 UTC (permalink / raw)
To: Liviu Dudau, Lorenzo Pieralisi, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, linux-arm-kernel, devicetree, linux-kernel,
Krzysztof Kozlowski
Cc: Sudeep Holla
On Sat, 09 Dec 2023 18:16:12 +0100, Krzysztof Kozlowski wrote:
> Thermal bindings require thermal zone node names to match
> certain patterns:
>
> juno.dtb: thermal-zones: 'big-cluster', 'gpu0', 'gpu1', 'little-cluster', 'pmic', 'soc'
> do not match any of the regexes: '^[a-zA-Z][a-zA-Z0-9\\-]{1,12}-thermal$', 'pinctrl-[0-9]+'
>
>
> [...]
Applied to sudeep.holla/linux (for-next/juno/updates), thanks!
[1/1] arm64: dts: juno: align thermal zone names with bindings
https://git.kernel.org/sudeep.holla/c/fb4d25d7a33f
--
Regards,
Sudeep
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] arm64: dts: juno: align thermal zone names with bindings
2023-12-09 17:16 ` Krzysztof Kozlowski
@ 2024-01-02 18:09 ` Rob Herring
-1 siblings, 0 replies; 12+ messages in thread
From: Rob Herring @ 2024-01-02 18:09 UTC (permalink / raw)
To: Krzysztof Kozlowski
Cc: Liviu Dudau, Sudeep Holla, Lorenzo Pieralisi,
Krzysztof Kozlowski, Conor Dooley, linux-arm-kernel, devicetree,
linux-kernel
On Sat, Dec 9, 2023 at 10:16 AM Krzysztof Kozlowski
<krzysztof.kozlowski@linaro.org> wrote:
>
> Thermal bindings require thermal zone node names to match
> certain patterns:
>
> juno.dtb: thermal-zones: 'big-cluster', 'gpu0', 'gpu1', 'little-cluster', 'pmic', 'soc'
> do not match any of the regexes: '^[a-zA-Z][a-zA-Z0-9\\-]{1,12}-thermal$', 'pinctrl-[0-9]+'
You've just traded this warning for these:
6 thermal-zones: 'little-cluster-thermal' does not match any of
the regexes: '^[a-zA-Z][a-zA-Z0-9\\-]{1,12}-thermal$',
'pinctrl-[0-9]+'
4 thermal-zones: gpu1-thermal: 'trips' is a required property
4 thermal-zones: gpu0-thermal: 'trips' is a required property
4 thermal-zones: big-cluster-thermal: 'trips' is a required property
Last I checked this, it looked like the length of the child names was
limited because the thermal subsys uses the node names for its naming
which is limited to 20 chars (with null). Though the regex here allows
for 21 chars without nul. Looks like a double off by one error.
The thought I had at the time was to make the kernel drop '-thermal'
from its names. Might be an (Linux) ABI issue if userspace cares (I
think it shouldn't). Also, I'm not sure how the kernel handles the
names overflowing. Maybe it is fine and we can just extend the length
in the schema from 12 to 18 (plus the 1 starting char).
Rob
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] arm64: dts: juno: align thermal zone names with bindings
@ 2024-01-02 18:09 ` Rob Herring
0 siblings, 0 replies; 12+ messages in thread
From: Rob Herring @ 2024-01-02 18:09 UTC (permalink / raw)
To: Krzysztof Kozlowski
Cc: Liviu Dudau, Sudeep Holla, Lorenzo Pieralisi,
Krzysztof Kozlowski, Conor Dooley, linux-arm-kernel, devicetree,
linux-kernel
On Sat, Dec 9, 2023 at 10:16 AM Krzysztof Kozlowski
<krzysztof.kozlowski@linaro.org> wrote:
>
> Thermal bindings require thermal zone node names to match
> certain patterns:
>
> juno.dtb: thermal-zones: 'big-cluster', 'gpu0', 'gpu1', 'little-cluster', 'pmic', 'soc'
> do not match any of the regexes: '^[a-zA-Z][a-zA-Z0-9\\-]{1,12}-thermal$', 'pinctrl-[0-9]+'
You've just traded this warning for these:
6 thermal-zones: 'little-cluster-thermal' does not match any of
the regexes: '^[a-zA-Z][a-zA-Z0-9\\-]{1,12}-thermal$',
'pinctrl-[0-9]+'
4 thermal-zones: gpu1-thermal: 'trips' is a required property
4 thermal-zones: gpu0-thermal: 'trips' is a required property
4 thermal-zones: big-cluster-thermal: 'trips' is a required property
Last I checked this, it looked like the length of the child names was
limited because the thermal subsys uses the node names for its naming
which is limited to 20 chars (with null). Though the regex here allows
for 21 chars without nul. Looks like a double off by one error.
The thought I had at the time was to make the kernel drop '-thermal'
from its names. Might be an (Linux) ABI issue if userspace cares (I
think it shouldn't). Also, I'm not sure how the kernel handles the
names overflowing. Maybe it is fine and we can just extend the length
in the schema from 12 to 18 (plus the 1 starting char).
Rob
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] arm64: dts: juno: align thermal zone names with bindings
2024-01-02 18:09 ` Rob Herring
@ 2024-01-03 10:13 ` Krzysztof Kozlowski
-1 siblings, 0 replies; 12+ messages in thread
From: Krzysztof Kozlowski @ 2024-01-03 10:13 UTC (permalink / raw)
To: Rob Herring
Cc: Liviu Dudau, Sudeep Holla, Lorenzo Pieralisi,
Krzysztof Kozlowski, Conor Dooley, linux-arm-kernel, devicetree,
linux-kernel
On 02/01/2024 19:09, Rob Herring wrote:
> On Sat, Dec 9, 2023 at 10:16 AM Krzysztof Kozlowski
> <krzysztof.kozlowski@linaro.org> wrote:
>>
>> Thermal bindings require thermal zone node names to match
>> certain patterns:
>>
>> juno.dtb: thermal-zones: 'big-cluster', 'gpu0', 'gpu1', 'little-cluster', 'pmic', 'soc'
>> do not match any of the regexes: '^[a-zA-Z][a-zA-Z0-9\\-]{1,12}-thermal$', 'pinctrl-[0-9]+'
>
> You've just traded this warning for these:
>
> 6 thermal-zones: 'little-cluster-thermal' does not match any of
> the regexes: '^[a-zA-Z][a-zA-Z0-9\\-]{1,12}-thermal$',
Uh, now I wonder how did I see the warning going away.
> 'pinctrl-[0-9]+'
> 4 thermal-zones: gpu1-thermal: 'trips' is a required property
> 4 thermal-zones: gpu0-thermal: 'trips' is a required property
> 4 thermal-zones: big-cluster-thermal: 'trips' is a required property
>
> Last I checked this, it looked like the length of the child names was
> limited because the thermal subsys uses the node names for its naming
> which is limited to 20 chars (with null). Though the regex here allows
> for 21 chars without nul. Looks like a double off by one error.
Yes, that's another issue.
>
> The thought I had at the time was to make the kernel drop '-thermal'
> from its names. Might be an (Linux) ABI issue if userspace cares (I
> think it shouldn't). Also, I'm not sure how the kernel handles the
> names overflowing. Maybe it is fine and we can just extend the length
> in the schema from 12 to 18 (plus the 1 starting char).
The name is used in the "/sys/class/thermal/thermal_zone0/type" file, so
actually some userspace could depend on it, but it would be affected
anyway by my renaming of nodes.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] arm64: dts: juno: align thermal zone names with bindings
@ 2024-01-03 10:13 ` Krzysztof Kozlowski
0 siblings, 0 replies; 12+ messages in thread
From: Krzysztof Kozlowski @ 2024-01-03 10:13 UTC (permalink / raw)
To: Rob Herring
Cc: Liviu Dudau, Sudeep Holla, Lorenzo Pieralisi,
Krzysztof Kozlowski, Conor Dooley, linux-arm-kernel, devicetree,
linux-kernel
On 02/01/2024 19:09, Rob Herring wrote:
> On Sat, Dec 9, 2023 at 10:16 AM Krzysztof Kozlowski
> <krzysztof.kozlowski@linaro.org> wrote:
>>
>> Thermal bindings require thermal zone node names to match
>> certain patterns:
>>
>> juno.dtb: thermal-zones: 'big-cluster', 'gpu0', 'gpu1', 'little-cluster', 'pmic', 'soc'
>> do not match any of the regexes: '^[a-zA-Z][a-zA-Z0-9\\-]{1,12}-thermal$', 'pinctrl-[0-9]+'
>
> You've just traded this warning for these:
>
> 6 thermal-zones: 'little-cluster-thermal' does not match any of
> the regexes: '^[a-zA-Z][a-zA-Z0-9\\-]{1,12}-thermal$',
Uh, now I wonder how did I see the warning going away.
> 'pinctrl-[0-9]+'
> 4 thermal-zones: gpu1-thermal: 'trips' is a required property
> 4 thermal-zones: gpu0-thermal: 'trips' is a required property
> 4 thermal-zones: big-cluster-thermal: 'trips' is a required property
>
> Last I checked this, it looked like the length of the child names was
> limited because the thermal subsys uses the node names for its naming
> which is limited to 20 chars (with null). Though the regex here allows
> for 21 chars without nul. Looks like a double off by one error.
Yes, that's another issue.
>
> The thought I had at the time was to make the kernel drop '-thermal'
> from its names. Might be an (Linux) ABI issue if userspace cares (I
> think it shouldn't). Also, I'm not sure how the kernel handles the
> names overflowing. Maybe it is fine and we can just extend the length
> in the schema from 12 to 18 (plus the 1 starting char).
The name is used in the "/sys/class/thermal/thermal_zone0/type" file, so
actually some userspace could depend on it, but it would be affected
anyway by my renaming of nodes.
Best regards,
Krzysztof
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] arm64: dts: juno: align thermal zone names with bindings
2024-01-03 10:13 ` Krzysztof Kozlowski
@ 2024-01-03 13:39 ` Krzysztof Kozlowski
-1 siblings, 0 replies; 12+ messages in thread
From: Krzysztof Kozlowski @ 2024-01-03 13:39 UTC (permalink / raw)
To: Rob Herring
Cc: Liviu Dudau, Sudeep Holla, Lorenzo Pieralisi,
Krzysztof Kozlowski, Conor Dooley, linux-arm-kernel, devicetree,
linux-kernel
On 03/01/2024 11:13, Krzysztof Kozlowski wrote:
>
>> 'pinctrl-[0-9]+'
>> 4 thermal-zones: gpu1-thermal: 'trips' is a required property
>> 4 thermal-zones: gpu0-thermal: 'trips' is a required property
>> 4 thermal-zones: big-cluster-thermal: 'trips' is a required property
>>
>> Last I checked this, it looked like the length of the child names was
>> limited because the thermal subsys uses the node names for its naming
>> which is limited to 20 chars (with null). Though the regex here allows
>> for 21 chars without nul. Looks like a double off by one error.
>
> Yes, that's another issue.
>
>>
>> The thought I had at the time was to make the kernel drop '-thermal'
>> from its names. Might be an (Linux) ABI issue if userspace cares (I
>> think it shouldn't). Also, I'm not sure how the kernel handles the
>> names overflowing. Maybe it is fine and we can just extend the length
>> in the schema from 12 to 18 (plus the 1 starting char).
>
> The name is used in the "/sys/class/thermal/thermal_zone0/type" file, so
> actually some userspace could depend on it, but it would be affected
> anyway by my renaming of nodes.
Stripping "-thermal" prefix is a bit bigger task, because it is later
used to find the actual nodes. The thermal framework does not store
device_node pointer, but looks up by the name.
There is on-going work around this:
https://lore.kernel.org/all/20231012175836.3408077-2-thierry.reding@gmail.com/
https://lore.kernel.org/all/20231221124825.149141-27-angelogioacchino.delregno@collabora.com/
so I will just fix the DTS (shorten the name) and fix bindings for 11
characters.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] arm64: dts: juno: align thermal zone names with bindings
@ 2024-01-03 13:39 ` Krzysztof Kozlowski
0 siblings, 0 replies; 12+ messages in thread
From: Krzysztof Kozlowski @ 2024-01-03 13:39 UTC (permalink / raw)
To: Rob Herring
Cc: Liviu Dudau, Sudeep Holla, Lorenzo Pieralisi,
Krzysztof Kozlowski, Conor Dooley, linux-arm-kernel, devicetree,
linux-kernel
On 03/01/2024 11:13, Krzysztof Kozlowski wrote:
>
>> 'pinctrl-[0-9]+'
>> 4 thermal-zones: gpu1-thermal: 'trips' is a required property
>> 4 thermal-zones: gpu0-thermal: 'trips' is a required property
>> 4 thermal-zones: big-cluster-thermal: 'trips' is a required property
>>
>> Last I checked this, it looked like the length of the child names was
>> limited because the thermal subsys uses the node names for its naming
>> which is limited to 20 chars (with null). Though the regex here allows
>> for 21 chars without nul. Looks like a double off by one error.
>
> Yes, that's another issue.
>
>>
>> The thought I had at the time was to make the kernel drop '-thermal'
>> from its names. Might be an (Linux) ABI issue if userspace cares (I
>> think it shouldn't). Also, I'm not sure how the kernel handles the
>> names overflowing. Maybe it is fine and we can just extend the length
>> in the schema from 12 to 18 (plus the 1 starting char).
>
> The name is used in the "/sys/class/thermal/thermal_zone0/type" file, so
> actually some userspace could depend on it, but it would be affected
> anyway by my renaming of nodes.
Stripping "-thermal" prefix is a bit bigger task, because it is later
used to find the actual nodes. The thermal framework does not store
device_node pointer, but looks up by the name.
There is on-going work around this:
https://lore.kernel.org/all/20231012175836.3408077-2-thierry.reding@gmail.com/
https://lore.kernel.org/all/20231221124825.149141-27-angelogioacchino.delregno@collabora.com/
so I will just fix the DTS (shorten the name) and fix bindings for 11
characters.
Best regards,
Krzysztof
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 12+ messages in thread