From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-11.6 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_2 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 85EE3C61DD8 for ; Sat, 14 Nov 2020 16:36:03 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 414522073C for ; Sat, 14 Nov 2020 16:36:03 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="tIItlQCD" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726522AbgKNQgC (ORCPT ); Sat, 14 Nov 2020 11:36:02 -0500 Received: from mail.kernel.org ([198.145.29.99]:57274 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726265AbgKNQgC (ORCPT ); Sat, 14 Nov 2020 11:36:02 -0500 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 5EFCE206E3; Sat, 14 Nov 2020 16:36:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1605371761; bh=WkHWgBBPxf1+qo5Z6uRo4fvwix8WXj08XCmlNflxXhE=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=tIItlQCDc1XPJebLjUxoeplcK4LT7J8rgx9i/5JGTP1NXtGzCGlnEjdtWzCQJj8Qe X0dOxM5EIwo7smKGaw83FxWpbiGAR/Z+KuZ3EFFGM+WU8f9AGS69y/8cVw2Yww2r5t 6hx0o6hdM14eUcsMPDosvsYzD5qprnVojz1J+c4c= Date: Sat, 14 Nov 2020 16:35:57 +0000 From: Jonathan Cameron To: Linus Walleij Cc: linux-iio@vger.kernel.org, Hartmut Knaack , Lars-Peter Clausen , Peter Meerwald-Stadler , devicetree@vger.kernel.org Subject: Re: [PATCH 1/3 v2] iio: accel: bmc150-accel: Add DT bindings Message-ID: <20201114163557.036363de@archlinux> In-Reply-To: <20201112215451.2606136-1-linus.walleij@linaro.org> References: <20201112215451.2606136-1-linus.walleij@linaro.org> X-Mailer: Claws Mail 3.17.7 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org On Thu, 12 Nov 2020 22:54:49 +0100 Linus Walleij wrote: > These accelerometers have bindings used in the kernel and > several device trees but no proper bindings documentation. > Add it. > > Also add a compatible for the BMA222 that I am right now > adding support for in the driver. > > Cc: devicetree@vger.kernel.org > Signed-off-by: Linus Walleij One little note inline on consistency. Jonathan > --- > ChangeLog v1->v2: > - Rename to simply bosch,bma255.yaml after one of the > common accelerometers. > - Specify that the SPI uses a 4-wire interface. > - Specify maximum SPI clock frequency to 10MHz. (Checked > all the datasheets.) > --- > .../bindings/iio/accel/bosch,bma255.yaml | 73 +++++++++++++++++++ > 1 file changed, 73 insertions(+) > create mode 100644 Documentation/devicetree/bindings/iio/accel/bosch,bma255.yaml > > diff --git a/Documentation/devicetree/bindings/iio/accel/bosch,bma255.yaml b/Documentation/devicetree/bindings/iio/accel/bosch,bma255.yaml > new file mode 100644 > index 000000000000..5f48bdcf382c > --- /dev/null > +++ b/Documentation/devicetree/bindings/iio/accel/bosch,bma255.yaml > @@ -0,0 +1,73 @@ > +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/iio/accel/bosch,bma255.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: Bosch BMA255 and Similar Accelerometers > + > +maintainers: > + - Linus Walleij > + > +description: > + 3 axis accelerometers with varying range and I2C or SPI > + 4-wire interface. > + > +properties: > + compatible: > + enum: > + - bosch,bmc150 > + - bosch,bmi055 > + - bosch,bma255 > + - bosch,bma250e > + - bosch,bma222 > + - bosch,bma222e > + - bosch,bma280 > + > + reg: > + maxItems: 1 > + > + vdd-supply: true > + vddio-supply: true > + > + interrupts: > + maxItems: 1 > + > + mount-matrix: > + description: an optional 3x3 mounting rotation matrix. > + > + spi-max-frequency: > + maximum: 10000000 > + > +required: > + - compatible > + - reg > + > +additionalProperties: false > + > +examples: > + - | > + i2c { > + #include Off the top of my head I'm not sure it matters, but this placement of the include is inconsistent with the spi case below. Move it outside the i2c { If that's all that comes up in this round I'll do it whilst applying. > + #address-cells = <1>; > + #size-cells = <0>; > + accelerometer@8 { > + compatible = "bosch,bma222"; > + reg = <0x08>; > + vddio-supply = <&vddio>; > + vdd-supply = <&vdd>; > + interrupts = <57 IRQ_TYPE_EDGE_FALLING>; > + }; > + }; > + - | > + # include > + spi { > + #address-cells = <1>; > + #size-cells = <0>; > + accel@0 { > + compatible = "bosch,bma222"; > + reg = <0>; > + spi-max-frequency = <10000000>; > + }; > + }; > +...