Merge tag 'block-5.14-2021-08-07' of git://git.kernel.dk/linux-block
[linux-2.6-microblaze.git] / Documentation / devicetree / bindings / iio / accel / fsl,mma7455.yaml
1 # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
2 %YAML 1.2
3 ---
4 $id: http://devicetree.org/schemas/iio/accel/fsl,mma7455.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
6
7 title: Freescale MMA7455 and MMA7456 three axis accelerometers
8
9 maintainers:
10   - Joachim Eastwood <manabian@gmail.com>
11   - Jonathan Cameron <jic23@kernel.org>
12
13 description:
14   Devices support both SPI and I2C interfaces.
15
16 properties:
17   compatible:
18     enum:
19       - fsl,mma7455
20       - fsl,mma7456
21   reg:
22     maxItems: 1
23
24   avdd-supply: true
25   vddio-supply: true
26
27   interrupts:
28     minItems: 1
29     maxItems: 2
30
31   interrupt-names:
32     description:
33       Data ready is only available on INT1, but events can use either or
34       both pins.  If not specified, first element assumed to correspond
35       to INT1 and second (where present) to INT2.
36     minItems: 1
37     maxItems: 2
38     items:
39       enum:
40         - "INT1"
41         - "INT2"
42
43   spi-max-frequency: true
44
45 required:
46   - compatible
47   - reg
48
49 additionalProperties: false
50
51 examples:
52   - |
53     # include <dt-bindings/interrupt-controller/irq.h>
54     i2c {
55         #address-cells = <1>;
56         #size-cells = <0>;
57
58         accelerometer@18 {
59             compatible = "fsl,mma7455";
60             reg = <0x18>;
61             vddio-supply = <&iovdd>;
62             avdd-supply = <&avdd>;
63             interrupts = <57 IRQ_TYPE_EDGE_FALLING>, <58 IRQ_TYPE_EDGE_FALLING>;
64             interrupt-names = "INT2", "INT1";
65         };
66     };
67   - |
68     # include <dt-bindings/interrupt-controller/irq.h>
69     spi {
70         #address-cells = <1>;
71         #size-cells = <0>;
72         accelerometer@0 {
73             compatible = "fsl,mma7456";
74             reg = <0>;
75             spi-max-frequency = <10000000>;
76             vddio-supply = <&iovdd>;
77             avdd-supply = <&avdd>;
78             interrupts = <57 IRQ_TYPE_EDGE_FALLING>;
79             interrupt-names = "INT1";
80         };
81     };
82 ...