Received: by 2002:ac0:aed5:0:0:0:0:0 with SMTP id t21csp5997527imb; Fri, 8 Mar 2019 07:09:03 -0800 (PST) X-Google-Smtp-Source: APXvYqx9VXThph4t/Vf1M94aAmmA6qW8JL6Wb3ZJhUH4597vZCo5gJC6KaiYdYsNvOmN4TJY4Erw X-Received: by 2002:a62:6e05:: with SMTP id j5mr19405467pfc.158.1552057743637; Fri, 08 Mar 2019 07:09:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1552057743; cv=none; d=google.com; s=arc-20160816; b=n8U7GRKTskBLX7MC4YSTf4YyMVbdR1Ymtl1qEK4SGGCqbq/9F4ZfVVLgWysdL9DywX sv1TZrIdJhgwiTo4IZb4CeK6gcfmFqAzScacaUZTx4GA+goRk9uTD2G6H0fsL4ZKccfu eFyaz6t0KjDoXn4WCc5pjG4J29vV8MBMCkOuPJicU+JOCpcyhzw1rq2yph6xy6YlmNJf R7SQO0DqRDxo/dv1s3HCklOvFsqjldU21yfzxuN6CvqjeP9O2Ky7lTZDCoBOfjK21Vs3 9qn/8wy1dDsaI5G99aQEl0EGOwFb7sSTc92yVIVFV4Fgmowv4UaWau2LAZ/AXM9Jq8db 9dVA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :organization:references:in-reply-to:message-id:subject:cc:to:from :date; bh=js8rBy27mFcvekYdbJ5RqWPzfDVeZC0Hs9wtsOgiDvY=; b=jlooTkrA9XgFJWqUC50cEgwG0q7DwE02bknvP/VTwkbt0+b6SGrWE/4BiqEkTqU8SR nnmya8uJlqcyo/uRODP9swzmVXg3+PgAgS2JrAKDUwpZL5uBE8ljgDha9WrNLhUwXs1g DF794e06u207EorgYycPHLTNF3Zd+hERKq2da6OaORfgVykbfePquIpeE4UbXuTzuL5c u3rffpQZ1yhfJIPKmLbETBNdq8sNmj8+UC57oxx1nlzPZm5AYOSvhs8lJILc1tlsggxP zLSNVRfxvHBhLALpeGAj9QF/pw4JpWHV8c7OIFrwOkSq/qoXnJjw2fl5ISWsTxq7XZiT NlZQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p10si6961768pls.296.2019.03.08.07.08.47; Fri, 08 Mar 2019 07:09:03 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726945AbfCHPHp (ORCPT + 99 others); Fri, 8 Mar 2019 10:07:45 -0500 Received: from szxga05-in.huawei.com ([45.249.212.191]:5223 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726750AbfCHPHo (ORCPT ); Fri, 8 Mar 2019 10:07:44 -0500 Received: from DGGEMS406-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 1E1785792FD8121307E2; Fri, 8 Mar 2019 23:07:41 +0800 (CST) Received: from localhost (10.202.226.61) by DGGEMS406-HUB.china.huawei.com (10.3.19.206) with Microsoft SMTP Server id 14.3.408.0; Fri, 8 Mar 2019 23:07:39 +0800 Date: Fri, 8 Mar 2019 15:07:28 +0000 From: Jonathan Cameron To: Stefan Popa CC: , , , , , , , , , , Subject: Re: [PATCH 2/2] dt-bindings: iio: imu: adis16480: Document external clock Message-ID: <20190308150728.00002ec1@huawei.com> In-Reply-To: <1551972559-15148-1-git-send-email-stefan.popa@analog.com> References: <1551972559-15148-1-git-send-email-stefan.popa@analog.com> Organization: Huawei X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; i686-w64-mingw32) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.202.226.61] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 7 Mar 2019 17:29:19 +0200 Stefan Popa wrote: > Add documentation for optional use of external clock. All devices > supported by this driver can work with an external clock in sync mode. > Another mode, called Pulse Per Second (PPS) is supported only by adis1649x > devices. The mode is selected by using the "clock-names" property. > > The pin which is used as external clock input is selected by using a > custom optional property called "adi,ext-clk-pin". If this field is left > empty, DIO2 is assigned as default external clock input pin. > > Signed-off-by: Stefan Popa Trivial comments inline... Thanks, Jonathan > --- > .../devicetree/bindings/iio/imu/adi,adis16480.txt | 34 ++++++++++++++++++++++ > 1 file changed, 34 insertions(+) > > diff --git a/Documentation/devicetree/bindings/iio/imu/adi,adis16480.txt b/Documentation/devicetree/bindings/iio/imu/adi,adis16480.txt > index 39ab016..9e2fcd4 100644 > --- a/Documentation/devicetree/bindings/iio/imu/adi,adis16480.txt > +++ b/Documentation/devicetree/bindings/iio/imu/adi,adis16480.txt > @@ -34,6 +34,37 @@ Optional properties: > signal. > - reset-gpios: must be the device tree identifier of the RESET pin. As the line > is active low, it should be marked GPIO_ACTIVE_LOW. > +- clocks: phandle to the external clock. Should be set according to > + "clock-names". > + If this field is left empty, the internal clock is used. > +- clock-names: The name of the external clock to be used. Valid values are: > + * sync: In sync mode, the internal clock is disabled and the frequency > + of the external clock signal establishes therate of data the rate > + collection and processing. See Fig 14 and 15 in the datasheet. > + The clock-frequency must be: > + * 3000 to 4500 Hz for adis1649x devices. > + * 700 to 2400 Hz for adis1648x devices. > + * pps: In Pulse Per Second (PPS) Mode, the rate of data collection and > + production is equal to the product of the external clock > + frequency and the scale factor in the SYNC_SCALE register, see > + Table 154 in the datasheet. > + The clock-frequency must be: > + * 1 to 128 Hz for adis1649x devices. > + * This mode is not supported by adis1648x devices. > + If this field is left empty, the internal clock is used. Should we say that both clocks and clock-names should be empty if that is the intent? > +- adi,ext-clk-pin: The DIOx line to be used as an external clock input. > + Valid values are: > + * DIO1 > + * DIO2 > + * DIO3 > + * DIO4 > + Each DIOx pin supports only one function at a time (data ready line > + selection or external clock input). When a single pin has two > + two assignments, the enable bit for the lower priority function > + automatically resets to zero (disabling the lower priority function). > + Data ready has highest priority. > + If this field is left empty, DIO2 is assigned as default external clock > + input pin. > > Example: > > @@ -46,4 +77,7 @@ Example: > interrupts = <25 IRQF_TRIGGER_FALLING>; > interrupt-parent = <&gpio>; > interrupt-names = "DIO2"; > + clocks = <&adis16495_sync>; > + clock-names = "sync"; > + adi,ext-clk-pin = "DIO1"; > };