Re: [PATCH] arm64: dts: juno: align thermal zone names with bindings
From: Krzysztof Kozlowski <hidden>
Date: 2024-01-03 13:39:10
Also in:
linux-devicetree, lkml
On 03/01/2024 11:13, Krzysztof Kozlowski wrote:
quoted
'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.quoted
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/ (local) https://lore.kernel.org/all/20231221124825.149141-27-angelogioacchino.delregno@collabora.com/ (local) 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