Message ID | 20231209171612.250868-1-krzysztof.kozlowski@linaro.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:bcd1:0:b0:403:3b70:6f57 with SMTP id r17csp6158297vqy; Sat, 9 Dec 2023 09:16:23 -0800 (PST) X-Google-Smtp-Source: AGHT+IHmooCBP0NmgxTSwyM282PAJjmWknxJfLqyvW0pa11FnibEZzSLJ4mHDZrhaRz2EbmtoyZ6 X-Received: by 2002:a05:6a00:27a1:b0:6ce:7612:6c30 with SMTP id bd33-20020a056a0027a100b006ce76126c30mr996575pfb.65.1702142182888; Sat, 09 Dec 2023 09:16:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702142182; cv=none; d=google.com; s=arc-20160816; b=cTRiqXpY/6CokwBvtGlQgImuXs+LpW2TDEYRkUixWAPCYYkMkePEf708RmzBy1+zzq GAoFvTQI5STCUKE5AkoODyTmhBRKqt0RZ+pHRPAEA5AqVndesbIyvJEZ0Xa/9FgRqHAJ kGswPzUW8hrfZtxh29NUIIfCFiPDJjI9ELVVvTP957ZZeNDjC3Z4MalcFP/Z35/kULtK hhgZVlwGwFM0+lI8BpAN+6eHH0qyJ/DRkONGe6rK95BwKDuXPzk8wBORjRWNomevUIJn DREdHy2WzP5lHFofK9JvgJNzRy8itL2DkzAUM/Zx9hxUNWdGNUJ28QH/nuyruzDqZk88 CwLw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=N//LFsMjuZq4iKtlyMYGCirrn61f3kbX/lE5kaAb5qM=; fh=+CMPvlHtEJzYcik6YHkhDH6EXcuvilh4HDttyNF+De4=; b=w8jy0cgmqm+vQcLjfFnMT8k8CKWc/hwz/rlmzNV9Ys5bZNFz8YkXiIIvaVvj/U11sU HkK/fVxFypveXbSNCJwmrn06XRTaQAdhke4VL6kmnuodi7j9NLPKswLh4aqoqTElN8sA 3LkVmL6rW9Cuvs4ZQCkT059vibeqc0X6JMGmBJPNTMB6T2mLqgat5I16PN/WplVot4II wQZIe0/ltCYTgjNsx1qS4vQ3sWWORE6cRrZ5bk1qHGqGfntduec7mv/9Nc9GzmpPwjtG LsMMC+5rppE9fJDcEiHCJ6sZO5yVnDaXBzPduGvMOFAQw607V+SMRH0sNT9LH1ibZvpy 4HMg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ujyn2XY0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from pete.vger.email (pete.vger.email. [23.128.96.36]) by mx.google.com with ESMTPS id z17-20020a056a00241100b006cde2f43c62si3265518pfh.354.2023.12.09.09.16.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 09 Dec 2023 09:16:22 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) client-ip=23.128.96.36; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ujyn2XY0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id B503F80511AD; Sat, 9 Dec 2023 09:16:19 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229940AbjLIRQL (ORCPT <rfc822;makky5685@gmail.com> + 99 others); Sat, 9 Dec 2023 12:16:11 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60634 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229519AbjLIRQK (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Sat, 9 Dec 2023 12:16:10 -0500 Received: from mail-ej1-x635.google.com (mail-ej1-x635.google.com [IPv6:2a00:1450:4864:20::635]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 318FC10DF for <linux-kernel@vger.kernel.org>; Sat, 9 Dec 2023 09:16:16 -0800 (PST) Received: by mail-ej1-x635.google.com with SMTP id a640c23a62f3a-a1e7971db2aso351539366b.3 for <linux-kernel@vger.kernel.org>; Sat, 09 Dec 2023 09:16:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1702142174; x=1702746974; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=N//LFsMjuZq4iKtlyMYGCirrn61f3kbX/lE5kaAb5qM=; b=ujyn2XY0s+DUNmoPYucuSF5vT+dDO00Pbd6eWcNLxGEhfLYQWPd3v28noHNgixDjF2 noxlZuqRJEt/1yzFr/9AK/Abrty8SCQz6sn2jdFL5gvwMrh1XR1HhrW3IHiVqVQp3D5Q 8Rezqht58jXYsHR0XGjNGya/AkWbRQU0L786YsyfMTQ8Rdy9t2Tyi5lGtv70BFlaQz2O ldsKqR/68ErVEwWOEjW7ims0s2lF9uoW89KAUxMhvNIJmAjSnyG4qu1wK8Hczx4I21lN qU0sg965U07p3sw7K7MIy9FrR8wEs4juv68t0jc/kQzZ2BVqtmlAB1O7fyBAsKy/GEJV NO6Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702142174; x=1702746974; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=N//LFsMjuZq4iKtlyMYGCirrn61f3kbX/lE5kaAb5qM=; b=nt2zcfcDOy5/PAlOIytSuD/mUw9woBwVvLth0kjWDx5Hw02xLqA+BJ6JYhuBDLza+8 vRYeE8MR8ARbb6AIczQadA2uBEmDaHLRzhP1BY6L+4DXXcT5aaRd/Z0F+gP4fpBcCJo1 fh1G7Lwl3lsdNMqzi1WsAbw8Tz94OQXLIzD0hrcsoH7vw1pRwIJMp3MU8ZdH4yFqvLNz 5vfZQZmhyyZ4ebZdkvUxyW+nP4whgm+abL/MU9K5ATxS1aYPYHIpDr7A3n3q+IcJ6Vi0 eHjrI0Sbp+2IzK849i1aHVZQV/Q4J28irQn3l6T0IETyn/vw3UzuCdNABKW/nTTx9Loh uWKQ== X-Gm-Message-State: AOJu0Yyd10M584zmuNfsIBYZXtHuLnNe6NWAg0/Fy2v4J9OhfS1CzkhJ 201bEpHbZtL1rk3TOjRvv7Z02A== X-Received: by 2002:a17:907:948f:b0:a01:e916:3590 with SMTP id dm15-20020a170907948f00b00a01e9163590mr1054629ejc.75.1702142174592; Sat, 09 Dec 2023 09:16:14 -0800 (PST) Received: from krzk-bin.. ([178.197.218.27]) by smtp.gmail.com with ESMTPSA id sf21-20020a1709078a9500b00a1f7cbf28a5sm1179782ejc.106.2023.12.09.09.16.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 09 Dec 2023 09:16:14 -0800 (PST) From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> To: Liviu Dudau <liviu.dudau@arm.com>, Sudeep Holla <sudeep.holla@arm.com>, Lorenzo Pieralisi <lpieralisi@kernel.org>, Rob Herring <robh+dt@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 Cc: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Subject: [PATCH] arm64: dts: juno: align thermal zone names with bindings Date: Sat, 9 Dec 2023 18:16:12 +0100 Message-Id: <20231209171612.250868-1-krzysztof.kozlowski@linaro.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Sat, 09 Dec 2023 09:16:20 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1784825441533139276 X-GMAIL-MSGID: 1784825441533139276 |
Series |
arm64: dts: juno: align thermal zone names with bindings
|
|
Commit Message
Krzysztof Kozlowski
Dec. 9, 2023, 5:16 p.m. UTC
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(-)
Comments
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 >
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
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
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
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
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>; }; };