Message ID | 20231114200533.137995-2-alisa.roman@analog.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:6358:a59:b0:164:83eb:24d7 with SMTP id 25csp2172864rwb; Tue, 14 Nov 2023 12:07:31 -0800 (PST) X-Google-Smtp-Source: AGHT+IEfKSNCdHGBQACx8cJlX3Mvp/dN2TUNsgBrUE7kjXa6SLrZzEsnvO7V6iwqgMTBV7TbFAXF X-Received: by 2002:aa7:8518:0:b0:693:3e55:59b4 with SMTP id v24-20020aa78518000000b006933e5559b4mr8282620pfn.8.1699992451085; Tue, 14 Nov 2023 12:07:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1699992451; cv=none; d=google.com; s=arc-20160816; b=mvIO6FA6bbJfdDx/Sndon4x9XddR8rcSDTBMkgTq85XZLAFpIhvHXcplJ8FeWUK4t1 8ZhldwDaJoeVj6pyNIaIn5NRDaIXEvdn4XaWOdCQVQWGfIm+c/AVhg9ZByQpyP03/C3B prUBxhLguZSrMec7W0SRA9RhP+dZ1f/D/uoEJsuhfoTHeCs6vyrgy0IO/r8Io7vcOqBk 4Q3NMw+NuyWWc1XCqLcEuE6X0yeT11j/Am3jbQdJiu3ATCzMBwZ+VY58uGDe2A7PvnpU o03wB2aa/A5qPR8yoCI8zPYE8YvKqHDMJeJbZztUzle7KjQNOnvCAftZpd00frKQCQac ocpg== 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:date:subject:cc:to:from :dkim-signature; bh=z7Mr2ZgTh2/vo8hRXNB8ZpBVrsMPOFq+JrIplGgPEZQ=; fh=DEVKSsBRaHBPxBrd7OgtyYjSZisBm2fCMzwbsTR6LK4=; b=ea6dnTIBmE7TCUp21Zuze1AbZXmLrww5HKzJA9f9nHeRZ8YBRU7+pJNM0WrBhz1laN c8UCavqEvfXtl1u+njEQy3829uCm5hGJ2K3mKEN5/0EZgQ6KODVOOIwom/lJ4r+ztLtv +gjlDSS5r/I2s+RvEgeDd7YkCFeTgDeET0k6ljq+MPeBa/PYYR3cyo6b2Si7xMqxwBWE JvVUULsO9hPfCDqEPgb93yZV7ZfzaTs7a7GujDkNuP53Bo6D/vbcQSOhWtMNms3ZPajI t0k6wUZMI1oRwRb/VYt99w32R5WyGovgcyqryDWmX9e5DP0TBQkmxhFjOn0EcJ5ghEY+ 6wiw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=mLHje3qz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id ck6-20020a056a02090600b005ae05010bc4si9069968pgb.235.2023.11.14.12.07.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Nov 2023 12:07:31 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=mLHje3qz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id DAE0880BA6AD; Tue, 14 Nov 2023 12:07:16 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233399AbjKNUGU (ORCPT <rfc822;lhua1029@gmail.com> + 29 others); Tue, 14 Nov 2023 15:06:20 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33960 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233248AbjKNUGS (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 14 Nov 2023 15:06:18 -0500 Received: from mail-ej1-x631.google.com (mail-ej1-x631.google.com [IPv6:2a00:1450:4864:20::631]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E694B11F; Tue, 14 Nov 2023 12:06:12 -0800 (PST) Received: by mail-ej1-x631.google.com with SMTP id a640c23a62f3a-9d10f94f70bso884807966b.3; Tue, 14 Nov 2023 12:06:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1699992371; x=1700597171; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=z7Mr2ZgTh2/vo8hRXNB8ZpBVrsMPOFq+JrIplGgPEZQ=; b=mLHje3qzOJtzf6X8BbyUeRFI5u10JuhtLRpbMlwkXcb4m9lP7O9UOzkcFtD6Rek5gA p89abIqwmHSQKr8oW4FRnj/eJ4iWqRXEp5MqQYsAPL9L5PA3fGdsZwvzIWYoXbjSvBxb MOBdG75EEx3XfWsZwB7Mv3WdXMopsJMd3MmwMUH6KIQSOEBOPirkpoZHN7HHCxElbuHJ zgCAKR7mEo4eCuu2aH+q7eVhq3PHf1qLv0mfDMzKzSrE8HY8WOxnjsQq/lCu7ctlSGkB ahI9EvHQIct05n5MHcDXVX8XbdsQUPYHYI5o8+zq6asENc1nxVUjF1lidB42AsTn2uUK REFg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699992371; x=1700597171; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=z7Mr2ZgTh2/vo8hRXNB8ZpBVrsMPOFq+JrIplGgPEZQ=; b=giAY/y2cibrcqBmenOQI/B7FqUWYw5n64/C91badmD3kPVhctKfewFPJrHCzFm3aKx Yac2sASLDYYZLP13TnGjenHZt/quSn4Mtl81TNjSpCfHcw/BoJVkF+7mzf7wovV3q8Fy BU9aOLMbQJ/hFiMj71jI6lpcYTjRcDM8on95XjlIdHsp4b7aDOc2RHPYK1lNtwVGLQSm 8tb+cGWY4O0FcaPt1d+uA5VBt7wZSdFap4KW3/Bz3lg3xdWY2VLTeJuo/9WQYoC2FXBM 5K4CxRvv1WmcKSRcIxfM8ocoX4DJvVPZb7z8xFkxCA3ixeJA0BPJOk3h/mnGnY0SfT8i K4Iw== X-Gm-Message-State: AOJu0YxQi+a8bCOvmzEC3+WoIqUP8+t3dtyJMYdNafiA6aKEmBthhkIy 3lJm6USQmBoDjP1c26GBvLR3PWGRxx0WxbM4duY= X-Received: by 2002:a17:906:3942:b0:9e3:b88c:d735 with SMTP id g2-20020a170906394200b009e3b88cd735mr7444263eje.61.1699992371281; Tue, 14 Nov 2023 12:06:11 -0800 (PST) Received: from spiri.. ([5.2.194.157]) by smtp.gmail.com with ESMTPSA id me19-20020a170906aed300b009ae587ce133sm5984429ejb.188.2023.11.14.12.06.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Nov 2023 12:06:10 -0800 (PST) From: Alisa-Dariana Roman <alisadariana@gmail.com> X-Google-Original-From: Alisa-Dariana Roman <alisa.roman@analog.com> To: Alisa-Dariana Roman <alisa.roman@analog.com>, Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>, Michael Hennerich <michael.hennerich@analog.com> Cc: linux-iio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Lars-Peter Clausen <lars@metafoo.de>, Michael Hennerich <Michael.Hennerich@analog.com>, Alexandru Tachici <alexandru.tachici@analog.com>, Jonathan Cameron <jic23@kernel.org>, Rob Herring <robh+dt@kernel.org>, Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>, Conor Dooley <conor+dt@kernel.org> Subject: [PATCH v2 1/4] dt-bindings: iio: adc: ad7192: Add properties Date: Tue, 14 Nov 2023 22:05:30 +0200 Message-Id: <20231114200533.137995-2-alisa.roman@analog.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231114200533.137995-1-alisa.roman@analog.com> References: <20231114200533.137995-1-alisa.roman@analog.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.6 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Tue, 14 Nov 2023 12:07:16 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1782571284338462283 X-GMAIL-MSGID: 1782571284338462283 |
Series |
iio: adc: ad7192: Add support for AD7194
|
|
Commit Message
Alisa-Dariana Roman
Nov. 14, 2023, 8:05 p.m. UTC
Document properties used for clock configuration.
Signed-off-by: Alisa-Dariana Roman <alisa.roman@analog.com>
---
.../devicetree/bindings/iio/adc/adi,ad7192.yaml | 10 ++++++++++
1 file changed, 10 insertions(+)
Comments
On 14/11/2023 21:05, Alisa-Dariana Roman wrote: > Document properties used for clock configuration. Some background here is missing - otherwise it looks like you are adding new properties... > > Signed-off-by: Alisa-Dariana Roman <alisa.roman@analog.com> > --- > .../devicetree/bindings/iio/adc/adi,ad7192.yaml | 10 ++++++++++ > 1 file changed, 10 insertions(+) > > diff --git a/Documentation/devicetree/bindings/iio/adc/adi,ad7192.yaml b/Documentation/devicetree/bindings/iio/adc/adi,ad7192.yaml > index 16def2985ab4..9b59d6eea368 100644 > --- a/Documentation/devicetree/bindings/iio/adc/adi,ad7192.yaml > +++ b/Documentation/devicetree/bindings/iio/adc/adi,ad7192.yaml > @@ -80,6 +80,16 @@ properties: > and when chop is disabled. > type: boolean > > + adi,clock-xtal: > + description: | > + External crystal connected from MCLK1 to MCLK2. And this should be input clock. > + type: boolean > + > + adi,int-clock-output-enable: > + description: | > + Internal 4.92 MHz clock available on MCLK2 pin. > + type: boolean This should be clock-cells and clock provider. Unless you are just documenting already used interface which you do not want to break... > + > bipolar: > description: see Documentation/devicetree/bindings/iio/adc/adc.yaml > type: boolean Best regards, Krzysztof
On Tue, 14 Nov 2023 21:29:58 +0100 Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> wrote: > On 14/11/2023 21:05, Alisa-Dariana Roman wrote: > > Document properties used for clock configuration. > > Some background here is missing - otherwise it looks like you are adding > new properties... > > > > > Signed-off-by: Alisa-Dariana Roman <alisa.roman@analog.com> > > --- > > .../devicetree/bindings/iio/adc/adi,ad7192.yaml | 10 ++++++++++ > > 1 file changed, 10 insertions(+) > > > > diff --git a/Documentation/devicetree/bindings/iio/adc/adi,ad7192.yaml b/Documentation/devicetree/bindings/iio/adc/adi,ad7192.yaml > > index 16def2985ab4..9b59d6eea368 100644 > > --- a/Documentation/devicetree/bindings/iio/adc/adi,ad7192.yaml > > +++ b/Documentation/devicetree/bindings/iio/adc/adi,ad7192.yaml > > @@ -80,6 +80,16 @@ properties: > > and when chop is disabled. > > type: boolean > > > > + adi,clock-xtal: > > + description: | > > + External crystal connected from MCLK1 to MCLK2. > > And this should be input clock. Fair enough. We've been doing this wrong for a while then, but good not to do it in new bindings. It's a bit of an oddity as arguably it's just putting an analog component in as part of an internally generated clock signal. A clock binding provides info that the crystal is present though I guess, even though if you actually connected a conventional clock there it wouldn't work. > > > + type: boolean > > + > > + adi,int-clock-output-enable: > > + description: | > > + Internal 4.92 MHz clock available on MCLK2 pin. > > + type: boolean > > This should be clock-cells and clock provider. > > Unless you are just documenting already used interface which you do not > want to break... > > > + > > bipolar: > > description: see Documentation/devicetree/bindings/iio/adc/adc.yaml > > type: boolean > > Best regards, > Krzysztof >
On 14.11.2023 22:29, Krzysztof Kozlowski wrote: > On 14/11/2023 21:05, Alisa-Dariana Roman wrote: >> Document properties used for clock configuration. > > Some background here is missing - otherwise it looks like you are adding > new properties... > >> >> Signed-off-by: Alisa-Dariana Roman <alisa.roman@analog.com> >> --- >> .../devicetree/bindings/iio/adc/adi,ad7192.yaml | 10 ++++++++++ >> 1 file changed, 10 insertions(+) >> >> diff --git a/Documentation/devicetree/bindings/iio/adc/adi,ad7192.yaml b/Documentation/devicetree/bindings/iio/adc/adi,ad7192.yaml >> index 16def2985ab4..9b59d6eea368 100644 >> --- a/Documentation/devicetree/bindings/iio/adc/adi,ad7192.yaml >> +++ b/Documentation/devicetree/bindings/iio/adc/adi,ad7192.yaml >> @@ -80,6 +80,16 @@ properties: >> and when chop is disabled. >> type: boolean >> >> + adi,clock-xtal: >> + description: | >> + External crystal connected from MCLK1 to MCLK2. > > And this should be input clock. > >> + type: boolean >> + >> + adi,int-clock-output-enable: >> + description: | >> + Internal 4.92 MHz clock available on MCLK2 pin. >> + type: boolean > > This should be clock-cells and clock provider. > > Unless you are just documenting already used interface which you do not > want to break... > >> + >> bipolar: >> description: see Documentation/devicetree/bindings/iio/adc/adc.yaml >> type: boolean > > Best regards, > Krzysztof > Thank you very much for the feedback! If I understand correctly, there is already an input clock in the bindings: ``` clocks: maxItems: 1 description: phandle to the master clock (mclk) clock-names: items: - const: mclk ``` What I wanted to accomplish with this patch is to document these boolean properties (from the ad7192 driver code): ``` /* use internal clock */ if (!st->mclk) { if (device_property_read_bool(dev, "adi,int-clock-output-enable")) clock_sel = AD7192_CLK_INT_CO; } else { if (device_property_read_bool(dev, "adi,clock-xtal")) clock_sel = AD7192_CLK_EXT_MCLK1_2; else clock_sel = AD7192_CLK_EXT_MCLK2; } ``` Please let me know how to proceed further! Kind regards, Alisa-Dariana Roman
On 02/02/2024 15:14, Alisa-Dariana Roman wrote: > On 14.11.2023 22:29, Krzysztof Kozlowski wrote: >> On 14/11/2023 21:05, Alisa-Dariana Roman wrote: >>> Document properties used for clock configuration. >> >> Some background here is missing - otherwise it looks like you are adding >> new properties... >> >>> >>> Signed-off-by: Alisa-Dariana Roman <alisa.roman@analog.com> >>> --- >>> .../devicetree/bindings/iio/adc/adi,ad7192.yaml | 10 ++++++++++ >>> 1 file changed, 10 insertions(+) >>> >>> diff --git a/Documentation/devicetree/bindings/iio/adc/adi,ad7192.yaml b/Documentation/devicetree/bindings/iio/adc/adi,ad7192.yaml >>> index 16def2985ab4..9b59d6eea368 100644 >>> --- a/Documentation/devicetree/bindings/iio/adc/adi,ad7192.yaml >>> +++ b/Documentation/devicetree/bindings/iio/adc/adi,ad7192.yaml >>> @@ -80,6 +80,16 @@ properties: >>> and when chop is disabled. >>> type: boolean >>> >>> + adi,clock-xtal: >>> + description: | >>> + External crystal connected from MCLK1 to MCLK2. >> >> And this should be input clock. >> >>> + type: boolean >>> + >>> + adi,int-clock-output-enable: >>> + description: | >>> + Internal 4.92 MHz clock available on MCLK2 pin. >>> + type: boolean >> >> This should be clock-cells and clock provider. >> >> Unless you are just documenting already used interface which you do not >> want to break... >> >>> + >>> bipolar: >>> description: see Documentation/devicetree/bindings/iio/adc/adc.yaml >>> type: boolean >> >> Best regards, >> Krzysztof >> > > Thank you very much for the feedback! > > If I understand correctly, there is already an input clock in the bindings: You tell me... > > What I wanted to accomplish with this patch is to document these boolean > properties (from the ad7192 driver code): Please explain with clear words: do you mean that existing upstream Linux driver has it? I don't care about some out of tree drivers... > ``` > /* use internal clock */ > if (!st->mclk) { > if (device_property_read_bool(dev, "adi,int-clock-output-enable")) > clock_sel = AD7192_CLK_INT_CO; > } else { > if (device_property_read_bool(dev, "adi,clock-xtal")) > clock_sel = AD7192_CLK_EXT_MCLK1_2; > else > clock_sel = AD7192_CLK_EXT_MCLK2; > } > ``` > > Please let me know how to proceed further! Please open the datasheet of your product and add properties matching the hardware, not driver. I don't know what to say more except the same - you want to enable clock provided from this device on some pin to some other devices? If yes, then this is clock-provider, so you clock-provider bindings I mentioned in my first reply. Best regards, Krzysztof
On Fri, Feb 2, 2024 at 8:14 AM Alisa-Dariana Roman <alisadariana@gmail.com> wrote: > > On 14.11.2023 22:29, Krzysztof Kozlowski wrote: > > On 14/11/2023 21:05, Alisa-Dariana Roman wrote: > >> Document properties used for clock configuration. > > > > Some background here is missing - otherwise it looks like you are adding > > new properties... > > > >> > >> Signed-off-by: Alisa-Dariana Roman <alisa.roman@analog.com> > >> --- > >> .../devicetree/bindings/iio/adc/adi,ad7192.yaml | 10 ++++++++++ > >> 1 file changed, 10 insertions(+) > >> > >> diff --git a/Documentation/devicetree/bindings/iio/adc/adi,ad7192.yaml b/Documentation/devicetree/bindings/iio/adc/adi,ad7192.yaml > >> index 16def2985ab4..9b59d6eea368 100644 > >> --- a/Documentation/devicetree/bindings/iio/adc/adi,ad7192.yaml > >> +++ b/Documentation/devicetree/bindings/iio/adc/adi,ad7192.yaml > >> @@ -80,6 +80,16 @@ properties: > >> and when chop is disabled. > >> type: boolean > >> > >> + adi,clock-xtal: > >> + description: | > >> + External crystal connected from MCLK1 to MCLK2. A better description could be: When this flag is present, it indicates that the clock from the clocks property is a crystal oscillator connected to MCLK1 and MCLK2. When omitted the clock is a CMOS-compatible clock connected to MCLK2. > > > > And this should be input clock. > > > >> + type: boolean > >> + > >> + adi,int-clock-output-enable: > >> + description: | > >> + Internal 4.92 MHz clock available on MCLK2 pin. > >> + type: boolean > > > > This should be clock-cells and clock provider. > > > > Unless you are just documenting already used interface which you do not > > want to break... This property is already used in the mainline Linux driver, so sounds like the "don't want to break it" case. But it would make sense to deprecate this property and use standard clock provider bindings instead. > > > >> + > >> bipolar: > >> description: see Documentation/devicetree/bindings/iio/adc/adc.yaml > >> type: boolean > > > > Best regards, > > Krzysztof > > > > Thank you very much for the feedback! > > If I understand correctly, there is already an input clock in the bindings: > ``` > clocks: > maxItems: 1 > description: phandle to the master clock (mclk) > > clock-names: > items: > - const: mclk > ``` > > What I wanted to accomplish with this patch is to document these boolean > properties (from the ad7192 driver code): > ``` > /* use internal clock */ > if (!st->mclk) { > if (device_property_read_bool(dev, "adi,int-clock-output-enable")) > clock_sel = AD7192_CLK_INT_CO; > } else { > if (device_property_read_bool(dev, "adi,clock-xtal")) > clock_sel = AD7192_CLK_EXT_MCLK1_2; > else > clock_sel = AD7192_CLK_EXT_MCLK2; > } > ``` > > Please let me know how to proceed further! > > Kind regards, > Alisa-Dariana Roman > There was another recent discussion about this exact same clock input/output on another chip recently [1]. So it would be nice if we could end up with the same bindings in both cases (cc Ceclan). In the other thread, it was proposed to have the clocks property to be an array of two phandles, one for the crystal oscillator and one for the external clock rather than a single clock and the adi,clock-xtal property. But that would be a breaking change to these bindings. [1]: https://lore.kernel.org/linux-iio/20240122-bloating-dyslexic-cbc0258c898a@spud/t/#m4e375aa36dae6da0c319518137f03e2f63e72af9
On 02/02/2024 23:20, David Lechner wrote: >>> >>> And this should be input clock. >>> >>>> + type: boolean >>>> + >>>> + adi,int-clock-output-enable: >>>> + description: | >>>> + Internal 4.92 MHz clock available on MCLK2 pin. >>>> + type: boolean >>> >>> This should be clock-cells and clock provider. >>> >>> Unless you are just documenting already used interface which you do not >>> want to break... > > This property is already used in the mainline Linux driver, so sounds > like the "don't want to break it" case. But it would make sense to > deprecate this property and use standard clock provider bindings > instead. One could think like that, but what type of process would it create? Send driver changes WITHOUT binding, then document whatever crap you have saying "Linux already supports it!". Whenever such argument is used, I am repeating the same. Let's be more clear: NAK if this is clock provider and the only argument is that someone sneaked undocumented interface bypassing review. Best regards, Krzysztof
On Mon, 2024-02-05 at 10:28 +0100, Krzysztof Kozlowski wrote: > On 02/02/2024 23:20, David Lechner wrote: > > > > > > > > And this should be input clock. > > > > > > > > > + type: boolean > > > > > + > > > > > + adi,int-clock-output-enable: > > > > > + description: | > > > > > + Internal 4.92 MHz clock available on MCLK2 pin. > > > > > + type: boolean > > > > > > > > This should be clock-cells and clock provider. > > > > > > > > Unless you are just documenting already used interface which you do not > > > > want to break... > > > > This property is already used in the mainline Linux driver, so sounds > > like the "don't want to break it" case. But it would make sense to > > deprecate this property and use standard clock provider bindings > > instead. > > One could think like that, but what type of process would it create? > Send driver changes WITHOUT binding, then document whatever crap you > have saying "Linux already supports it!". > > Whenever such argument is used, I am repeating the same. > > Let's be more clear: NAK if this is clock provider and the only argument > is that someone sneaked undocumented interface bypassing review. > Fair enough... Alisa, I guess you have two alternatives then: 1) Drop this patch; 2) Add proper clock provider properties. I would obviously go with 2). You can then take care of backward compatibility in the driver. Like, if clock-cells is present, ignore the legacy properties and properly export the clocks we have in the device. - Nuno Sá
diff --git a/Documentation/devicetree/bindings/iio/adc/adi,ad7192.yaml b/Documentation/devicetree/bindings/iio/adc/adi,ad7192.yaml index 16def2985ab4..9b59d6eea368 100644 --- a/Documentation/devicetree/bindings/iio/adc/adi,ad7192.yaml +++ b/Documentation/devicetree/bindings/iio/adc/adi,ad7192.yaml @@ -80,6 +80,16 @@ properties: and when chop is disabled. type: boolean + adi,clock-xtal: + description: | + External crystal connected from MCLK1 to MCLK2. + type: boolean + + adi,int-clock-output-enable: + description: | + Internal 4.92 MHz clock available on MCLK2 pin. + type: boolean + bipolar: description: see Documentation/devicetree/bindings/iio/adc/adc.yaml type: boolean