Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp1052484pxk; Fri, 25 Sep 2020 05:08:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzEDjMsru/IMwZ5sAIEtrU3dX/nJkIso2a0CPsXgAXX70RB1MxDi71pYN4mJAYH/J4XLop9 X-Received: by 2002:a05:6402:b0f:: with SMTP id bm15mr912214edb.388.1601035711535; Fri, 25 Sep 2020 05:08:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601035711; cv=none; d=google.com; s=arc-20160816; b=o4n83COzlrqkU2RBYFeGnMum+8LTzJmCTsG5v6vAsMYfsq6qMmmS1IovLdCrAibNKx YYaMcqTB65Q5HoJ0lRND8T6ktSRcGx+A2cDPN8DNRC+10La9bPgAfWRZcf1P19+las9J 7GqZZkK1+7wj0aFnrHmXQCJfSV2L+c765Q1aL8zzv/lW13wqaHguAVFBNJaIrEV49MUN au5UGPV7FkRLIi3Agnf54ABZr9Tjv7Di9ZUk4V71yL04VJ17lZ0u3j4AyxdPl2GEpZOa okYg89/q7rUei6DqH+Mdj+WZD4XTg5FbKaPW5a/IwZcK05tF0sWpT8cMl2LDh3FQtRgI rfow== 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 :dkim-signature; bh=dt0qbZdmcKUMRNcYbJeDcJAlxCwKXc0WEimFXxbG7dk=; b=fhDE7ePPNDdoBxha3V9I/Fqk9b+N0Wga8AGNaOdOjMt1pj8W0D3tBCSyMkprtXfKir rGRHeXcMJMYTgaXRvsn9GywIXda59HZ7PoWboE7lWPlIcLtfuFan2z3FpwNWYwAshlFO qrR9sq6YNK1GJn++UF5VvcgHPDnRF8z2nn0UIqr52kUpXUDTYe0zY/VJl8rQRuolJXBy LpTn+onlCoUZ0gjSvBt8Hqrelc1IRds3RHwSedTkZ+Fr3YP3d2S8EWVZiNlZysDXtfu7 gL6Ij9ODZPDEl3RTLWxM2obZH6tK6Mg8kNlYeR4l3XJAprMM60FF4wFHNn9ES/qi7ugD 8mJA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=x0mQAP4H; 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 g15si1924062edp.40.2020.09.25.05.08.08; Fri, 25 Sep 2020 05:08:31 -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; dkim=pass header.i=@kernel.org header.s=default header.b=x0mQAP4H; 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 S1728414AbgIYMFB (ORCPT + 99 others); Fri, 25 Sep 2020 08:05:01 -0400 Received: from mail.kernel.org ([198.145.29.99]:58238 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726368AbgIYMFB (ORCPT ); Fri, 25 Sep 2020 08:05:01 -0400 Received: from archlinux (cpc149474-cmbg20-2-0-cust94.5-4.cable.virginm.net [82.4.196.95]) (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 BC4E02083B; Fri, 25 Sep 2020 12:04:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1601035500; bh=5JS6f9gRAAFsBtkj5okSCjVwQ+33QurOv5HcuSk3oa0=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=x0mQAP4H/JYPasau3b9BrJLY3B2fRKMDM2+hIRJUGpkRXcRWVpANO7/Op0Z3u9UNm /+TYPgNDx1oQks29s3U5i+kxH5PnkLCxY9dNS0u51i05plRxo0Ye2bgG4G7G2eC3ZV 70GdQxtXYthixt9j9vfgC65llODcHdMPRxFolJmo= Date: Fri, 25 Sep 2020 13:04:56 +0100 From: Jonathan Cameron To: Cristian Pop Cc: , , Rob Herring , devicetree@vger.kernel.org Subject: Re: [PATCH v6 4/4] dt-bindings:iio:adc:adi,ad7768-1: Add documentation for channel label Message-ID: <20200925130456.1203ba5d@archlinux> In-Reply-To: <20200921133020.62978-4-cristian.pop@analog.com> References: <20200921133020.62978-1-cristian.pop@analog.com> <20200921133020.62978-4-cristian.pop@analog.com> X-Mailer: Claws Mail 3.17.6 (GTK+ 2.24.32; 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, 21 Sep 2020 16:30:20 +0300 Cristian Pop wrote: Hi Cristian, > Optional attribute for better identification of the channels. Dt-bindings need to be sent to the dt-binding maintainer and list. +CC. I'll definitely be looking for a review from Rob on this one as we are defining a new generic binding. @Rob, the only new bit in here is the label for an individual channel. The rest has been defined for a while to allow us to control channel specific aspects of an ADC. We should also look to add it to the top level docs. In this case, probably Documentation/device-tree/bindings/iio/adc/adc.txt Currently only ADCs have a channel description to add this to. We can look at making this more generic if it turns out to make sense for other types of IIO device. Thanks, Jonathan > > Signed-off-by: Cristian Pop > --- > .../bindings/iio/adc/adi,ad7768-1.yaml | 31 +++++++++++++++++++ > 1 file changed, 31 insertions(+) > > diff --git a/Documentation/devicetree/bindings/iio/adc/adi,ad7768-1.yaml b/Documentation/devicetree/bindings/iio/adc/adi,ad7768-1.yaml > index d3733ad8785a..0c75ce73ffe9 100644 > --- a/Documentation/devicetree/bindings/iio/adc/adi,ad7768-1.yaml > +++ b/Documentation/devicetree/bindings/iio/adc/adi,ad7768-1.yaml > @@ -29,6 +29,12 @@ properties: > interrupts: > maxItems: 1 > > + '#address-cells': > + const: 1 > + > + '#size-cells': > + const: 0 > + > vref-supply: > description: > ADC reference voltage supply > @@ -61,6 +67,23 @@ required: > - spi-cpha > - adi,sync-in-gpios > > +patternProperties: > + "^channel@([0-9]|1[0-5])$": > + type: object > + description: | > + Represents the external channels which are connected to the device. > + > + properties: > + reg: > + description: | > + The channel number. > + > + label: > + description: | > + Unique name to identify which channel this is. > + required: > + - rega rega? Also, one I learnt the other day. Need to have additionalProperties: false for child nodes as well as the base node. > + > additionalProperties: false > > examples: > @@ -84,6 +107,14 @@ examples: > reset-gpios = <&gpio 27 GPIO_ACTIVE_LOW>; > clocks = <&ad7768_mclk>; > clock-names = "mclk"; > + > + #address-cells = <1>; > + #size-cells = <0>; > + > + channel@0 { > + reg = <0>; > + label = "channel_0"; > + }; > }; > }; > ...