Received: by 2002:a89:413:0:b0:1fd:dba5:e537 with SMTP id m19csp1318143lqs; Sat, 15 Jun 2024 04:05:55 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVNPyB4nu0tzDXjNMSfN7zhdAN4k/W0JdkiiDqy+YrADL95Ezy1bShazPnpfJ29xazKXXKds+JCYe9SmrMyK1qF9e2KDU4m7YBIdFNaKg== X-Google-Smtp-Source: AGHT+IEppLIeXCiLk1kzDe/DIS0AARQ59EwVch2Mm8qICdvjqJny/WkPGMcy9THXzFz6Uf9iM62A X-Received: by 2002:a05:6358:478e:b0:199:297b:542e with SMTP id e5c5f4694b2df-19fa9e5e196mr592302355d.19.1718449555400; Sat, 15 Jun 2024 04:05:55 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718449555; cv=pass; d=google.com; s=arc-20160816; b=WkQb/GAm21KmViizSGNr7yV5LPiwI8wZHHzgOi9l+qEKZeCrB9kmRDpZOVJ/Jo5cUj 3pHFVE2jZ7xGziwsMJRV4f4GU9F2NgLVTLQPhD3lFzQggkZLeFDwKrPaDJSzf6GQDaC6 Ezpi95sd2Wl09KjTDvi1HKOB88jrNrPEVaXr4bbwY7WwkRfvJlyQr9cAqo0uUwUEtDpb qzJdLlrHdagIACbVpvl18eDwU12BxX+7P3OvzDPQGjIo0VT7SJurEL+uDQcw8NIIdcUU lZ7begQi2UCR01pn+1s8dHubnOebNKb9OJbj/tl1AwIDgCK7lzsxkI0rYxcVxOaAODgG hljQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :subject:cc:to:from:date:dkim-signature; bh=KgNLryEljLerhl2f3rx8dprJVIy3LKW6fyAlH7DiSNg=; fh=9S8rSV3FH51qD9JuzcXSZtz3mwYEY8xdvs4+HhQeJp0=; b=wMy1j4ul9y/SEA0LADuqJf4+fy/ZR/WaVwprTEGxlPAFvaM1MRj4Yf+dAtZPtaW1tx 9T/msmt+AIwqVThWUal8wnb/jB/NmXI4O0gkEAVYUqo/7so8ZNuiTxD+4NwKCGtdJh5J C3Pk0xyd/VuaguOC8CEl0yRlCoWY2srKZcNpyFaI3/3vA8T/2nq7bnxvM74Hm3v7jiyq tv1lkEzHQa9RC/njTBb70UItVcyjB8GbvrcJrGASoAhaO04tN3XbW/D02bpI54wAbaqn EqGKeZzNuRl2iIpy9xD4cISThfaavdeYH3Z1BOsfxXxqC6xVj+Y/zQdntVzbSr0k8MfF 8WMg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=TgkEHvpO; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-215849-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-215849-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id 41be03b00d2f7-6fedd5e9109si5434927a12.60.2024.06.15.04.05.55 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 15 Jun 2024 04:05:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-215849-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=TgkEHvpO; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-215849-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-215849-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id EFFDD2831EB for ; Sat, 15 Jun 2024 11:05:54 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 748CA3AC2E; Sat, 15 Jun 2024 11:05:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="TgkEHvpO" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 828B6321A3; Sat, 15 Jun 2024 11:05:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718449549; cv=none; b=HSTEQy0FdJHCzuctGyDoaHdu5s5bgE50u85PJW9h6XYvTb5TKaJPJX6LwuC434RQD5vJQMXg4FnEnRTap3NX0KkS2pgmRVwwtMtmEDiognyNUoM4Wv97QjXxwluNLNb8xUN4XzRYtp23LPn7HfdwO/WE+zPlLdXHcs00FaK3fMY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718449549; c=relaxed/simple; bh=0LpWgpG86C91czNegUVAgchoLh1pUrCspvDDnRblZKE=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=g8KFP+p+qk6PIGFPMzqHy9/0P/J3n+5BgiH9LyFx4yN0zBReCUm6uv9W16i2wtnW7l0yyk7RLHQlqSW3HVNuGUWALxBdaiZjR9XHvLUqoJ7RwhlfqUkI9SSuR93riTSPA0+0HfOYbpAbK0I/EL0YdsIkzWI125BEZrtgsTg+hzw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=TgkEHvpO; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id C826AC32786; Sat, 15 Jun 2024 11:05:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1718449549; bh=0LpWgpG86C91czNegUVAgchoLh1pUrCspvDDnRblZKE=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=TgkEHvpOaTzD6Y6h4yDbzzLVnkigxCBmBLDWtApx37O6/fDobDC3znuh+I/iL2ZcK 5RYaFDmNKmvfuDa3HVaARyNDRycgL7Ljgh8sM13X//xvjj6Zj6GUkIqiIBubEof1m3 lsVBmIQkjAOllinjoRN0tgfWdlUh4e4mie9D5kNEppBG6MW7TuxhFaZ0Mzsj9jW52F bkr/WLQYcIhORkwV7HVyhEVCjpKk6pLTZ3+Su0OnFH3OH9k9udIJbfRsPC8N++kTJm /kScPuDgR3ojXi1zl7u9rIC2so3llcRhbtMf4R32xr2sUyfw7/onT3bHEwKujfHz29 fViSY3UjbHhIg== Date: Sat, 15 Jun 2024 12:05:38 +0100 From: Jonathan Cameron To: Conor Dooley Cc: Alisa-Dariana Roman , Alisa-Dariana Roman , Jonathan Cameron , Michael Hennerich , linux-iio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Alexandru Tachici , Lars-Peter Clausen , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Liam Girdwood , Mark Brown Subject: Re: [PATCH v4 2/5] dt-bindings: iio: adc: ad7192: Update clock config Message-ID: <20240615120538.16e44f7b@jic23-huawei> In-Reply-To: <20240613-vineyard-doing-87ada1b7a8ed@spud> References: <20240613114001.270233-1-alisa.roman@analog.com> <20240613114001.270233-3-alisa.roman@analog.com> <20240613-vineyard-doing-87ada1b7a8ed@spud> X-Mailer: Claws Mail 4.3.0 (GTK 3.24.42; x86_64-pc-linux-gnu) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Thu, 13 Jun 2024 17:41:52 +0100 Conor Dooley wrote: > On Thu, Jun 13, 2024 at 02:39:58PM +0300, Alisa-Dariana Roman wrote: > > There are actually 4 configuration modes of clock source for AD719X > > devices. Either a crystal can be attached externally between MCLK1 and > > MCLK2 pins, or an external CMOS-compatible clock can drive the MCLK2 > > pin. The other 2 modes make use of the 4.92MHz internal clock. > > > > Add clock name xtal alongside mclk. When an external crystal is > > attached, xtal should be chosen. When an external clock is used, mclk > > should be chosen. > > This is still missing an explanation of why a new name is needed. > Hint: do you need to change register settings to use one versus the > other? Absolutely - dt reviewer shouldn't need to look at the code to find this out as it wastes their over subscribed time! > > > > > The presence of an external clock source is optional, not required. When > > absent, internal clock is used. Modify required property accordingly and > > modify second example to showcase this. > > > > Signed-off-by: Alisa-Dariana Roman > > --- > > .../devicetree/bindings/iio/adc/adi,ad7192.yaml | 14 +++++++------- > > 1 file changed, 7 insertions(+), 7 deletions(-) > > > > diff --git a/Documentation/devicetree/bindings/iio/adc/adi,ad7192.yaml b/Documentation/devicetree/bindings/iio/adc/adi,ad7192.yaml > > index a03da9489ed9..3ae2f860d24c 100644 > > --- a/Documentation/devicetree/bindings/iio/adc/adi,ad7192.yaml > > +++ b/Documentation/devicetree/bindings/iio/adc/adi,ad7192.yaml > > @@ -39,11 +39,15 @@ properties: > > > > clocks: > > maxItems: 1 > > - description: phandle to the master clock (mclk) > > + description: | > > + Optionally, either a crystal can be attached externally between MCLK1 and > > + MCLK2 pins, or an external CMOS-compatible clock can drive the MCLK2 > > + pin. If absent, internal 4.92MHz clock is used. Trivial but doesn't need to be formatted, so don't think the | matters. > > > > clock-names: > > - items: > > - - const: mclk > > + enum: > > + - xtal > > + - mclk > > > > interrupts: > > maxItems: 1 > > @@ -135,8 +139,6 @@ patternProperties: > > required: > > - compatible > > - reg > > - - clocks > > - - clock-names > > - interrupts > > - dvdd-supply > > - avdd-supply > > @@ -202,8 +204,6 @@ examples: > > spi-max-frequency = <1000000>; > > spi-cpol; > > spi-cpha; > > - clocks = <&ad7192_mclk>; > > - clock-names = "mclk"; Why drop it from the example? It's a valid setting to have one after all. > > interrupts = <25 0x2>; > > interrupt-parent = <&gpio>; > > aincom-supply = <&aincom>; > > -- > > 2.34.1 > >