From patchwork Wed Mar 20 21:33:48 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Rapha=C3=ABl_Gallais-Pou?= X-Patchwork-Id: 13598202 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 6E05EC54E67 for ; Wed, 20 Mar 2024 21:34:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References:Message-Id :MIME-Version:Subject:Date:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=OmaF7W3ZwgN4OK4fINvryjV7KIfbsvjiC5LCmD4cGPQ=; b=t/mcNNK1hxAFMp NHCARZ8M/FGw5hWqlvPuuH82D8eyaZeg15+yrnNAjjmhNoF4M0PQ4ECihUXYoRHc6p/egZvphiQA/ EYibi8ta0Yb5V8Xic/DQ81afGTbI6v190MeB/rHwGoUhvESYLWcJ8U45whc+ALi0jFiNFzL+VffsT vF8n3YFpaUwo9TVuH5EObQtWcX7RRHGw+IuZe6ZqfOLhw3pZsPImKdN+MIvEBYbf8iwK8EKtlSL+4 yiguxZzExszizRgkFKVfF4+dEiIRIHrhA62J0QaNlDakkmxIgTcrGqD4z3PUmQivgayfy0YqcnarW sRh34MTwhJJ/C0+aFyUg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rn3ZT-000000011ma-4BS8; Wed, 20 Mar 2024 21:34:04 +0000 Received: from mail-wm1-x329.google.com ([2a00:1450:4864:20::329]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rn3ZP-000000011lC-2Vfe for linux-arm-kernel@lists.infradead.org; Wed, 20 Mar 2024 21:34:01 +0000 Received: by mail-wm1-x329.google.com with SMTP id 5b1f17b1804b1-4146f2bd5f1so2418165e9.3 for ; Wed, 20 Mar 2024 14:33:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1710970434; x=1711575234; darn=lists.infradead.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=Luf7LRUpOAFhMlxRw+l+V8h6+0FkYHyPc4K9DHr0oFI=; b=J/aBEQGh+sLXc8rtLdQOhM2Ry+DmyTB21O2aaAVZBq9W0Eu+LvIGF9G2pY7YjXIggn 3/Ty1fJErgsXfVaoP6h4TIx++Z6E0QTbq+yh1Z5feBJ4wPcRDl1ljjyha1QNRBS8oovA 2sryjb9Ftyeav1ysoEfJujOZfBc20VoifXec3ddByLWHryBMbTK5FuC6wfqf5nw4wGPG S6LYK99COcw9O3Oapxq/tAjz9NVPmdWg0VqW3psOJTfLhEyzZk79ezj4C9mrBud1/Dh8 yGyOKphDysICWfBwghCkKaJ/MHT6l6+bX36ruA7ggNiaCoqLooqdshx2RH6kHh1pmYWI H/HQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710970434; x=1711575234; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Luf7LRUpOAFhMlxRw+l+V8h6+0FkYHyPc4K9DHr0oFI=; b=H3C2CqtjB1CdNFd2cBf89uoT5UnIogBnhyQBM71dk3jSySh2JMXjEvR+icRLaI/y3p 1G9txm/MNaegxC3WhvAlBfXRE1v+7aMitJgSu+yOMr+y6BfDQx9G+NA5n+4ADc7qAZ/w bUtT0uzLUtxx5E/kYN+BBfzFjFNE7Wmq7dpWn70OkvLgkopGPN0fWtty5zwkW6Z5iORm GWWTuSGjjyld7DpotgXAC8xuDkQRS2SzBBAgNBwsRgU0RV5Mg+mq2aIpRVzQpNzMzwi0 qGdDfFuekDWTUIF6jas20wUDzlxqadzqNbUba1IvySQI+inKptOmj/TdoFGv1JXWP7nQ 9qIw== X-Forwarded-Encrypted: i=1; AJvYcCVEMa3onocySiFC3gaDcV6JkX9a4oIa25pjF6gI8yrYmCuxlZHgESnKWSJkIsR2TbAxzSKlApG4KUAzwUcpJoV6VHpcugpU7NZskAUzLy4uxaFD7BM= X-Gm-Message-State: AOJu0YzS7LXgM3Nlu1PbsqsvRFAQRoHFWiDOdlz5jvvoqhSvVhlXO/Dv 7wUJQgwzc43aSXK2gIjNP6MHLJyNa5khpoFHfzczXKlzctIPuIQK X-Google-Smtp-Source: AGHT+IGezsMTBHc2QdgFq0n7EozdBXZgHvgQuWQyJPBcvJpyQhLkTLUDVcBjSgox1jdOY++8RpnB2g== X-Received: by 2002:a05:600c:1d28:b0:414:101a:fa67 with SMTP id l40-20020a05600c1d2800b00414101afa67mr2641769wms.18.1710970434560; Wed, 20 Mar 2024 14:33:54 -0700 (PDT) Received: from localhost ([2001:861:3385:e20:6384:4cf:52c5:3194]) by smtp.gmail.com with ESMTPSA id t18-20020a05600c199200b00414612a43a9sm3396821wmq.28.2024.03.20.14.33.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Mar 2024 14:33:54 -0700 (PDT) From: Raphael Gallais-Pou Date: Wed, 20 Mar 2024 22:33:48 +0100 Subject: [PATCH v3 1/2] dt-bindings: thermal: convert st,stih407-thermal to DT schema MIME-Version: 1.0 Message-Id: <20240320-thermal-v3-1-700296694c4a@gmail.com> References: <20240320-thermal-v3-0-700296694c4a@gmail.com> In-Reply-To: <20240320-thermal-v3-0-700296694c4a@gmail.com> To: "Rafael J. Wysocki" , Daniel Lezcano , Zhang Rui , Lukasz Luba , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Patrice Chotard , Lee Jones Cc: linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org X-Mailer: b4 0.13.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240320_143359_737973_4D924DE6 X-CRM114-Status: GOOD ( 18.48 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 'st,passive_colling_temp' does not appear in the device-tree, 'reg' and '#thermal-sensor-cells' are also missing in the device description. Convert st,stih407-thermal binding to DT schema format in order to clean unused 'st,passive_cooling_temp' and add missing properties. Signed-off-by: Raphael Gallais-Pou Reviewed-by: Krzysztof Kozlowski --- Changes in v3: - Specify const value for '#thermal-sensor-cells' - Add 'maxItems' for 'interrupts' property - Change commit log accordingly Changes in v2: - Change commit log to use imperative - Drop description - Drop 'clocks' description - Add 'reg' property - Add '#thermal-sensor-cells' - Make node name generic in example - Fix YAML style --- .../bindings/thermal/st,stih407-thermal.yaml | 58 ++++++++++++++++++++++ .../devicetree/bindings/thermal/st-thermal.txt | 32 ------------ 2 files changed, 58 insertions(+), 32 deletions(-) diff --git a/Documentation/devicetree/bindings/thermal/st,stih407-thermal.yaml b/Documentation/devicetree/bindings/thermal/st,stih407-thermal.yaml new file mode 100644 index 000000000000..9f6fc5c95c55 --- /dev/null +++ b/Documentation/devicetree/bindings/thermal/st,stih407-thermal.yaml @@ -0,0 +1,58 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/thermal/st,stih407-thermal.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: STMicroelectronics STi digital thermal sensor (DTS) + +maintainers: + - Patrice Chotard + - Lee Jones + +allOf: + - $ref: thermal-sensor.yaml + +properties: + compatible: + const: st,stih407-thermal + + reg: + maxItems: 1 + + clocks: + maxItems: 1 + + clock-names: + items: + - const: thermal + + interrupts: + description: + For thermal sensors for which no interrupt has been defined, a polling + delay of 1000ms will be used to read the temperature from device. + maxItems: 1 + + '#thermal-sensor-cells': + const: 0 + +required: + - compatible + - reg + - clocks + - clock-names + +unevaluatedProperties: false + +examples: + - | + #include + temperature-sensor@91a0000 { + compatible = "st,stih407-thermal"; + reg = <0x91a0000 0x28>; + clock-names = "thermal"; + clocks = <&CLK_SYSIN>; + interrupts = ; + #thermal-sensor-cells = <0>; + }; +... diff --git a/Documentation/devicetree/bindings/thermal/st-thermal.txt b/Documentation/devicetree/bindings/thermal/st-thermal.txt deleted file mode 100644 index a2f939137e35..000000000000 --- a/Documentation/devicetree/bindings/thermal/st-thermal.txt +++ /dev/null @@ -1,32 +0,0 @@ -Binding for Thermal Sensor driver for STMicroelectronics STi series of SoCs. - -Required parameters: -------------------- - -compatible : Should be "st,stih407-thermal" - -clock-names : Should be "thermal". - See: Documentation/devicetree/bindings/resource-names.txt -clocks : Phandle of the clock used by the thermal sensor. - See: Documentation/devicetree/bindings/clock/clock-bindings.txt - -Optional parameters: -------------------- - -reg : For non-sysconf based sensors, this should be the physical base - address and length of the sensor's registers. -interrupts : Standard way to define interrupt number. - NB: For thermal sensor's for which no interrupt has been - defined, a polling delay of 1000ms will be used to read the - temperature from device. - -Example: - - temp0@91a0000 { - compatible = "st,stih407-thermal"; - reg = <0x91a0000 0x28>; - clock-names = "thermal"; - clocks = <&CLK_SYSIN>; - interrupts = ; - st,passive_cooling_temp = <110>; - };