devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: linux-iio@vger.kernel.org, Rob Herring <robh+dt@kernel.org>
Cc: devicetree@vger.kernel.org,
	Jonathan Cameron <Jonathan.Cameron@huawei.com>,
	Joachim Eastwood <manabian@gmail.com>
Subject: [PATCH 3/6] dt-bindings:iio:accel:fsl,mma7455 binding doc
Date: Thu,  1 Apr 2021 18:41:09 +0100	[thread overview]
Message-ID: <20210401174112.320497-4-jic23@kernel.org> (raw)
In-Reply-To: <20210401174112.320497-1-jic23@kernel.org>

From: Jonathan Cameron <Jonathan.Cameron@huawei.com>

Binding documentation for this driver was missing.
Note that the binding and some in tree dts files specifiy interrupts
etc but the driver is fairly simple and does not yet make use of them.

Listed both Joachim and myself as maintainers for this binding on basis
it's Joachim's driver but I don't want to volunteer Joachim too
strongly to look after this doc.

Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Cc: Joachim Eastwood <manabian@gmail.com>
---
 .../bindings/iio/accel/fsl,mma7455.yaml       | 82 +++++++++++++++++++
 1 file changed, 82 insertions(+)

diff --git a/Documentation/devicetree/bindings/iio/accel/fsl,mma7455.yaml b/Documentation/devicetree/bindings/iio/accel/fsl,mma7455.yaml
new file mode 100644
index 000000000000..7c8f8bdc2333
--- /dev/null
+++ b/Documentation/devicetree/bindings/iio/accel/fsl,mma7455.yaml
@@ -0,0 +1,82 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/iio/accel/fsl,mma7455.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Freescale MMA7455 and MMA7456 three axis accelerometers
+
+maintainers:
+  - Joachim Eastwood <manabian@gmail.com>
+  - Jonathan Cameron <jic23@kernel.org>
+
+description:
+  Devices support both SPI and I2C interfaces.
+
+properties:
+  compatible:
+    enum:
+      - fsl,mma7455
+      - fsl,mma7456
+  reg:
+    maxItems: 1
+
+  avdd-supply: true
+  vddio-supply: true
+
+  interrupts:
+    minItems: 1
+    maxItems: 2
+
+  interrupt-names:
+    description:
+      Data ready is only available on INT1, but events can use either or
+      both pins.  If not specified, first element assumed to correspond
+      to INT1 and second (where present) to INT2.
+    minItems: 1
+    maxItems: 2
+    items:
+      enum:
+        - "INT1"
+        - "INT2"
+
+  spi-max-frequency: true
+
+required:
+  - compatible
+  - reg
+
+additionalProperties: false
+
+examples:
+  - |
+    # include <dt-bindings/interrupt-controller/irq.h>
+    i2c {
+        #address-cells = <1>;
+        #size-cells = <0>;
+
+        accelerometer@18 {
+            compatible = "fsl,mma7455";
+            reg = <0x18>;
+            vddio-supply = <&iovdd>;
+            avdd-supply = <&avdd>;
+            interrupts = <57 IRQ_TYPE_EDGE_FALLING>, <58 IRQ_TYPE_EDGE_FALLING>;
+            interrupt-names = "INT2", "INT1";
+        };
+    };
+  - |
+    # include <dt-bindings/interrupt-controller/irq.h>
+    spi {
+        #address-cells = <1>;
+        #size-cells = <0>;
+        accelerometer@0 {
+            compatible = "fsl,mma7456";
+            reg = <0>;
+            spi-max-frequency = <10000000>;
+            vddio-supply = <&iovdd>;
+            avdd-supply = <&avdd>;
+            interrupts = <57 IRQ_TYPE_EDGE_FALLING>;
+            interrupt-names = "INT1";
+        };
+    };
+...
-- 
2.31.1


  parent reply	other threads:[~2021-04-01 17:52 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-01 17:41 [PATCH 0/6] dt-bindings: Add some missing IIO related binding docs Jonathan Cameron
2021-04-01 17:41 ` [PATCH 1/6] dt-bindings:iio:accel:adis16201 and adis16209 bindings Jonathan Cameron
2021-04-09 14:32   ` Rob Herring
2021-04-01 17:41 ` [PATCH 2/6] dt-bindings:iio:accel:bosch,bma220 device tree binding documentation Jonathan Cameron
2021-04-09 14:33   ` Rob Herring
2021-04-01 17:41 ` Jonathan Cameron [this message]
2021-04-09 14:34   ` [PATCH 3/6] dt-bindings:iio:accel:fsl,mma7455 binding doc Rob Herring
2021-04-01 17:41 ` [PATCH 4/6] dt-bindings:trivial-devices: Add memsic,mxc4005/mxc6255/mxc6655 entries Jonathan Cameron
2021-04-09 14:35   ` Rob Herring
2021-04-01 17:41 ` [PATCH 5/6] dt-bindings:trivial-devices: Add sensortek,stk8312 and sensortek,s8ba50 Jonathan Cameron
2021-04-09 14:35   ` Rob Herring
2021-04-01 17:41 ` [PATCH 6/6] dt-bindings:iio:adc:adi,ad7298 document bindings Jonathan Cameron
2021-04-09 14:37   ` Rob Herring
2021-04-24 17:18 ` [PATCH 0/6] dt-bindings: Add some missing IIO related binding docs Jonathan Cameron

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=20210401174112.320497-4-jic23@kernel.org \
    --to=jic23@kernel.org \
    --cc=Jonathan.Cameron@huawei.com \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=manabian@gmail.com \
    --cc=robh+dt@kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).