Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp205325yba; Mon, 20 May 2019 07:22:59 -0700 (PDT) X-Google-Smtp-Source: APXvYqyf+E4WwyFmzPb+tMZrQhLS5djT7rLOhkOwmHnwuvfYfu32AkHWS9Ofe46fvfZ22DuhC2Ve X-Received: by 2002:a63:a1a:: with SMTP id 26mr74887618pgk.11.1558362179709; Mon, 20 May 2019 07:22:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558362179; cv=none; d=google.com; s=arc-20160816; b=o5rKZsVe3rDN5tiI9tiN2P4V4v2VakFwzfR2GFJXsq3gKzMVLhd7ZNZgNmIaI3IO3/ lfDaJFAWdfwUl7UUCqvz3PyfpJv2yaYjV95LMdBWoUBfLKaDFW22rcjbIczubDx6Ytla Lx8tQ9Yu+ib2pccn8qScex4jqxcKHDhEMBISHLFGsKzlU4Ob3wiJy8oE72gQTwWNTY2v cl8mWzFd+f/sED7HeMPwSREtGT9xXu9q/O1Y7cBdJx6c0RiWMjTzNIU1mKPCOY+JXfry 3erafgkmwCtC6psFtBuK7xlCz51MeVePvf+HOZWXXgf72NMVrrH/zlATRYywrLigFZhQ uz0g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=8N0PH3dZDygXmaG/OOoHIYOZvPVg+97Y5Hud9ub3XDs=; b=y2HvTmBa2L7NzsEQ77/Humnu43OgBerVT9J/wafSnfdGIbKAfqtDMvz4olTOV19pCo S8lrv32hSJwOXTIAWWBIwoyI4BGvC7OPQ00TEZvzSsdOc7rV7+cqAXUQ/pt37s16Zo6Q ZiuThkqA5cjcz1X8aDa35vx0h0Ql0iKdBYBKgbeidLGDz1odo4Jo+zhPTKvaTsNRL3Pr wr2250q1D72pD3mPh7XG1rXvRdf6K01Hoa52v47mtJBlx68cth8i8ARleaTjj2QBRM2a N9zJWsXoEsJpiPxqu2jHGZ1jZcUuf1X4DYqVazn1gmDYrtNj+7Jtvq7+fZ6tdarRQkPv 6Zxw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=XOfACpjn; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p12si19446697pll.103.2019.05.20.07.22.44; Mon, 20 May 2019 07:22:59 -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=@gmail.com header.s=20161025 header.b=XOfACpjn; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731894AbfETKqt (ORCPT + 99 others); Mon, 20 May 2019 06:46:49 -0400 Received: from mail-ot1-f68.google.com ([209.85.210.68]:35863 "EHLO mail-ot1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728000AbfETKqt (ORCPT ); Mon, 20 May 2019 06:46:49 -0400 Received: by mail-ot1-f68.google.com with SMTP id c3so12540896otr.3; Mon, 20 May 2019 03:46:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=8N0PH3dZDygXmaG/OOoHIYOZvPVg+97Y5Hud9ub3XDs=; b=XOfACpjnInC015ZclQO9HPkjk/rSY9yOcHeMHR4G32GvI7Q8qM8eT4EJ7a54FSUeF/ UGBogReReOS6mMgR2TIqjTgUCMrDnlwFYxxF/ZhOkJ/DepZnyodcMiXunZ+LUToAxZxZ fOkC48G/Gj3DJ72Ezh9xsoSyOGPEsA+KwYBAI6NNDhMVnPMeQYWloMMk1GgaMOwXQjoM qMrjvAs1onhQ7gQWsSB8fsqdEOaVaVT6Fvbez9THpIuFnr4NbP3PnXReNoeMr0cfeXSO TGDNiJX+NXtn8TNkPH2oZn/+MYuyM0h776Nxb5UHJzTw29JvrvVJRBb8N46iFrKU4OSJ LsFw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=8N0PH3dZDygXmaG/OOoHIYOZvPVg+97Y5Hud9ub3XDs=; b=oSWrVKFWbuO7tBrrM4l5SHJEd2zPGiNVnNctzXhbRrNbl/j191RnHqZvOsRFoJ0EcG WpCfq7LV1j9dft9zXqeA6CS3pJVMHbHuh10n2DY2mi4X6tuSX4/typM8ct6xbGM5M7GT SM35g2VM/LaJ0QrqqYqARx6UsRoiBP/hlp7R2daz1fISZqFlD3X4M/QuBg7TKQxqnjQs eycvitmoqe71bdW1j/Ed1wvccaru+jOZtTtNi16rnbbqkjm2f10cgkt3mgu9Xv3ZR6F/ fhG030y2Xl8G4+ngK01viM/JhjX5PiqoVEiBsfu0jUvRwo0r2hvS5/esgSbgmD6vKWbt GchQ== X-Gm-Message-State: APjAAAVflmGmC1fqa0tt9ldsXmPFJZ1FHaDFkkyJG6vQstcMFNs3EYVf JBKHL6C5yLnilPFkrIJQkGzcjeN3nUnutyJIUxk= X-Received: by 2002:a9d:6e96:: with SMTP id a22mr10979550otr.207.1558349208470; Mon, 20 May 2019 03:46:48 -0700 (PDT) MIME-Version: 1.0 References: <20190518215542.25140-1-lucasseikioshiro@gmail.com> <20190519122418.7722641b@archlinux> In-Reply-To: <20190519122418.7722641b@archlinux> From: Alexandru Ardelean Date: Mon, 20 May 2019 13:46:37 +0300 Message-ID: Subject: Re: [PATCH] dt-bindings: iio: accel: adxl372: switch to YAML bindings To: Jonathan Cameron Cc: Lucas Oshiro , Hartmut Knaack , Lars-Peter Clausen , Peter Meerwald-Stadler , Rob Herring , Mark Rutland , Stefan Popa , linux-iio@vger.kernel.org, devicetree@vger.kernel.org, LKML , kernel-usp@googlegroups.com, Rodrigo Ribeiro , Alexandru Ardelean Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, May 19, 2019 at 8:27 PM Jonathan Cameron wrote: > > On Sat, 18 May 2019 18:55:42 -0300 > Lucas Oshiro wrote: > > > Convert the old device tree documentation to yaml format. > > > > Signed-off-by: Lucas Oshiro > > Signed-off-by: Rodrigo Ribeiro > > Co-developed-by: Rodrigo Ribeiro > > --- > > > > Hello, > > We've added Stefan Popa as maintainer of the yaml documentation of this driver > > because we found through git that he was the author of the older documentation. > > Definitely going to need an Ack from Stefan for that ;) CC-ing my work-email There are some issues with it and mailing lists; I'll hopefully sort them out in the next weeks. Stefan is out-of-office. He'll take a look when he comes back. I'll add a few notes until then. I'd still like Stefan's ack to be final. > > I've not really gotten yaml formats into my head yet, but from a quick > look I think this is fine. I will however be looking for review from others > on these. > > Thanks, > > Jonathan > > > > > .../bindings/iio/accel/adi,adxl372.yaml | 66 +++++++++++++++++++ > > .../devicetree/bindings/iio/accel/adxl372.txt | 33 ---------- > > 2 files changed, 66 insertions(+), 33 deletions(-) > > create mode 100644 Documentation/devicetree/bindings/iio/accel/adi,adxl372.yaml > > delete mode 100644 Documentation/devicetree/bindings/iio/accel/adxl372.txt Also update the MAINTAINERS file when changing this. For reference, many things can be borrowed from the ADXL345, which is similar (from a dt-binding doc perspective only). > > > > diff --git a/Documentation/devicetree/bindings/iio/accel/adi,adxl372.yaml b/Documentation/devicetree/bindings/iio/accel/adi,adxl372.yaml > > new file mode 100644 > > index 000000000000..a6e2893d2ab1 > > --- /dev/null > > +++ b/Documentation/devicetree/bindings/iio/accel/adi,adxl372.yaml > > @@ -0,0 +1,66 @@ > > +# SPDX-License-Identifier: GPL-2.0 > > +%YAML 1.2 > > +--- > > +$id: http://devicetree.org/schemas/iio/accelerometers/adi,adxl372.yaml# > > +$schema: http://devicetree.org/meta-schemas/core.yaml# > > + > > +title: Analog Devices ADXL372 3-Axis, +/-(200g) Digital Accelerometer > > + > > +maintainers: > > + - Stefan Popa > > + > > +description: | > > + Analog Devices ADXL372 3-Axis, +/-(200g) Digital Accelerometer that supports > > + both I2C & SPI interfaces > > + https://www.analog.com/en/products/adxl372.html > > + > > +properties: > > + compatible: > > + enum: > > + - adi,adxl372 > > + > > + reg: > > + description: the I2C address or SPI chip select number for the device no need to add a description for reg it's a standard property > > + maxItems: 1 > > + > > + interrupts: > > + description: > > + interrupt mapping for IRQ as documented in > > + Documentation/devicetree/bindings/interrupt-controller/interrupts.txt no need to describe this either > > + maxItems: 1 > > + > > +required: > > + - compatible > > + - reg I think interrupts is also required. > > + > > +examples: > > + - | > > + #include > > + #include > > + i2c0 { > > + #address-cells = <1>; > > + #size-cells = <0>; > > + > > + /* Example for a I2C device node */ > > + accelerometer@53 { > > + compatible = "adi,adxl372"; > > + reg = <0x53>; > > + interrupt-parent = <&gpio>; > > + interrupts = <25 IRQ_TYPE_EDGE_FALLING>; > > + }; > > + }; > > + - | > > + #include > > + #include > > + spi0 { > > + #address-cells = <1>; > > + #size-cells = <0>; > > + > > + accelerometer@0 { > > + compatible = "adi,adxl372"; > > + reg = <0>; > > + spi-max-frequency = <1000000>; > > + interrupt-parent = <&gpio>; > > + interrupts = <25 IRQ_TYPE_EDGE_FALLING>; > > + }; > > + }; Rest looks good. > > diff --git a/Documentation/devicetree/bindings/iio/accel/adxl372.txt b/Documentation/devicetree/bindings/iio/accel/adxl372.txt > > deleted file mode 100644 > > index a289964756a7..000000000000 > > --- a/Documentation/devicetree/bindings/iio/accel/adxl372.txt > > +++ /dev/null > > @@ -1,33 +0,0 @@ > > -Analog Devices ADXL372 3-Axis, +/-(200g) Digital Accelerometer > > - > > -http://www.analog.com/media/en/technical-documentation/data-sheets/adxl372.pdf > > - > > -Required properties: > > - - compatible : should be "adi,adxl372" > > - - reg: the I2C address or SPI chip select number for the device > > - > > -Required properties for SPI bus usage: > > - - spi-max-frequency: Max SPI frequency to use > > - > > -Optional properties: > > - - interrupts: interrupt mapping for IRQ as documented in > > - Documentation/devicetree/bindings/interrupt-controller/interrupts.txt > > - > > -Example for a I2C device node: > > - > > - accelerometer@53 { > > - compatible = "adi,adxl372"; > > - reg = <0x53>; > > - interrupt-parent = <&gpio>; > > - interrupts = <25 IRQ_TYPE_EDGE_FALLING>; > > - }; > > - > > -Example for a SPI device node: > > - > > - accelerometer@0 { > > - compatible = "adi,adxl372"; > > - reg = <0>; > > - spi-max-frequency = <1000000>; > > - interrupt-parent = <&gpio>; > > - interrupts = <25 IRQ_TYPE_EDGE_FALLING>; > > - }; >