All of lore.kernel.org
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
To: Rob Herring <robh+dt@kernel.org>
Cc: Liviu Dudau <liviu.dudau@arm.com>,
	Sudeep Holla <sudeep.holla@arm.com>,
	Lorenzo Pieralisi <lpieralisi@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Conor Dooley <conor+dt@kernel.org>,
	linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] arm64: dts: juno: align thermal zone names with bindings
Date: Wed, 3 Jan 2024 11:13:18 +0100	[thread overview]
Message-ID: <b9943188-b3f9-472f-bc60-e8e6e043ddf4@linaro.org> (raw)
In-Reply-To: <CAL_JsqKogbT_4DPd1n94xqeHaU_J8ve5K09WOyVsRX3jxxUW3w@mail.gmail.com>

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


WARNING: multiple messages have this Message-ID (diff)
From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
To: Rob Herring <robh+dt@kernel.org>
Cc: Liviu Dudau <liviu.dudau@arm.com>,
	Sudeep Holla <sudeep.holla@arm.com>,
	Lorenzo Pieralisi <lpieralisi@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Conor Dooley <conor+dt@kernel.org>,
	linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] arm64: dts: juno: align thermal zone names with bindings
Date: Wed, 3 Jan 2024 11:13:18 +0100	[thread overview]
Message-ID: <b9943188-b3f9-472f-bc60-e8e6e043ddf4@linaro.org> (raw)
In-Reply-To: <CAL_JsqKogbT_4DPd1n94xqeHaU_J8ve5K09WOyVsRX3jxxUW3w@mail.gmail.com>

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

  reply	other threads:[~2024-01-03 10:13 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-09 17:16 [PATCH] arm64: dts: juno: align thermal zone names with bindings Krzysztof Kozlowski
2023-12-09 17:16 ` Krzysztof Kozlowski
2023-12-11 10:27 ` Liviu Dudau
2023-12-11 10:27   ` Liviu Dudau
2023-12-13 11:57 ` Sudeep Holla
2023-12-13 11:57   ` Sudeep Holla
2024-01-02 18:09 ` Rob Herring
2024-01-02 18:09   ` Rob Herring
2024-01-03 10:13   ` Krzysztof Kozlowski [this message]
2024-01-03 10:13     ` Krzysztof Kozlowski
2024-01-03 13:39     ` Krzysztof Kozlowski
2024-01-03 13:39       ` Krzysztof Kozlowski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b9943188-b3f9-472f-bc60-e8e6e043ddf4@linaro.org \
    --to=krzysztof.kozlowski@linaro.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=liviu.dudau@arm.com \
    --cc=lpieralisi@kernel.org \
    --cc=robh+dt@kernel.org \
    --cc=sudeep.holla@arm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.