Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp4835451rwd; Tue, 30 May 2023 10:32:02 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4PDNd4RMt8n51IhneC75NUqCPGJFQz5bEXBoUt9P5u3n3d3aM5y1mORdClV5E47FgsVJHS X-Received: by 2002:a17:902:b18f:b0:1ab:7c4:eb24 with SMTP id s15-20020a170902b18f00b001ab07c4eb24mr2623469plr.22.1685467922241; Tue, 30 May 2023 10:32:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685467922; cv=none; d=google.com; s=arc-20160816; b=Rvg74q2eCpK8ORvp5j6dP5+NdYosoiKc9gSOCr4hrJrW0rNsTU2DV4FXlYVu51v5Tm 5y/W/E51deD4DVd4S2XwyryXXFSz62/Grvl2CSOmlsERKbe/AZMXry8Q21PBOzBLqOZC fTya4Ee8t2ql/Q+hUc2LHpY94UQ9MFf+T8vToOw2NSI51cDCNTbOfWX5lJe5qpbT8BZH aCdEooxH7Dk4Ep9+yIpk3Gm+z7TDtGMro0nHOxE1oI0uhLZnQ9i9e8hRzg1vrNliwSkk iQbVeedmwaSTkUrvDpXA6jykjnN84j+HP0IzGInHzNtjCeegtnyeKJ3mrQYMc8gLkOmX 0ZQg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=/8fPrpL6a+/OvvEh9shDng18LgZo0mnm5NFGyn7v7tE=; b=Jjj69tlW3NLXqb1ZLkC6cd/OqnwkfgC/GHyHKHELDAdXjMclFbep/oUPoPWCqjiBoe KL21LCNcNHLBYiWU5t/ZBAPwYtFhsqrNEZiQ5emwrvF+Mfu/U7qPx9RN5+o7kMNbN5bY 3ZGGSk57tIpI6s3OMaq/ibwW4zJPNYEOenXc6NG+FDNjBD8awIiVeW62cf0qxClaWQue swt6ejAdqFFDBWmicvhN3CSk8+zPbOpowT+c5CK64BlvIlhho2+ydioFmQ/yjljNqLSM ogiHjNAZubLmAJdZdtpQF/JZaOOkFLc6VP5+g8g8z12OUMJIhqAmIsoDVPtLItcgvkvO eBEg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=fn1PZNRT; 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 n5-20020a170903110500b001a6b5a7db52si2841688plh.596.2023.05.30.10.31.47; Tue, 30 May 2023 10:32:02 -0700 (PDT) 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=fn1PZNRT; 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 S233461AbjE3RYt (ORCPT + 99 others); Tue, 30 May 2023 13:24:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51040 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232951AbjE3RYX (ORCPT ); Tue, 30 May 2023 13:24:23 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 723D91A2; Tue, 30 May 2023 10:23:39 -0700 (PDT) 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 BFF9863127; Tue, 30 May 2023 17:22:11 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id DD3DCC433D2; Tue, 30 May 2023 17:22:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1685467331; bh=QewfULGDzQw9U8Sjf5XkcO2JdMdAuFaRZdNueC5s0yU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=fn1PZNRTwL8dtH+YSdMWiNxKTQgLI4jjWZPrXGNCw2bmxXzetvhdi9uvapssaeNjy PUrqQse5a27RfWC7mwGnoRmLnCWHKKUZvu/SFHvbUG37WakyZdMohzKouEQyHHfHhJ ZSbBbqLMmyrTkkZ8TXpZNzLEtl73JaPbMr1QJ5Pnu6z1Ch3bOVgJtlFNx5N+RXEo6g RkxZ935caiXca5SPQMLraZ2jZeGfO7fLcobwhwkvIVeY7Khm2/Ab2kb4rlbU8nR5Wv UfCqBJ3I/pH4qW34pbsYZkdcyequfJKYDDvqj7d7uHGZ4YSYJAC4B3rl+/5DZdqajx M84uaqqx+gPYw== Date: Tue, 30 May 2023 18:22:06 +0100 From: Conor Dooley To: fl.scratchpad@gmail.com Cc: jic23@kernel.org, Lars-Peter Clausen , Michael Hennerich , Alexandru Tachici , Rob Herring , Krzysztof Kozlowski , Conor Dooley , linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org Subject: Re: [PATCH v3 5/5] dt-bindings: iio: ad7192: Allow selection of clock modes Message-ID: <20230530-cannabis-headstone-883c5b891dd3@spud> References: <20230530075311.400686-1-fl.scratchpad@gmail.com> <20230530075311.400686-6-fl.scratchpad@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="GOC40fJ/cBBzzJa4" Content-Disposition: inline In-Reply-To: <20230530075311.400686-6-fl.scratchpad@gmail.com> X-Spam-Status: No, score=-4.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 --GOC40fJ/cBBzzJa4 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, May 30, 2023 at 09:53:11AM +0200, fl.scratchpad@gmail.com wrote: > From: Fabrizio Lamarque >=20 > AD7192 supports external clock sources, generated by a digital clock > source or a crystal oscillator, or internally generated clock option > without external components. >=20 > Describe choice between internal and external clock, crystal or external > oscillator, and internal clock output enable. >=20 > Signed-off-by: Fabrizio Lamarque > --- > .../bindings/iio/adc/adi,ad7192.yaml | 27 ++++++++++++++++--- > 1 file changed, 24 insertions(+), 3 deletions(-) >=20 > diff --git a/Documentation/devicetree/bindings/iio/adc/adi,ad7192.yaml b/= Documentation/devicetree/bindings/iio/adc/adi,ad7192.yaml > index 16def2985ab4..f7ecfd65ad80 100644 > --- a/Documentation/devicetree/bindings/iio/adc/adi,ad7192.yaml > +++ b/Documentation/devicetree/bindings/iio/adc/adi,ad7192.yaml > @@ -32,7 +32,8 @@ properties: > =20 > clocks: > maxItems: 1 > - description: phandle to the master clock (mclk) > + description: | > + Master clock (mclk). If not set, internal clock is used. > =20 > clock-names: > items: > @@ -50,6 +51,17 @@ properties: > vref-supply: > description: VRef voltage supply > =20 > + adi,clock-xtal: > + description: | > + Select whether an external crystal oscillator or an external > + clock is applied as master (mclk) clock. > + type: boolean Am I being daft, or are these the same thing? If they are not, and use different input pins, I think it should be explained as it not clear. Could you explain why we actually care that the source is a xtal versus it being mclk, and why just having master clock is not sufficient? > + adi,int-clock-output-enable: > + description: | > + When internal clock is selected, this bit enables clock out pin. > + type: boolean And this one makes you a clock provider, so the devices advocate position would be that you know that this bit should be set if "clocks" is not present and a consumer requests a clock. I don't seem to have got the driver patches (at least not in this mailbox), so I have got no information on how you've actually implemented this. Cheers, Conor. > + > adi,rejection-60-Hz-enable: > description: | > This bit enables a notch at 60 Hz when the first notch of the sinc > @@ -84,11 +96,12 @@ properties: > description: see Documentation/devicetree/bindings/iio/adc/adc.yaml > type: boolean > =20 > +dependencies: > + adi,clock-xtal: ['clocks', 'clock-names'] > + > required: > - compatible > - reg > - - clocks > - - clock-names > - interrupts > - dvdd-supply > - avdd-supply > @@ -98,6 +111,13 @@ required: > =20 > allOf: > - $ref: /schemas/spi/spi-peripheral-props.yaml# > + - if: > + required: > + - clocks > + - clock-names > + then: > + properties: > + adi,int-clock-output-enable: false > =20 > unevaluatedProperties: false > =20 > @@ -115,6 +135,7 @@ examples: > spi-cpha; > clocks =3D <&ad7192_mclk>; > clock-names =3D "mclk"; > + adi,clock-xtal; > interrupts =3D <25 0x2>; > interrupt-parent =3D <&gpio>; > dvdd-supply =3D <&dvdd>; > --=20 > 2.34.1 >=20 --GOC40fJ/cBBzzJa4 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQRh246EGq/8RLhDjO14tDGHoIJi0gUCZHYwvgAKCRB4tDGHoIJi 0qkFAP9uZ1N8bFxZsXbgW8kQo1+vlYKpinjPWQHQw4vNab1QdAEAiMZn03LxwMx2 /4Q9ctSo9xBk9Le4GVYdC0z4WQRcWgs= =KNs6 -----END PGP SIGNATURE----- --GOC40fJ/cBBzzJa4--