Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp906163pxt; Fri, 6 Aug 2021 17:35:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxtWyM/nWMDj1+y8NVYRpBIUhVuEj38NF3iOAAdFunCl0iS9sBU0KDZpihqI7Uxwgsp1MwE X-Received: by 2002:a02:b0d1:: with SMTP id w17mr11347754jah.1.1628296535337; Fri, 06 Aug 2021 17:35:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628296535; cv=none; d=google.com; s=arc-20160816; b=Y3zs5l2Ft3cz82NWrIwrNA7i9KQDq/Q9mdRz4LXj+59EzJ8t2Su+r87HpglI6jl6+6 VDw6RNFF9A9DxRx4nVLy4114PAZsIi8sZv1iuJ8kV+BeiKugvKCx8ReGVe4i+RBBto1j WTOmwrdF17Uzx/0wek2uU6H87T12qZeoHqkZFpYXJSsv+oVz45lybcMK2W/R8weDXscr PrQ2AFBHgZi6bs90LIugG3lPjUtUEFsW9iwQ6lLBinXB4wrhFvscXK6cBOBbF6gtnkzj C/6qO7lmQG325sUg4AoPQtF+GqGeCmnLSmnrvKiPnMkBSpiinGi+yQf9hP2BukOmQQW/ EYag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=VTNtwAA6+fkrShAVi/ylsugSqwM1XL4+R4zdkmKyVg8=; b=If0+UVUv+y6a+kmWO08rI8yd1A7lViZKLZHugZmlAa1zpYhNoCoBo/y985qecQJiw0 bpTB+Un3a9dKSShSw59Tkqh5ZmUwHot1Xz2p40pvbuSyokAhvubOAmZT06Vx5B2nXbTg HqjG8rTB08bBx9GnGQmfIxsSGhkQWFTOwM7DSf7cEnjRRamIl/fA7M700hftoeni72k7 Cu31H3CnCna3dJyq/T6aP3YSszOKKbngGc+nNHPrfsdGEHLYQrTvRAz+18Xnz0CWbPMM NoQKg85nWK+S/a07QWvJ+zdYyw2IpawNTHWAO8REkoFyqHzm4hxyVDLWbbU4fQKgvqqF Tvyg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=tWhSMQsZ; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r3si10550580jan.7.2021.08.06.17.35.23; Fri, 06 Aug 2021 17:35:35 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=tWhSMQsZ; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229644AbhHGAei (ORCPT + 99 others); Fri, 6 Aug 2021 20:34:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52674 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229379AbhHGAeh (ORCPT ); Fri, 6 Aug 2021 20:34:37 -0400 Received: from mail-ot1-x32e.google.com (mail-ot1-x32e.google.com [IPv6:2607:f8b0:4864:20::32e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7EE0AC0613CF; Fri, 6 Aug 2021 17:34:20 -0700 (PDT) Received: by mail-ot1-x32e.google.com with SMTP id c2-20020a0568303482b029048bcf4c6bd9so10852760otu.8; Fri, 06 Aug 2021 17:34:20 -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=VTNtwAA6+fkrShAVi/ylsugSqwM1XL4+R4zdkmKyVg8=; b=tWhSMQsZdYTm2PfTbCPXFLTXFEOxVhlQ92aCucWcfRandPJ7sgmgkjiHuCsz+GXA8W RdqyBJA8+XWmtm7gnJcic50gqS4ngChxcsWDDhW1nuHWIOerrCrnduzF0CPrSmYhKZaF gKQAsdAPC+G+4SLkyMHKQqpAVLcTUWJtOc/eongz5xRcrjcGsC3mhjzO8gwUiTtSKyQk ozDlP+vx4kRPGwZrE3KQEpYCwsL9NwuYE9EuKRFL2GX9cBY4IXX01+ewAjlRle90R2Np foFx8HnuJKgcSh+OUaOa6ukg9YELQ8PgY2BdAA+b/XGPGozTXqJbd34J4I8K9kyevGK8 rS6w== 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=VTNtwAA6+fkrShAVi/ylsugSqwM1XL4+R4zdkmKyVg8=; b=ZXtnb9esHLus+41twMIem+vRDY/W3nLGWTk+YkdazJj0rMCp5WcwnfIkdPsnjtaPb/ f9eiQi3zXT8pR7pnKtjOvE8dDptFcm96mo9e+o7wksn1JW0tCecHC+p5CidsIFM8sfL3 hcNtCRNNY+F0G4uVof5uCi9r20rH/p34pJWWMApByswV5ZbpppxzMDmhMcodf+IEaMJh xRHX2xYnaY7j+WCmpNa2rBZFtEG+VkrDiUx2WxAcAoAPbc5yV3w4FW1bpAW4hLHh0k4/ inYf3lHcvPOhQC3mnCYAdYHYUBY95Lll37oHuPwmNf1ZIsnHnk1PvXDQHIVJdqL6pG7f PB7w== X-Gm-Message-State: AOAM530bMUic+dg0v241lfq/iF1PoxuUhgszHins0OdKfsrHg81ZXA0O mdzPII7YZpXeIAHRQSuu0y7AnTPt+SG+Om5yb6I= X-Received: by 2002:a9d:d86:: with SMTP id 6mr9519349ots.362.1628296459950; Fri, 06 Aug 2021 17:34:19 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Lucas Stankus Date: Fri, 6 Aug 2021 21:33:44 -0300 Message-ID: Subject: Re: [PATCH v2 1/2] dt-bindings: iio: accel: Add binding documentation for ADXL313 To: Rob Herring Cc: Lars-Peter Clausen , "Hennerich, Michael" , Jonathan Cameron , "Bogdan, Dragos" , "Berghe, Darius" , linux-iio , devicetree , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Aug 6, 2021 at 3:10 PM Rob Herring wrote: > > On Thu, Aug 05, 2021 at 03:29:37AM -0300, Lucas Stankus wrote: > > Add device tree binding documentation for ADXL313 3-axis accelerometer. > > > > Signed-off-by: Lucas Stankus > > --- > > .../bindings/iio/accel/adi,adxl313.yaml | 90 +++++++++++++++++++ > > 1 file changed, 90 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..fea03b6790f3 > > --- /dev/null > > +++ b/Documentation/devicetree/bindings/iio/accel/adi,adxl313.yaml > > @@ -0,0 +1,90 @@ > > +# 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 > > These 3 generally shouldn't be needed, but can be set from the driver. > If they are valid, is any combination of them really valid? > Only the 3wire is optional, both cpha and cpol are required for proper spi connection. > > + > > + spi-max-frequency: true > > + > > + vs-supply: > > + description: Regulator that supplies power to the accelerometer > > + > > + vdd-supply: > > + description: Regulator that supplies the digital interface supply voltage > > + > > + interrupts: > > + maxItems: 2 > > This means there must be 2 entries. If 1 is valid, you need 'minItems'. > I'll add 'minItems' for the v3 then, thanks! > > + > > + interrupt-names: > > + maxItems: 2 > > You need 'minItems' too to fix the error. > Thank you again and sorry for not catching that error before submitting. > > + items: > > + enum: > > + - INT1 > > + - INT2 > > + > > +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>; > > + interrupt-names = "INT1"; > > + }; > > + }; > > + - | > > + #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>; > > + interrupt-names = "INT1"; > > + }; > > + }; > > -- > > 2.32.0 > > > >