Received: by 2002:a05:7412:3290:b0:fa:6e18:a558 with SMTP id ev16csp889582rdb; Fri, 26 Jan 2024 14:15:02 -0800 (PST) X-Google-Smtp-Source: AGHT+IHH8PwnwpzuLOXaqrvKCUZA6kgyef2oSjdUkqjsf4EfhjJWZ2oweTfGknMM6CP1Fzwoe+9J X-Received: by 2002:a05:600c:1f84:b0:40e:5ed3:ccf4 with SMTP id je4-20020a05600c1f8400b0040e5ed3ccf4mr318558wmb.16.1706307301847; Fri, 26 Jan 2024 14:15:01 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706307301; cv=pass; d=google.com; s=arc-20160816; b=hHBAtMoP+a1y1oP7OkAE0PN+zE6CQp+K6SQu5q3OXj8IaWQRO8EVlpe2hMoaAfZ49u v8WAntK0ccoi28gjoegPkhz2tLHldBymQnwFw+axK4fLV/uqe3vpXUZm4d29QNrlwDOS oRuiVfcgPxq2w/h3nR6iz1FJhfKjqv7iNOj/ZQD4TPf1B/DHsKFhEjZKXZZU3jbc9mGd wOYOe+LqthA3bYdaWTG/skEJqnt9+sa2KC3qEy9cS6fGC/yzGwyuRGSDKtJZBTZyC68O sih1Mjkt8YQMVNgat95E6/HZbylEGaQuP7x0rwMza0RyTJMOTp4dhdKzjBb5/ZEm52tN 6BMw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=oCyLe7ugFC0fWZIM1LuV1QetMTG3Dm7FoHJyrDXQLqU=; fh=sRMrVZh/OOjUrMyiuUeMLVOLRN6WGL64LflR+0lpIfA=; b=dpqw8pej1ay8Nx4Xacef51D+ZKkvbKzrOMv4oE9jkbQsVaBeZq5hVOahYOqhoXmOwC IwlUZ1wQuFzm3AcK9QLM+AiW9Xm46LwNL098/54umAvMKdMLvec2P7u9k8hjhc1Xfy1u Mi/tMX6Bu9c60cJSnRxrShvKB0nKm4O88wwIkXSluhNWaGDMth/sAsDharZpzLObxU4b PdsRuPpKRhUMqjd8VFNMdEV+E8WmcU5IxnXHin1lrSfoq4FpQCf31AeIfVDK+HJT49PR Tq/qACGs7KWHTiaWwZpDmgqtm/YvbRFB8L87zIALnUeaqhXa0ww3uv+rhI58BWZwrwiN doWQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=n2v+5Osv; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-40733-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-40733-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id k9-20020a1709061c0900b00a3069f8b372si958103ejg.624.2024.01.26.14.15.01 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Jan 2024 14:15:01 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-40733-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=n2v+5Osv; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-40733-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-40733-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 6F9FB1F2106B for ; Fri, 26 Jan 2024 22:15:01 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3CD6A2563D; Fri, 26 Jan 2024 22:14:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="n2v+5Osv" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 462BD25573; Fri, 26 Jan 2024 22:14:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706307248; cv=none; b=V3O94hGRATRh+OBxv5w4zHQsPvWdth7PZ1pn7FCMMr5vIU6rVwP9CrC8GznupHihglhBpdhQLpDwYu++KEM3lhPqHs7qinx1911p3NlmuKClPubCE6WSqN8h8Y43vlhx72tbJ8Z9TtNqP+XRllD5VJj6OMBGift9cBhZQEvAi3A= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706307248; c=relaxed/simple; bh=0b8lK1c7dQnFioNfIBpSdxAWV5NjN5Icq9TAOnp0CbI=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=MIXlDyiDxDX+18V4VCYxNwCWKQwNeYzHXAU9poLkTOdAdbUxZT7N1MJ/nUdDYXusDi68OEovfgnaermTlcSIHmgkWKj34GoiFPJQOzZ3gG/egbIN5kaLf76gLK1bczWKsawk8mTvIfDu9NQN/9gR+gTrt7x9O0dGBYsq6UHdcg4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=n2v+5Osv; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id E1224C433F1; Fri, 26 Jan 2024 22:14:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1706307248; bh=0b8lK1c7dQnFioNfIBpSdxAWV5NjN5Icq9TAOnp0CbI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=n2v+5OsvdqgT3i4Kqm59IquUkMr2RwumpWqwYaQeU3u8MDlGdElaRznNLlJ2bM5BC DWAcMB7xbDv+X+8wlwPbVBiOOnonowk+oOOnuFwD9EYKkKKP9lmfzUIRrCNJevipRp Gm5CKc8LUeJcKlI55319rgTbhgXqGnwve0ZvDxHtZ8cGdFqOCZLP4VxqKWwi4CpynU SS4IZR7Vjlg9xw/A6cj0wl5iyCSNt4sFCXIwcuawXvm3YidLdeWyTvPciy3RNQOr9/ bTBo6y1JpCEKAxGWxy2/hk8K+bZBqSJ4oennqOjIJLBCXwT0RvtBwrQjqrtES9Ze+W SzvoicC3tf6Pw== Date: Fri, 26 Jan 2024 22:14:03 +0000 From: Conor Dooley To: Naresh Solanki Cc: Peter Rosin , Jonathan Cameron , Lars-Peter Clausen , Rob Herring , Krzysztof Kozlowski , Conor Dooley , mazziesaccount@gmail.com, linux-iio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] dt-bindings: iio: afe: voltage-divider: Add io-channel-cells Message-ID: <20240126-blaspheme-calculate-a4134dc1ed68@spud> References: <20240126115509.1459425-1-naresh.solanki@9elements.com> <20240126-cinnamon-flatware-e042b5773f17@spud> <20240126-scale-serrated-33686467d91b@spud> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="51HTn85XAt3vYgRW" Content-Disposition: inline In-Reply-To: --51HTn85XAt3vYgRW Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Jan 26, 2024 at 11:10:36PM +0530, Naresh Solanki wrote: > Hi Conor, >=20 >=20 > On Fri, 26 Jan 2024 at 22:22, Conor Dooley wrote: > > > > On Fri, Jan 26, 2024 at 09:55:20PM +0530, Naresh Solanki wrote: > > > On Fri, 26 Jan 2024 at 21:47, Conor Dooley wrote: > > > > On Fri, Jan 26, 2024 at 05:25:08PM +0530, Naresh Solanki wrote: > > > > > Signed-off-by: Naresh Solanki > > > > > --- > > > > > Documentation/devicetree/bindings/iio/afe/voltage-divider.yaml |= 3 +++ > > > > > 1 file changed, 3 insertions(+) > > > > > > > > > > diff --git a/Documentation/devicetree/bindings/iio/afe/voltage-di= vider.yaml b/Documentation/devicetree/bindings/iio/afe/voltage-divider.yaml > > > > > index dddf97b50549..b4b5489ad98e 100644 > > > > > --- a/Documentation/devicetree/bindings/iio/afe/voltage-divider.y= aml > > > > > +++ b/Documentation/devicetree/bindings/iio/afe/voltage-divider.y= aml > > > > > @@ -39,6 +39,9 @@ properties: > > > > > description: | > > > > > Channel node of a voltage io-channel. > > > > > > > > > > + '#io-channel-cells': > > > > > + const: 1 > > > > > > > > The example in this binding looks like the voltage-divider is inten= ded > > > > to be an "IIO consumer" but "#io-channels-cells" is an "IIO provide= r" > > > > property. > > > > > > > > Are you sure this is correct? > > > I'm not aware that #io-channels-cells is only for IIO provider. > > > > #foo-cells properties are always for resource providers > > > > > But I do get some kernel message as mention in commit messages > > > if this is specified in DT. > > > > Can you please share the DT in question? Or at least, the section that > > describes the IIO provider and consumer? > Below is link to complete DT: > https://github.com/torvalds/linux/commit/522bf7f2d6b085f69d4538535bfc1eb9= 65632f54 If you're gonna link something that is in a vendor tree, you should link the actual vendor tree and not something that "does not belong to any branch on this repository, and may belong to a fork outside of the repository"! I did look at what you have there and I think your dts is wrong. The iio-hwmon binding says: | description: > | Bindings for hardware monitoring devices connected to ADC controllers | supporting the Industrial I/O bindings. |=20 | io-channels: | minItems: 1 | maxItems: 51 # Should be enough | description: > | List of phandles to ADC channels to read the monitoring values And then you have: | iio-hwmon { | compatible =3D "iio-hwmon"; | // Voltage sensors top to down | io-channels =3D <&p12v_vd 0>, <&p5v_aux_vd 0>, <&p5v_bmc_aux_vd 0>, <&p3= v3_aux_vd 0>, | <&p3v3_bmc_aux_vd 0>, <&p1v8_bmc_aux_vd 0>, <&adc1 4>, <&adc0 2>, <&adc= 1 0>, | <&p2V5_aux_vd 0>, <&p3v3_rtc_vd 0>; | }; | | p12v_vd: voltage_divider1 { | compatible =3D "voltage-divider"; | io-channels =3D <&adc1 3>; | #io-channel-cells =3D <1>; | | /* Scale the system voltage by 1127/127 to fit the ADC range. | * Use small nominator to prevent integer overflow. | */ | output-ohms =3D <15>; | full-ohms =3D <133>; | }; A voltage divider is _not_ an ADC channel, so I don't know why you are treating it as one in the iio-hwmon entry. Can you explain this please? Thanks, Conor. --51HTn85XAt3vYgRW Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQRh246EGq/8RLhDjO14tDGHoIJi0gUCZbQuqwAKCRB4tDGHoIJi 0qjuAP9odQPk4Rld47KxMAhyjjvAY+H2UQ4tgEBdtSu82pnmHgD/YOowmNyiakzs BOEey09K7vzMOq+xY/EArtk2sMjdVQ8= =279c -----END PGP SIGNATURE----- --51HTn85XAt3vYgRW--