Received: by 2002:a05:6a10:c7c6:0:0:0:0 with SMTP id h6csp1060222pxy; Sun, 1 Aug 2021 11:03:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxOB3lGQ7wdjp8Wc6wc9Fi9fWdiZprL6j3BXECDdNhifXgFRM1kHFGbaToCRypVIE5Fk+cZ X-Received: by 2002:a05:6638:1af:: with SMTP id b15mr10961266jaq.124.1627841027590; Sun, 01 Aug 2021 11:03:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627841027; cv=none; d=google.com; s=arc-20160816; b=us+KF9E+9It0AJtlK32WoLq5Sg1rTopM8ICIaLEQfUOMwRl3jm1+omyTh9By8o+hgJ faeIESYAr0TNYl3oX5OJGjaE8DVkWkOxFX/Rb55sRUk0fEFq9ziEFTqijfaXiasIubIC rQaFhURHTH/as/hshWwHuEBGajPGM2GPQaD2bxmWO7S+grGQWTaXkan8SSpucOi7PBii QHuODAFGgbbBuVU8iRSRP4jBT4uEupRToYfaG4UehdZpi8EPQRkq0bOaw8yszBXDDxwR BiEMofODhccURtFNDamF9ev84JzCPX30gKmaeUlgUSHa6arogGWdrQGAEX3Swc3l2GBq c2ew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=TB8sprpScZYLAulyiMK/ihO+ICngLZVlMbHhURcDPaI=; b=ibSWKFNRjGYtkb4MT2KqPatJ3AWhGa7qsy5HonBkC/UpYjfBv70pqNvBt961zzeV/F qQoRxxinMyYZtCRVfPil0OSwN+0dswdmMWnQbDfiAfeGFhOctb0KtyNTRLE31K1yncx/ F9x9fHvq2wOyBxlDsjnrZ0EBMHeg2MB50vVEUEUAtR5Swb7axzzH3YVJgQMYg6h3ptvy IirMIA+4p7eRN2Yadz6pKVOAbpY8rR6IxQwVpAKRLScl9oC0Rk1z1YUzYjL/RejGr+3o wWiTZs/He2yfpQBURsrNbPNmbfcqfCqFWykD658r7ryuBCfC9VqLnaBwlWNcg+C+/F1j iSbw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id y16si9619545ilm.7.2021.08.01.11.03.36; Sun, 01 Aug 2021 11:03:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S230421AbhHASBz convert rfc822-to-8bit (ORCPT + 99 others); Sun, 1 Aug 2021 14:01:55 -0400 Received: from mail.kernel.org ([198.145.29.99]:58612 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230146AbhHASBy (ORCPT ); Sun, 1 Aug 2021 14:01:54 -0400 Received: from jic23-huawei (cpc108967-cmbg20-2-0-cust86.5-4.cable.virginm.net [81.101.6.87]) (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 D86B160E76; Sun, 1 Aug 2021 18:01:43 +0000 (UTC) Date: Sun, 1 Aug 2021 19:04:22 +0100 From: Jonathan Cameron To: Lucas Stankus Cc: lars@metafoo.de, Michael.Hennerich@analog.com, robh+dt@kernel.org, Dragos.Bogdan@analog.com, Darius.Berghe@analog.com, linux-iio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/2] dt-bindings: iio: accel: Add binding documentation for ADXL313 Message-ID: <20210801190422.28fd5334@jic23-huawei> In-Reply-To: <1e652b88a367824e58fb71896b4a660204bd7a88.1627709571.git.lucas.p.stankus@gmail.com> References: <1e652b88a367824e58fb71896b4a660204bd7a88.1627709571.git.lucas.p.stankus@gmail.com> X-Mailer: Claws Mail 4.0.0 (GTK+ 3.24.30; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 8BIT Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, 31 Jul 2021 17:36:31 -0300 Lucas Stankus wrote: > Add device tree binding documentation for ADXL313 3-axis accelerometer. > > Signed-off-by: Lucas Stankus Hi Lucas, A few minor requests for additions inline, so we include everything that is likely to be used by the driver in the longer term. > --- > .../bindings/iio/accel/adi,adxl313.yaml | 75 +++++++++++++++++++ > 1 file changed, 75 insertions(+) > create mode 100644 Documentation/devicetree/bindings/iio/accel/adi,adxl313.yaml > > diff --git a/Documentation/devicetree/bindings/iio/accel/adi,adxl313.yaml b/Documentation/devicetree/bindings/iio/accel/adi,adxl313.yaml > new file mode 100644 > index 000000000000..31f11d7eaaae > --- /dev/null > +++ b/Documentation/devicetree/bindings/iio/accel/adi,adxl313.yaml > @@ -0,0 +1,75 @@ > +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/iio/accel/adi,adxl313.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: Analog Devices ADXL313 3-Axis Digital Accelerometer > + > +maintainers: > + - Lucas Stankus > + > +description: | > + Analog Devices ADXL313 3-Axis Digital Accelerometer that supports > + both I2C & SPI interfaces. > + https://www.analog.com/en/products/adxl313.html > + > +properties: > + compatible: > + enum: > + - adi,adxl313 > + > + reg: > + maxItems: 1 > + > + spi-3wire: true > + > + spi-cpha: true > + > + spi-cpol: true > + > + spi-max-frequency: true > + > + interrupts: > + maxItems: 2 As board designers have an annoying habit of wiring up the second interrupt only, please also provide interrupt-names so we can know which one is connected if it's only one. From a quick glance at the datasheet, I see this also has two powersupplies. Please include vddio-supply vs-supply - annoyingly the s just stands for supply, but v-supply seems a bit to minimal. > + > +required: > + - compatible > + - reg > + > +additionalProperties: false > + > +examples: > + - | > + #include > + #include > + i2c0 { > + #address-cells = <1>; > + #size-cells = <0>; > + > + /* Example for a I2C device node */ > + accelerometer@53 { > + compatible = "adi,adxl313"; > + reg = <0x53>; > + interrupt-parent = <&gpio0>; > + interrupts = <0 IRQ_TYPE_LEVEL_HIGH>; > + }; > + }; > + - | > + #include > + #include > + spi { > + #address-cells = <1>; > + #size-cells = <0>; > + > + /* Example for a SPI device node */ > + accelerometer@0 { > + compatible = "adi,adxl313"; > + reg = <0>; > + spi-max-frequency = <5000000>; > + spi-cpol; > + spi-cpha; > + interrupt-parent = <&gpio0>; > + interrupts = <0 IRQ_TYPE_LEVEL_HIGH>; > + }; > + };