dt-bindings: Whitespace clean-ups in schema files
[linux-2.6-microblaze.git] / Documentation / devicetree / bindings / iio / magnetometer / asahi-kasei,ak8975.yaml
1 # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
2 %YAML 1.2
3 ---
4 $id: http://devicetree.org/schemas/iio/magnetometer/asahi-kasei,ak8975.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
6
7 title: AsahiKASEI AK8975 magnetometer sensor
8
9 maintainers:
10   - Jonathan Albrieux <jonathan.albrieux@gmail.com>
11
12 properties:
13   compatible:
14     oneOf:
15       - enum:
16           - asahi-kasei,ak8975
17           - asahi-kasei,ak8963
18           - asahi-kasei,ak09911
19           - asahi-kasei,ak09912
20       - enum:
21           - ak8975
22           - ak8963
23           - ak09911
24           - ak09912
25         deprecated: true
26
27   reg:
28     maxItems: 1
29
30   gpios:
31     maxItems: 1
32     description: |
33       AK8975 has a "Data ready" pin (DRDY) which informs that data
34       is ready to be read and is possible to listen on it. If used,
35       this should be active high. Prefer interrupt over this.
36
37   interrupts:
38     maxItems: 1
39     description: interrupt for DRDY pin. Triggered on rising edge.
40
41   vdd-supply:
42     description: |
43       an optional regulator that needs to be on to provide VDD power to
44       the sensor.
45
46   mount-matrix:
47     description: an optional 3x3 mounting rotation matrix.
48
49   reset-gpios:
50     description: |
51       an optional pin needed for AK09911 to set the reset state. This should
52       be usually active low
53
54 required:
55   - compatible
56   - reg
57
58 examples:
59   - |
60     #include <dt-bindings/interrupt-controller/irq.h>
61     #include <dt-bindings/gpio/gpio.h>
62     i2c {
63         #address-cells = <1>;
64         #size-cells = <0>;
65
66         magnetometer@c {
67             compatible = "asahi-kasei,ak8975";
68             reg = <0x0c>;
69             interrupt-parent = <&gpio6>;
70             interrupts = <15 IRQ_TYPE_EDGE_RISING>;
71             vdd-supply = <&ldo_3v3_gnss>;
72             reset-gpios = <&msmgpio 111 GPIO_ACTIVE_LOW>;
73             mount-matrix = "-0.984807753012208",  /* x0 */
74                            "0",                   /* y0 */
75                            "-0.173648177666930",  /* z0 */
76                            "0",                   /* x1 */
77                            "-1",                  /* y1 */
78                            "0",                   /* z1 */
79                            "-0.173648177666930",  /* x2 */
80                            "0",                   /* y2 */
81                            "0.984807753012208";   /* z2 */
82         };
83     };