All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: linux-iio@vger.kernel.org, Hartmut Knaack <knaack.h@gmx.de>,
	Lars-Peter Clausen <lars@metafoo.de>,
	Peter Meerwald-Stadler <pmeerw@pmeerw.net>,
	devicetree@vger.kernel.org
Subject: Re: [PATCH 1/3 v2] iio: accel: bmc150-accel: Add DT bindings
Date: Sat, 14 Nov 2020 16:35:57 +0000	[thread overview]
Message-ID: <20201114163557.036363de@archlinux> (raw)
In-Reply-To: <20201112215451.2606136-1-linus.walleij@linaro.org>

On Thu, 12 Nov 2020 22:54:49 +0100
Linus Walleij <linus.walleij@linaro.org> 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 <linus.walleij@linaro.org>

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 <linus.walleij@linaro.org>
> +
> +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 <dt-bindings/interrupt-controller/irq.h>
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 <dt-bindings/interrupt-controller/irq.h>
> +    spi {
> +        #address-cells = <1>;
> +        #size-cells = <0>;
> +        accel@0 {
> +            compatible = "bosch,bma222";
> +            reg = <0>;
> +            spi-max-frequency = <10000000>;
> +        };
> +    };
> +...


      parent reply	other threads:[~2020-11-14 16:36 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-12 21:54 [PATCH 1/3 v2] iio: accel: bmc150-accel: Add DT bindings Linus Walleij
2020-11-12 21:54 ` [PATCH 2/3 v2] iio: accel: bmc150-accel: Add support for BMA222 Linus Walleij
2020-11-14 16:41   ` Jonathan Cameron
2020-11-12 21:54 ` [PATCH 3/3 v2] iio: accel: bmc150-accel: Add rudimentary regulator support Linus Walleij
2020-11-14 16:42   ` Jonathan Cameron
2020-11-14 16:35 ` Jonathan Cameron [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201114163557.036363de@archlinux \
    --to=jic23@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=knaack.h@gmx.de \
    --cc=lars@metafoo.de \
    --cc=linus.walleij@linaro.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=pmeerw@pmeerw.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.