All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jonathan Cameron <Jonathan.Cameron@Huawei.com>
To: Tomas Melin <tomas.melin@vaisala.com>
Cc: <jic23@kernel.org>, <devicetree@vger.kernel.org>,
	<linux-iio@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/2] dt-bindings: iio: accel: Add SCA3300 documentation
Date: Mon, 12 Apr 2021 11:29:15 +0100	[thread overview]
Message-ID: <20210412112915.00006130@Huawei.com> (raw)
In-Reply-To: <20210412075056.56301-2-tomas.melin@vaisala.com>

On Mon, 12 Apr 2021 10:50:55 +0300
Tomas Melin <tomas.melin@vaisala.com> wrote:

> initial DT bindings for Murata SCA3300 Accelerometer.
> 
> Signed-off-by: Tomas Melin <tomas.melin@vaisala.com>
Hi Tomas.
> ---
>  .../bindings/iio/accel/sca3300.yaml           | 51 +++++++++++++++++++
>  1 file changed, 51 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/iio/accel/sca3300.yaml
> 
> diff --git a/Documentation/devicetree/bindings/iio/accel/sca3300.yaml b/Documentation/devicetree/bindings/iio/accel/sca3300.yaml
> new file mode 100644
> index 000000000000..32fe4b647cd0
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/iio/accel/sca3300.yaml

Vendor prefix on the filename please.

> @@ -0,0 +1,51 @@
> +# SPDX-License-Identifier: (GPL-2.0-only)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/iio/accel/sca3300.yaml#

Vendor prefix will end up here as well.

> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Murata SCA3300 Accelerometer
> +
> +description: |
> +  3-axis industrial accelerometer with digital SPI interface
> +  https://www.murata.com/en-global/products/sensor/accel/sca3300
> +
> +maintainers:
> +  - Tomas Melin <tomas.melin@vaisala.com>
> +
> +properties:
> +  compatible:
> +    enum:
> +      - murata,sca3300
> +
> +  reg:
> +    maxItems: 1
> +    description: SPI chip select number according to the general SPI bindings

No need to give a description as this is the same for all SPI devices.

> +
> +  spi-max-frequency:
> +    maximum: 8000000
> +
> +  murata,opmode:
> +    description: Accelerometer operation mode as described in datasheet (MODE)
> +    $ref: /schemas/types.yaml#/definitions/uint32

This needs a proper description here.  Also perhaps worth noting that we
very rarely let mode related things like this into DT. They are always almost
something that is policy rather than hardware description and so belong somewhere
userspace can control them.

In this particular case, looks like a simple range control.   That belongs in 
userspace via _scale attributes.

> +
> +required:
> +  - compatible
> +  - reg
> +  - murata,opmode
> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +    spi {
> +        #address-cells = <1>;
> +        #size-cells = <0>;
> +        sca3300@0 {
> +            compatible = "murata,sca3300";
> +            reg = <0x0>;
> +            spi-max-frequency = <4000000>;
> +            murata,opmode = <4>;
> +        };
> +    };
> +...


  reply	other threads:[~2021-04-12 10:30 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-12  7:50 Add support for Murata SCA3300 Accelerometer Tomas Melin
2021-04-12  7:50 ` [PATCH 1/2] dt-bindings: iio: accel: Add SCA3300 documentation Tomas Melin
2021-04-12 10:29   ` Jonathan Cameron [this message]
2021-04-12 21:02   ` Rob Herring
2021-04-12  7:50 ` [PATCH 2/2] iio: accel: Add driver for Murata SCA3300 accelerometer Tomas Melin
2021-04-12 11:08   ` Jonathan Cameron
2021-04-15  8:41     ` Tomas Melin
2021-04-16 12:17       ` Tomas Melin
2021-04-16 12:21         ` Tomas Melin
2021-04-18 10:03           ` Jonathan Cameron
2021-04-19 13:34             ` Tomas Melin
2021-04-19 19:45               ` Jonathan Cameron
2021-04-19 20:16                 ` Jonathan Cameron
2021-04-20  8:12                   ` Alexandru Ardelean

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=20210412112915.00006130@Huawei.com \
    --to=jonathan.cameron@huawei.com \
    --cc=devicetree@vger.kernel.org \
    --cc=jic23@kernel.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tomas.melin@vaisala.com \
    /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.