1# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/iio/accel/kionix,kx022a.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: ROHM/Kionix KX022A Accelerometer
8
9maintainers:
10  - Matti Vaittinen <mazziesaccount@gmail.com>
11
12description: |
13  KX022A is a 3-axis accelerometer supporting +/- 2G, 4G, 8G and 16G ranges,
14  output data-rates from 0.78Hz to 1600Hz and a hardware-fifo buffering.
15  KX022A can be accessed either via I2C or SPI.
16
17properties:
18  compatible:
19    const: kionix,kx022a
20
21  reg:
22    maxItems: 1
23
24  interrupts:
25    minItems: 1
26    maxItems: 2
27
28  interrupt-names:
29    minItems: 1
30    items:
31      - enum: [INT1, INT2]
32      - const: INT2
33
34  vdd-supply: true
35  io-vdd-supply: true
36
37  mount-matrix:
38    description: |
39      an optional 3x3 mounting rotation matrix.
40
41required:
42  - compatible
43  - reg
44  - interrupts
45
46additionalProperties: false
47
48examples:
49  - |
50    #include <dt-bindings/interrupt-controller/irq.h>
51    i2c {
52        #address-cells = <1>;
53        #size-cells = <0>;
54        accel@1f {
55            compatible = "kionix,kx022a";
56            reg = <0x1f>;
57
58            interrupt-parent = <&gpio1>;
59            interrupts = <29 IRQ_TYPE_LEVEL_LOW>;
60            interrupt-names = "INT1";
61
62            io-vdd-supply = <&iovdd>;
63            vdd-supply = <&vdd>;
64        };
65    };
66