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>
Subject: [PATCH 2/6] dt-bindings:iio:accel:bosch,bma220 device tree binding documentation
Date: Thu,  1 Apr 2021 18:41:08 +0100	[thread overview]
Message-ID: <20210401174112.320497-3-jic23@kernel.org> (raw)
In-Reply-To: <20210401174112.320497-1-jic23@kernel.org>

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

Linux driver currently relies on the driver.name to match to the
compatible, but that doesn't mean it isn't a good idea to document it.

Only real complexity is the 3 separate power supplies.

Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
---
 .../bindings/iio/accel/bosch,bma220.yaml      | 50 +++++++++++++++++++
 1 file changed, 50 insertions(+)

diff --git a/Documentation/devicetree/bindings/iio/accel/bosch,bma220.yaml b/Documentation/devicetree/bindings/iio/accel/bosch,bma220.yaml
new file mode 100644
index 000000000000..942b23ad0712
--- /dev/null
+++ b/Documentation/devicetree/bindings/iio/accel/bosch,bma220.yaml
@@ -0,0 +1,50 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/iio/accel/bosch,bma220.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Bosch BMA220 Trixial Acceleration Sensor
+
+maintainers:
+  - Jonathan Cameron <Jonathan.Cameron@huawei.com>
+
+properties:
+  compatible:
+    enum:
+      - bosch,bma220
+
+  reg:
+    maxItems: 1
+
+  interrupts:
+    maxItems: 1
+
+  spi-max-frequency: true
+
+  vdda-supply: true
+  vddd-supply: true
+  vddio-supply: true
+
+required:
+  - compatible
+  - reg
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/interrupt-controller/irq.h>
+    spi0 {
+        #address-cells = <1>;
+        #size-cells = <0>;
+
+        accelerometer@0 {
+            compatible = "bosch,bma220";
+            reg = <0>;
+            spi-max-frequency = <2500000>;
+            interrupt-parent = <&gpio0>;
+            interrupts = <0 IRQ_TYPE_LEVEL_HIGH>;
+        };
+    };
+...
-- 
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 ` Jonathan Cameron [this message]
2021-04-09 14:33   ` [PATCH 2/6] dt-bindings:iio:accel:bosch,bma220 device tree binding documentation Rob Herring
2021-04-01 17:41 ` [PATCH 3/6] dt-bindings:iio:accel:fsl,mma7455 binding doc Jonathan Cameron
2021-04-09 14:34   ` 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-3-jic23@kernel.org \
    --to=jic23@kernel.org \
    --cc=Jonathan.Cameron@huawei.com \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-iio@vger.kernel.org \
    --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).