Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp13694439rwb; Sun, 27 Nov 2022 09:37:19 -0800 (PST) X-Google-Smtp-Source: AA0mqf6+GTon2Dj7YdT6k2qQwZQEDBIWmHXC0l4Wpi5ldAMoltlUWazjayS+ZT38qTXL6kDgCDDA X-Received: by 2002:a63:5802:0:b0:46f:59af:c1f4 with SMTP id m2-20020a635802000000b0046f59afc1f4mr25152724pgb.344.1669570639222; Sun, 27 Nov 2022 09:37:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669570639; cv=none; d=google.com; s=arc-20160816; b=unYFPhsDzFBXacdiVZ6EwwEFo9rK1krXv+lfxMKABClpWwwErc13lYkWBJK/aSkDno OQS3draIAdBF6mj8fp4lyuahALO17hR9bT6yLf86z10xP//SYQpHZeU4/zxKIfG4fNhd JxRy6XrHEHEx6kmyJKTpSget08QemXD6MopajijwQdsPPxYv9DnTAK4zDI9CjymfQ/X1 IEYVtyYhDoXlu0UWRGQYSbmDf5WT/llNAQDzvubsIyLLpHzJJnArf4jklCyuU8nxAwNl wBC3nEGyIso0z1KVO+zramObpQuiaLU18C0QzkzCBHITjb2kINlHWBT99WtwPjmSH5qD aARQ== 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=NXLdZc929rMyBNm1ZYL9JPjy+kZKQ7oGLpxJXHkwmjo=; b=Wxgc5gH6EUckmYxPGOKV9MpxDd8P10Bj/593Isb1a8k4o5r9wO6WHCeamtO3HvJ57W yxJVJ35bRZI2PdVhkcNajN+LZjOjwtssgKcgxPd9PD2X6qypk1uqmoP5CREg6U8lz+DT oye4G+F8QaIKYJufWmIDzqqobijBiPa2g3yePLHwjVSk5pESAAsiBwdRVANJGlQpRlSH CaUvdkgsfAgaiQtE2kn6gsz78tVB7PIj/By6ms+OjIROdzq4P1sCvyBpG6tmi0zsM0x9 MBd5pwLgH7+eGBrUkL/RjPUQv0L1pxpRcfKRLb8DvjzQTnQ3OuI5B/FhGsGxbvb6UXeI UMKw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=nKAVZNkv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k5-20020a632405000000b0047068448a09si11084774pgk.202.2022.11.27.09.37.08; Sun, 27 Nov 2022 09:37:19 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=nKAVZNkv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S229586AbiK0R3o (ORCPT + 83 others); Sun, 27 Nov 2022 12:29:44 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51470 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229475AbiK0R3n (ORCPT ); Sun, 27 Nov 2022 12:29:43 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 28A1A64E4; Sun, 27 Nov 2022 09:29:43 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id BB1E660DEC; Sun, 27 Nov 2022 17:29:42 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id AC0ADC433D6; Sun, 27 Nov 2022 17:29:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1669570182; bh=1lnyMvrmbejuHK3k8rTbRFgf4LT4gk93GyeS33pk2Os=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=nKAVZNkv1s2lQmBocf9e3J1zNamW+5vHQDr9kmxigTWdvjuMqa+9Niv1e69RHv6A5 bxf6HZfiA1fqvUFugo7hOmGtlHpqKbKLHJds5Jve8RQ3TUMzY7NF77220y6xkeNzwi x+1jejPh5o2YkjXrZ2LYmcjD8fp0aOWRenUjovdCwujqLN3VDSU7Kx4gDxrgd5BWTe vZ36wXKmALTJF0xY0P3f+q4iMrweqq62Rfg+o4XIsRqOW71XArAOooIW2CCIxD+7zg MT9C/T9m7Sr7EPPeX6ItQWPvleMTQ2g8dpDBsrZqRC11syThnD9ErS9wu7BqcxmFoz 1kias5efhGb4Q== Date: Sun, 27 Nov 2022 17:42:19 +0000 From: Jonathan Cameron To: Krzysztof Kozlowski Cc: Samuel Holland , Lars-Peter Clausen , Rob Herring , Krzysztof Kozlowski , devicetree@vger.kernel.org, linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] dt-bindings: iio: adc: ti,adc081c: Document the binding Message-ID: <20221127174219.34d0406c@jic23-huawei> In-Reply-To: References: <20221125220903.8632-1-samuel@sholland.org> X-Mailer: Claws Mail 4.1.1 (GTK 3.24.34; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, 27 Nov 2022 13:51:19 +0100 Krzysztof Kozlowski wrote: > On 25/11/2022 23:09, Samuel Holland wrote: > > Linux has a driver for these ADCs at drivers/iio/adc/ti-adc081c.c, but > > the compatible strings were undocumented. Add a binding for them. The > > hardware has an alert interrupt output, but existing ti,adc081c users > > do not provide the 'interrupts' property, so leave it as optional. > > > > Signed-off-by: Samuel Holland > > --- > > > > .../bindings/iio/adc/ti,adc081c.yaml | 55 +++++++++++++++++++ > > 1 file changed, 55 insertions(+) > > create mode 100644 Documentation/devicetree/bindings/iio/adc/ti,adc081c.yaml > > > > diff --git a/Documentation/devicetree/bindings/iio/adc/ti,adc081c.yaml b/Documentation/devicetree/bindings/iio/adc/ti,adc081c.yaml > > new file mode 100644 > > index 000000000000..caaad777580c > > --- /dev/null > > +++ b/Documentation/devicetree/bindings/iio/adc/ti,adc081c.yaml > > @@ -0,0 +1,55 @@ > > +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) > > +%YAML 1.2 > > +--- > > +$id: http://devicetree.org/schemas/iio/adc/ti,adc081c.yaml# > > +$schema: http://devicetree.org/meta-schemas/core.yaml# > > + > > +title: TI Single-channel I2C ADCs > > + > > +maintainers: > > + - Jonathan Cameron > > + - Lars-Peter Clausen > > + > > +description: | > > + Single-channel ADC supporting 8, 10, or 12-bit samples and high/low alerts. > > + > > +properties: > > + compatible: > > + enum: > > + - ti,adc081c > > + - ti,adc101c > > + - ti,adc121c > > + > > + reg: > > + maxItems: 1 > > + > > + interrupts: > > + maxItems: 1 > > + > > + vref-supply: > > + description: > > + Regulator for the combined power supply and voltage reference > > + > > + "#io-channel-cells": > > + const: 1 > > + > > +required: > > + - compatible > > + - reg > > Why not requiring io-channel-cells? If it is an IIO ADC provider, you > need the cells, right? Only if anyone is using it as a provider. If it's purely being used via IIO then there are no consumers registered. So historically I've left it up to those defining the binding to decide if they think #io-channel-cells should be required or optional. It gets a bit non obvious with some of the more complex special ADCs on whether they will ever be consumed. This one is generic, so quite likely it will be. Jonathan > > Best regards, > Krzysztof >