Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp13891594rwb; Sun, 27 Nov 2022 13:26:11 -0800 (PST) X-Google-Smtp-Source: AA0mqf5rq0APPv450wAVT+3Dk+ytgKWUvvnjThj3bvinopzcYwejuWz01cmCfzdYwUS3S6TcSftz X-Received: by 2002:a63:e341:0:b0:46f:13b0:8dab with SMTP id o1-20020a63e341000000b0046f13b08dabmr24799117pgj.497.1669584371636; Sun, 27 Nov 2022 13:26:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669584371; cv=none; d=google.com; s=arc-20160816; b=GTel/nanz4dZMImvj26jJmcK7/hLCKfR8luMDzX+FgujC/Aly5Llqx89snyVLS/n/8 kU8PXohKT1Y4+UbQs1Fc5hlqUyo9F30OMOCEgECnNga111dYdvWt3j/0uJa4WRaKx30r 1DaBM1l6YdmV7MWm+bjgPt5Rzw5p6rYiBhbPRMOb+97GWOcwdr0mtBjhmc/CgUBe8xna QGTASEyh0BTAbIxwNBXNjbvQ7f1cEZw2VV35iCgUixhd/KEenT4aSWqkmQ/hUZKhLq4n QZOH0Q1ROufyUAU8DHh/nDo1QHWEvh3ENwcMwRo3K0zSO+JQAPWdzxAurtfKS/Flw36S KPew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=BFXO/ZdPtFpFLdCwGkdQebz3vpWArKXR7PrKFQW6Dxs=; b=JmVlEvEurRPRAIjYvCSz467o3aBakufHKIASqTIiSi5aiPpct063KLXHqeBKD4Pk1h mFeaeh+dyolQGMpjoPQL2kxLrENXDpf3Ai3MQy9JII6SqD1she0Z8hk3MVuOCmEQ9Dll Su3zmnUwZlNwD0tqsb89Mwr78q0wVd0gMIFqZHOQU6LOI86YYeYi5loaf1WiBRpuDkCD fmD6jvx+l3bqP4Ayzyr4uWQWPfqNWdBj0CvjB9DTfqIv9F2budv56o0ZvrQbd+NAD5bO lSY3ivf7VI4P9RJJJPU5tR7g8x3SQSplnuxypkTt3WFW+tucGNMoe7JVJLExv6tpHtUT 6rHg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=zWQBXzeM; 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=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h1-20020a056a00218100b00572d6af280asi10236390pfi.110.2022.11.27.13.25.58; Sun, 27 Nov 2022 13:26:11 -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=@linaro.org header.s=google header.b=zWQBXzeM; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229607AbiK0VJF (ORCPT + 85 others); Sun, 27 Nov 2022 16:09:05 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55976 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229551AbiK0VJD (ORCPT ); Sun, 27 Nov 2022 16:09:03 -0500 Received: from mail-lj1-x234.google.com (mail-lj1-x234.google.com [IPv6:2a00:1450:4864:20::234]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1DF4E2DD1 for ; Sun, 27 Nov 2022 13:09:02 -0800 (PST) Received: by mail-lj1-x234.google.com with SMTP id n1so6406027ljg.3 for ; Sun, 27 Nov 2022 13:09:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=BFXO/ZdPtFpFLdCwGkdQebz3vpWArKXR7PrKFQW6Dxs=; b=zWQBXzeM0tiFaOXdakwLj7/dhxke40mbwENUulJGokGlmc19QrasgxKzAixXq5CZGX zpk385VoY0qdR22b8iPyDor96yjNqNAQ/WtXgmfHizDL9V6ghu7YRNyJ7mDiHmBYzZO1 YWtHoW/CcNUq30Kx/ItUblgaC+A8r2K1UEkEHdM7495ZGgDuSlKuxORlckAeRi0yxai1 A5lMtoIeuRWJs1zqDjxuWDetySWty7S3RJ/XKBqzwqer3ajK997waiYXhj/44Wvxj/Wl ugEYGDCsDMY/hro7WMDqtO4IVjA7yiDpr3lCLozMvbby7fOlJybEC6dt8GryzL94x6SW 3WKg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=BFXO/ZdPtFpFLdCwGkdQebz3vpWArKXR7PrKFQW6Dxs=; b=mSEhLmYfwS2O9OTHZy1wD8VsADC1VJVEeLK3D43Rie+OLL6ZNH4BMkUAAcR/373w7g J/sHaOnPQcMOBlwETJ9oBA+ipuMZ68i+npw/72EFPnBwRoO4UjU0RRt8mmrdgp9hq4ci bd6Wmw4AlvDU6BrjxmZrlTcgwMFX34+dmIlmYyuJI6HyR5apVNBsrmrKJZAklVydzll7 2FRgYoocjTSRjjVVWPA7P7jg8QQzezKwu34vEN/y3HDSYQP1LTwmAJ5zfh7NDOzyU/Qd fWzUjrK4upTQVOoilJEWF4cr7dXPghxC8OphKAsoNFDRVVcuuQg6qNz3tWqHLpOPM1nV xafQ== X-Gm-Message-State: ANoB5pnn2/FHDWiJzOAbKPXLmc2am+Ds4jCXdRvbR84TH8UyhZmCfn4m fXWbdO59/scL7Zp/Id4PfzgYpA== X-Received: by 2002:a2e:9007:0:b0:279:84ce:5f71 with SMTP id h7-20020a2e9007000000b0027984ce5f71mr6062064ljg.207.1669583340496; Sun, 27 Nov 2022 13:09:00 -0800 (PST) Received: from [192.168.0.20] (088156142067.dynamic-2-waw-k-3-2-0.vectranet.pl. [88.156.142.67]) by smtp.gmail.com with ESMTPSA id o21-20020a056512231500b0049311968ca4sm1404143lfu.261.2022.11.27.13.08.59 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 27 Nov 2022 13:09:00 -0800 (PST) Message-ID: Date: Sun, 27 Nov 2022 22:08:59 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.5.0 Subject: Re: [PATCH] dt-bindings: iio: adc: ti,adc081c: Document the binding Content-Language: en-US To: Samuel Holland , Jonathan Cameron Cc: Lars-Peter Clausen , Rob Herring , Krzysztof Kozlowski , devicetree@vger.kernel.org, linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org References: <20221125220903.8632-1-samuel@sholland.org> <20221127174219.34d0406c@jic23-huawei> From: Krzysztof Kozlowski In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE, 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 27/11/2022 19:01, Samuel Holland wrote: > On 11/27/22 11:42, Jonathan Cameron wrote: >> 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. > > I kept #io-channel-cells optional because there are already a handful of > boards using ti,adc081c without it. > > On the board I am adding (Clockwork DevTerm), the ADC is used a > temperature sensor for a thermal printer. So whether or not the ADC is > used as an OF provider depends on how the printer driver gets implemented. Thanks, it's fine. Best regards, Krzysztof