Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3568334pxj; Tue, 11 May 2021 07:21:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwr+lu9FnCsAQ74clTVg9QKIaYUu2gcTar1++8RRUX23PbUBl0Y8e7WmPOlNkplDtvdRNu6 X-Received: by 2002:a17:907:ab2:: with SMTP id bz18mr8158484ejc.150.1620742861092; Tue, 11 May 2021 07:21:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620742861; cv=none; d=google.com; s=arc-20160816; b=r6qbeQjsB0IcY162ft8JsGVIgEDeQTFDTiJoq/KnWItDroKpA2CJDyQQtQV2fXOUBW X0cA34gj/A179YkvNFwM021jet9iKgZ86zIvySAmZwE88d8K5TGjSNFZpfTxBNTg2pNe uH3iwqYwmtF6nuUB3E2NDGMtaWsYvg0/bcU+gHXVAN+vS4GdflHD7SL5CAIERHVQzqQV jeU2lPRfaQiimUohZVXlg02cHRjO7KVaAyyWkGXHBFjTNQ7d2IhKf7DaoNIw49EfQD1Q hijMxN5rrPKYZGHMpAmULG0YALHsTJlKNbT9Mk9FCz0W0xrgB80Hmmvhd+ItS73fTyh9 E09w== 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 :references:in-reply-to:message-id:subject:cc:to:from:date; bh=dqkPlGUqyOqsed74LgAEVe8u/szR1QKTvDwlEUJXK6o=; b=tKikLtxnPjZ5sQuoDCof3qWwtqD/fSZwUVE+H8utq5w+cUmbDNFYqSJu7iqV710rmK l/3n6z7Oux0bzKcTRhhtmBDcutqh3X6khw14P1hgLpuujRa4bGS31Pf71sl80uQr6KuW n/Bj33UPcF6ad6m9ag+r+tUHyzn10WX0aUdw2g2tgbS4MqGHh8D0thfHw62r6ZMfBPQL VaFK0tVXE+tNvB413YeE5qcByCNmAH6fIcPsTKCgi3TIYS1ienF7y6wLbL0rSgx1/a1v /N17KhkN4OH67hcYStGiby8Bz891YsWjadWilm8fGok7jeX/xzqxqS+NkXDyTlVNpSGi 2T5g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id pk10si15851048ejb.359.2021.05.11.07.20.35; Tue, 11 May 2021 07:21:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231721AbhEKOTs (ORCPT + 99 others); Tue, 11 May 2021 10:19:48 -0400 Received: from mail.kernel.org ([198.145.29.99]:56392 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231523AbhEKOTr (ORCPT ); Tue, 11 May 2021 10:19:47 -0400 Received: from jic23-huawei (cpc108967-cmbg20-2-0-cust86.5-4.cable.virginm.net [81.101.6.87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 3647B611BE; Tue, 11 May 2021 14:18:39 +0000 (UTC) Date: Tue, 11 May 2021 15:19:45 +0100 From: Jonathan Cameron To: Krzysztof Kozlowski Cc: Peter Rosin , Lars-Peter Clausen , Rob Herring , linux-iio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] dt-bindings: iio: afe: current-sense-shunt: add io-channel-cells Message-ID: <20210511151945.1c3fd6e0@jic23-huawei> In-Reply-To: <1e8651a3-e730-411b-18a8-800e9bd9304e@canonical.com> References: <20210506150637.35288-1-krzysztof.kozlowski@canonical.com> <0e68ca18-7d8c-12ab-59b1-56404b29be77@axentia.se> <20210508165944.2e3d8d91@jic23-huawei> <1e8651a3-e730-411b-18a8-800e9bd9304e@canonical.com> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 10 May 2021 08:17:17 -0400 Krzysztof Kozlowski wrote: > On 08/05/2021 11:59, Jonathan Cameron wrote: > > On Sat, 8 May 2021 00:44:58 +0200 > > Peter Rosin wrote: > > > >> Hi! > >> > >> On 2021-05-06 17:06, Krzysztof Kozlowski wrote: > >>> The current-sense-shunt is an IIO provider thus can be referenced by IIO > >>> consumers (via "io-channels" property in consumer device node). > >>> Such provider is required to describe number of cells used in phandle > >>> lookup with "io-channel-cells" property. This also fixes dtbs_check > >>> warnings like: > >>> > >>> arch/arm/boot/dts/s5pv210-fascinate4g.dt.yaml: current-sense-shunt: > >>> '#io-channel-cells' does not match any of the regexes: 'pinctrl-[0-9]+' > >>> > >>> Fixes: ce66e52b6c16 ("dt-bindings:iio:afe:current-sense-shunt: txt to yaml conversion.") > >>> Signed-off-by: Krzysztof Kozlowski > >>> --- > >>> .../devicetree/bindings/iio/afe/current-sense-shunt.yaml | 5 +++++ > >>> 1 file changed, 5 insertions(+) > >>> > >>> diff --git a/Documentation/devicetree/bindings/iio/afe/current-sense-shunt.yaml b/Documentation/devicetree/bindings/iio/afe/current-sense-shunt.yaml > >>> index 90439a8dc785..05166d8a3124 100644 > >>> --- a/Documentation/devicetree/bindings/iio/afe/current-sense-shunt.yaml > >>> +++ b/Documentation/devicetree/bindings/iio/afe/current-sense-shunt.yaml > >>> @@ -24,12 +24,16 @@ properties: > >>> description: | > >>> Channel node of a voltage io-channel. > >>> > >>> + "#io-channel-cells": > >>> + const: 0 > >>> + > >>> shunt-resistor-micro-ohms: > >>> description: The shunt resistance. > >>> > >>> required: > >>> - compatible > >>> - io-channels > >>> + - "#io-channel-cells" > >>> - shunt-resistor-micro-ohms > >> > >> I know I'm listed as maintainer and all, but I have not kept up with the yaml > >> conversion. Sorry. So, given that I might very well fundamentally misunderstand > >> something, it does not sound correct that #io-channel-cells is now "required". > >> I regard it as optional, and only needed if some other in-kernel driver is > >> consuming the sensed current. What am I missing? > >> > > > > Agreed. This should be optional and I have deliberately not introduced it > > into all the bindings that could in theory support being used as providers. > > > > So far I've not pushed it out in a blanket fashion into existing bindings > > even as optional. > > > >> Also, whatever is done in this binding should preferably also be done in the > >> two "sister" afe bindings, i.e. current-sense-amplifier and voltage-divider. > > > > This particular case is squashing an error, so whilst I'm happy to have those > > gain the binding addition, I would like to see them in a separate patch as > > less likely they'd get back ported. > > > > If Kryysztof is fine with me just dropping the required I can pick up this patch. > > Having here required number of cells helps any DT-user to seamlessly > integrate with it (e.g. with his in-tree or out-of-tree DTS, with > overlays). However it also can be added with such DTS or overlay, so in > general I don't mind dropping the required piece. Thanks! I dropped the required and applied to the togreg branch of iio.git. Thanks, Jonathan > > Best regards, > Krzysztof