From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796153994; b=Xg9ohtyg4L/Jr/62jOkOgDZMNWDbSuTjku/UOiKUaXUNybnHc45fg4bpP4sTDtvIjQ7D dybD1qS/IkSK4TWk/sQ7aGflCzk/g67gNc0TVsp1XZASZpLP4JjhhYhnGJXk9r3OkyDP3 lfecXMCG8KHtDAZWqAkeXkKMUri0jovAOGe7s/ns0MnpCoes/iJRNvPeS+8S9Ot05dxae COaK9DR9P06LovIk5fIBczFGcpmqjRLiju420vI0bq+nl4XyXSvvVqdJS/2Jwb+7bORZ1 WeKakUrt2XCBKQr3yTHh9BMSGRpNPjKpCsQJtwyScuyxoLB274XTEM9fm5Jyt28CEZQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796153994; h=Received:DKIM-Signature:Date:From:To:Cc:Subject:Message-ID: References:MIME-Version:Content-Type:Content-Disposition:In-Reply-To; bh=ZYKvVjqnLJVSLghoEvF1A/ND5w4j3QwrzaMHuCkCU84=; b=ETSOCMjr1vuUcPrZH7WW6U76LZlFkLQAGAdByUSljuAR3KBLzJnSPT9uVh8Iqm1TYXEU /fSdlFABuCAm6PHoCvVAWdQ/Jzu+m3mcQee7nTTO7TY2IGOmp5JRkgo2kDTaOE0ajeYxi I2HYCQT/7IhqQFsEv5ICeFa+aQsjMDonfP2xIlt4UV5MwQGpNNVbUZICETJFREZaaWOoy yIjJIrIJ2Gjo0lZKZE8C/PJ5xbsAmurgaSLKGcEh0kxDNASCZtQw5R8J80ZXWcyQu6Na9 o7havdSVL4L70n02lmc/TiaWbCX3xXljOScUi0IBwDjnAlcZNEtQ8eQGhmyCI4a1aYw== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=MNIxW2rs; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 40A76606A68E; Tue, 1 Dec 2026 19:39:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=MNIxW2rs Received: by smtp.kernel.org (Postfix) with ESMTPSA id A1ACB1F000C1; Tue, 1 Dec 2026 19:39:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796153993; bh=ZYKvVjqnLJVSLghoEvF1A/ND5w4j3QwrzaMHuCkCU84=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=MNIxW2rsWynhxwjV8oSDUVs/FXaqxOpBZn6d9Pyr/TzozjqYv9Imi5B604A8Wue3V 8NVo4RYeVE13jTKsB+c8RSEHDPYgCB/VGuktysInzrKuKzOg0aeMJVDfpJNVHK0HsO OkONdLzc4oHq4+VoXYo2mN3ZBjDwivWJZKfCUV7khWkkkDbkmbj2D0XSIbF2neAOXt 9RXUIW8j2QfSY0Nf3YiibaCtT7u3VDNEmNdAk31mihBVTmclyS9AC410t3ioePoeGz QNXX+LnWSH7CgcvohmDPWv0bAfk2R+8R6Vr4twidt0Fe7aYye7vDy0ZR2Cms7aqdR5 x7rnXdimTFo4A== Date: Tue, 1 Dec 2026 13:39:51 -0600 From: Rob Herring To: Bruno Thomsen Cc: linux-hwmon@vger.kernel.org, devicetree@vger.kernel.org, Guenter Roeck , Krzysztof Kozlowski , Conor Dooley Subject: Re: [PATCH v2 1/2] dt-bindings: hwmon: ti,tmp401: Add channel nodes with label property Message-ID: <20261201193951.GA3001445-robh@kernel.org> References: <20261118174334.18759-1-bruno.thomsen@gmail.com> X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20261118174334.18759-1-bruno.thomsen@gmail.com> On Wed, Nov 18, 2026 at 06:43:33PM +0100, Bruno Thomsen wrote: > TMP401, TMP411, TMP431 and TMP435 have one local and one remote > temperature channel; TMP432 has two remote channels. The local channel > measures the board where the chip sits and a remote channel measures > whatever diode is wired to it, so only the board design says what each > channel is. > > kam,am335x-emperor-mini fits a TMP431 in place of the NXP SA56004 on > kam,am335x-emperor, at the same I2C address. On both boards the local > channel measures the baseboard and the remote channel the FPGA's > thermal diode. national,lm90.yaml already lets the SA56004 name its > channels through channel nodes with a label property; add the same > nodes to ti,tmp401 so the TMP431 channels get the same names. > > Signed-off-by: Bruno Thomsen > --- > v1: https://lore.kernel.org/linux-hwmon/20260730133058.14731-1-bruno.thomsen@gmail.com/ > > Changes in v2: > - Rewrite commit message around the board that needs per-channel > labels, rather than referring to other bindings. (Krzysztof) > - Quote '#address-cells' and '#size-cells' consistently with the > patternProperties key. (Krzysztof) > - Drop the new example and extend the existing ti,tmp431 example with > the channel nodes instead. (Krzysztof) > - Reword subject: the patch adds channel nodes, not just a property. > - Rebase on the new "#thermal-sensor-cells" property, which moved > the patternProperties context. > > The "kam,am335x-emperor" device tree series that consumes this is at > https://lore.kernel.org/linux-devicetree/20260318085420.7680-1-bruno.thomsen@gmail.com/ > Its v2 adds "kam,am335x-emperor-mini", which uses these channel nodes. > --- > .../devicetree/bindings/hwmon/ti,tmp401.yaml | 48 +++++++++++++++++++ > 1 file changed, 48 insertions(+) > > diff --git a/Documentation/devicetree/bindings/hwmon/ti,tmp401.yaml b/Documentation/devicetree/bindings/hwmon/ti,tmp401.yaml > index f283b567d5b6..b162bf8c043a 100644 > --- a/Documentation/devicetree/bindings/hwmon/ti,tmp401.yaml > +++ b/Documentation/devicetree/bindings/hwmon/ti,tmp401.yaml > @@ -30,6 +30,12 @@ properties: > reg: > maxItems: 1 > > + "#address-cells": > + const: 1 > + > + "#size-cells": > + const: 0 > + > ti,extended-range-enable: > description: > When set, this sensor measures over extended temperature range. > @@ -53,6 +59,26 @@ properties: > "#thermal-sensor-cells": > const: 1 > > +patternProperties: > + "^channel@([0-2])$": Don't need (). > + type: object > + description: Represents channels of the device and their specific configuration. > + > + properties: > + reg: > + description: The channel number. 0 is local channel, 1-2 are remote channels. > + items: > + minimum: 0 > + maximum: 2 This allows "reg = <0 1>;". Drop 'items' to prevent that. > + > + label: > + description: A descriptive name for this channel, like "ambient" or "psu". > + > + required: > + - reg > + > + additionalProperties: false > + > allOf: > - if: > properties: > @@ -75,6 +101,16 @@ allOf: > properties: > ti,beta-compensation: false > > + - if: > + not: > + properties: > + compatible: > + contains: > + const: ti,tmp432 > + then: > + properties: > + channel@2: false > + > required: > - compatible > - reg > @@ -103,5 +139,17 @@ examples: > ti,extended-range-enable; > ti,n-factor = <0x3b>; > ti,beta-compensation = <0x7>; > + #address-cells = <1>; > + #size-cells = <0>; > + > + channel@0 { > + reg = <0x0>; > + label = "mainboard"; > + }; > + > + channel@1 { > + reg = <0x1>; > + label = "fpga"; > + }; > }; > }; > > base-commit: 666539eecdf4db623f5e3c3e55cf9f2dfad24aa4 > -- > 2.53.0 >