Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp4002430ybe; Mon, 9 Sep 2019 02:36:00 -0700 (PDT) X-Google-Smtp-Source: APXvYqxNjufmoSoOev6chJvKLcNzS/g0YdZpQxZ47RZq3PqzWDUKPiF1undFUIdFuC4S8FAaLysQ X-Received: by 2002:a50:b1cf:: with SMTP id n15mr22592262edd.172.1568021760496; Mon, 09 Sep 2019 02:36:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568021760; cv=none; d=google.com; s=arc-20160816; b=eL8Q5MpCQ162eCZY6xl9rbxMBbcYiVZ7BhPKqeeKoJzX8QqegIGNtppKxd/RWJJxTR yxkodpgO5hDypoTT1jjfHqf0YYoXiV536SSsTQP+K+gdwlq+QFuyTCsBP4UrG1Cmajt/ 8YHMIC1hKfGqZG+ANgECOJxznLHOv0ZtN7LHGqGaG8hjj2V5wpcEjfnUP4pMSriz5vEr qVzINRmSwAWrIxBnfxDtq9AxjGstJxm6pvGWHwlAkePdzeu0jUlxOnBPxiql4LQ+XTdm A5i34XgNoQAaKvP/hf0zcik0OOPLPRbgAGXBP0gjh2H4NFMtb8jxkymknuCgLQx1qkNR yOOg== 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 :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=TwhS22OaDQayBaH2woLyTTDrO/xM4TuZmkHXxfCSd4g=; b=M5UoK/+oR9C70Zv8fkj7aLpIZcQpun9Y1TPumDKsXMxe77sk/UedfPpyjcS8ja/bSf 6oAM5ZtNq7/WRwNBaJHGa3KUUIDBmBeVShYcr0E2z6luIcHs807mYAx4hKxn39p3e/M+ 0g/7+xWnrCc4zIAuMlE1j/6izydsm/GcN8s0x8zIntRkkF6IXpvdY4axjvpSjRIPa41A ewGIk316CxsIB4k0w8m1vZCLALDj5WlUXYn2JLTJcWXW9vcRnCkiLi5+aJAcPzM9t9io qw3THNvP7Is6zP4/ACrZZpfX0mdRYb8WsPFyQQkSuFn6LFJRGdA9k4TXdhXiGoDIgr10 gpVQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=VaQbGPvu; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 22si7805935eds.79.2019.09.09.02.35.36; Mon, 09 Sep 2019 02:36:00 -0700 (PDT) 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; dkim=pass header.i=@kernel.org header.s=default header.b=VaQbGPvu; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728578AbfIHKwe (ORCPT + 99 others); Sun, 8 Sep 2019 06:52:34 -0400 Received: from mail.kernel.org ([198.145.29.99]:48378 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728310AbfIHKwe (ORCPT ); Sun, 8 Sep 2019 06:52:34 -0400 Received: from archlinux (cpc149474-cmbg20-2-0-cust94.5-4.cable.virginm.net [82.4.196.95]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id B8897206BB; Sun, 8 Sep 2019 10:52:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1567939952; bh=nSk+dg79VdbUQ4naEBFxS3SSqiViSa6cJTOoCuPqFyk=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=VaQbGPvuiox2ZtggKtLK+s7qOJB0c5CLKynfGeeyasnlTV9p+kV1fw7u2CwJb3n7N uTabPwHrel9xNfrunXbNeMXIqJBD2VgBsQaHSKEIL3nQVombqD8ibtvflJjJ5va1FS E6eTiM3sT3+CjfNh9iyBwGH8xp36tHEyZMMLDHGg= Date: Sun, 8 Sep 2019 11:52:27 +0100 From: Jonathan Cameron To: Marcelo Schmitt Cc: Rodrigo Carvalho , Lars-Peter Clausen , Michael Hennerich , Stefan Popa , Hartmut Knaack , Peter Meerwald-Stadler , alexandru.ardelean@analog.com, linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-usp@googlegroups.com Subject: Re: [PATCH 1/2] dt-bindings: iio: accel: add binding documentation for ADIS16240 Message-ID: <20190908115227.65046733@archlinux> In-Reply-To: <20190902171417.qbj7rwi43tr77mr5@smtp.gmail.com> References: <20190902005938.7734-1-rodrigorsdc@gmail.com> <20190902171417.qbj7rwi43tr77mr5@smtp.gmail.com> X-Mailer: Claws Mail 3.17.4 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 2 Sep 2019 14:14:18 -0300 Marcelo Schmitt wrote: > Hi Rodrigo, > > This dt doc looks overal fine IMHO. > I would just add some inline comments about the cpha and cpol > properties. > > On 09/01, Rodrigo Carvalho wrote: > > This patch add device tree binding documentation for ADIS16240. > > > > Signed-off-by: Rodrigo Ribeiro Carvalho > > --- > > I have doubt about what maintainer I may to put in that documentation. I > > put Alexandru as maintainer because he reviewed my last patch on this > > driver, so I think that he is a good candidate. > > .../bindings/iio/accel/adi,adis16240.yaml | 55 +++++++++++++++++++ > > 1 file changed, 55 insertions(+) > > create mode 100644 Documentation/devicetree/bindings/iio/accel/adi,adis16240.yaml > > > > diff --git a/Documentation/devicetree/bindings/iio/accel/adi,adis16240.yaml b/Documentation/devicetree/bindings/iio/accel/adi,adis16240.yaml > > new file mode 100644 > > index 000000000000..08019b51611c > > --- /dev/null > > +++ b/Documentation/devicetree/bindings/iio/accel/adi,adis16240.yaml > > @@ -0,0 +1,55 @@ > > +# SPDX-License-Identifier: GPL-2.0 > > +%YAML 1.2 > > +--- > > +$id: http://devicetree.org/schemas/iio/accel/adi,adis16240.yaml# > > +$schema: http://devicetree.org/meta-schemas/core.yaml# > > + > > +title: ADIS16240 Programmable Impact Sensor and Recorder driver > > + > > +maintainers: > > + - Alexandru Ardelean > > + > > +description: | > > + ADIS16240 Programmable Impact Sensor and Recorder driver that supports > > + SPI interface. > > + https://www.analog.com/en/products/adis16240.html > > + > > +properties: > > + compatible: > > + enum: > > + - adi,adis16240 > > + > > + reg: > > + maxItems: 1 > > + > > + spi-cpha: true > > + > > + spi-cpol: true > Boolean properties don't require to be explicitly set. It would also be > nice to add a description pointing to the spi-bus documentation. Like > this: > > spi-cpha: > description: | > See Documentation/devicetree/bindings/spi/spi-bus.txt > maxItems: 1 > > spi-cpol: > description: | > See Documentation/devicetree/bindings/spi/spi-bus.txt > maxItems: 1 > > As far as I know, spi-cpol and spi-cpha stand for SPI chip polarity and > SPI chip phase respectively. By default, it is assumed that SPI > input/output data is available at uprising clock edges, however, some > chips may work with different configuration (taking input data and/or > push it out in falling edges). I'm not 100% sure but, from what I've > seen on IIO, cpol is set to invert the input/output logic (making IO be > taken on falling edges) while cpha is usually set when MISO valid out > data is available on SCLK falling edge. If anyone has more comments > about this please, add them here, I'm curious about it. :) > They may well be constant for a given device (some will cope with several combinations). So the binding should reflect if they 'must' be set. Adding the cross reference is indeed nice. Jonathan > > + > > + interrupts: > > + maxItems: 1 > > + > > +required: > > + - compatible > > + - reg > > + - interrupts > > + > > +examples: > > + - | > > + #include > > + #include > > + spi0 { > > + #address-cells = <1>; > > + #size-cells = <0>; > > + > > + /* Example for a SPI device node */ > > + accelerometer@0 { > > + compatible = "adi,adis16240"; > > + reg = <0>; > > + spi-max-frequency = <2500000>; > > + spi-cpol; > > + spi-cpha; > > + interrupt-parent = <&gpio0>; > > + interrupts = <0 IRQ_TYPE_LEVEL_HIGH>; > > + }; > > + }; > > -- > > 2.23.0.rc1 > > > > -- > > You received this message because you are subscribed to the Google Groups "Kernel USP" group. > > To unsubscribe from this group and stop receiving emails from it, send an email to kernel-usp+unsubscribe@googlegroups.com. > > To view this discussion on the web visit https://groups.google.com/d/msgid/kernel-usp/20190902005938.7734-1-rodrigorsdc%40gmail.com.