1 # SPDX-License-Identifier: GPL-2.0-only OR BSD 1 # SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause 2 %YAML 1.2 2 %YAML 1.2 3 --- 3 --- 4 $id: http://devicetree.org/schemas/iio/accel/a 4 $id: http://devicetree.org/schemas/iio/accel/adi,adxl313.yaml# 5 $schema: http://devicetree.org/meta-schemas/co 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 6 6 7 title: Analog Devices ADXL312, ADXL313, and AD 7 title: Analog Devices ADXL312, ADXL313, and ADXL314 3-Axis Digital Accelerometers 8 8 9 maintainers: 9 maintainers: 10 - Lucas Stankus <lucas.p.stankus@gmail.com> 10 - Lucas Stankus <lucas.p.stankus@gmail.com> 11 11 12 description: | 12 description: | 13 Analog Devices ADXL312, ADXL313, and ADXL314 13 Analog Devices ADXL312, ADXL313, and ADXL314 3-Axis Digital Accelerometer that 14 support both I2C & SPI interfaces. 14 support both I2C & SPI interfaces. 15 https://www.analog.com/en/products/adxl312 15 https://www.analog.com/en/products/adxl312.html 16 https://www.analog.com/en/products/adxl313 16 https://www.analog.com/en/products/adxl313.html 17 https://www.analog.com/en/products/adxl314 17 https://www.analog.com/en/products/adxl314.html 18 18 19 properties: 19 properties: 20 compatible: 20 compatible: 21 enum: 21 enum: 22 - adi,adxl312 22 - adi,adxl312 23 - adi,adxl313 23 - adi,adxl313 24 - adi,adxl314 24 - adi,adxl314 25 25 26 reg: 26 reg: 27 maxItems: 1 27 maxItems: 1 28 28 29 spi-3wire: true 29 spi-3wire: true 30 30 31 vs-supply: 31 vs-supply: 32 description: Regulator that supplies power 32 description: Regulator that supplies power to the accelerometer 33 33 34 vdd-supply: 34 vdd-supply: 35 description: Regulator that supplies the d 35 description: Regulator that supplies the digital interface supply voltage 36 36 37 interrupts: 37 interrupts: 38 minItems: 1 38 minItems: 1 39 maxItems: 2 39 maxItems: 2 40 40 41 interrupt-names: 41 interrupt-names: 42 minItems: 1 42 minItems: 1 43 maxItems: 2 43 maxItems: 2 44 items: 44 items: 45 enum: 45 enum: 46 - INT1 46 - INT1 47 - INT2 47 - INT2 48 48 49 required: 49 required: 50 - compatible 50 - compatible 51 - reg 51 - reg 52 52 53 allOf: 53 allOf: 54 - $ref: /schemas/spi/spi-peripheral-props.ya 54 - $ref: /schemas/spi/spi-peripheral-props.yaml# 55 55 56 unevaluatedProperties: false 56 unevaluatedProperties: false 57 57 58 examples: 58 examples: 59 - | 59 - | 60 #include <dt-bindings/gpio/gpio.h> 60 #include <dt-bindings/gpio/gpio.h> 61 #include <dt-bindings/interrupt-controller 61 #include <dt-bindings/interrupt-controller/irq.h> 62 i2c { 62 i2c { 63 #address-cells = <1>; 63 #address-cells = <1>; 64 #size-cells = <0>; 64 #size-cells = <0>; 65 65 66 /* Example for a I2C device node */ 66 /* Example for a I2C device node */ 67 accelerometer@53 { 67 accelerometer@53 { 68 compatible = "adi,adxl313"; 68 compatible = "adi,adxl313"; 69 reg = <0x53>; 69 reg = <0x53>; 70 interrupt-parent = <&gpio0>; 70 interrupt-parent = <&gpio0>; 71 interrupts = <0 IRQ_TYPE_LEVEL_HIG 71 interrupts = <0 IRQ_TYPE_LEVEL_HIGH>; 72 interrupt-names = "INT1"; 72 interrupt-names = "INT1"; 73 }; 73 }; 74 }; 74 }; 75 - | 75 - | 76 #include <dt-bindings/gpio/gpio.h> 76 #include <dt-bindings/gpio/gpio.h> 77 #include <dt-bindings/interrupt-controller 77 #include <dt-bindings/interrupt-controller/irq.h> 78 spi { 78 spi { 79 #address-cells = <1>; 79 #address-cells = <1>; 80 #size-cells = <0>; 80 #size-cells = <0>; 81 81 82 /* Example for a SPI device node */ 82 /* Example for a SPI device node */ 83 accelerometer@0 { 83 accelerometer@0 { 84 compatible = "adi,adxl313"; 84 compatible = "adi,adxl313"; 85 reg = <0>; 85 reg = <0>; 86 spi-max-frequency = <5000000>; 86 spi-max-frequency = <5000000>; 87 interrupt-parent = <&gpio0>; 87 interrupt-parent = <&gpio0>; 88 interrupts = <0 IRQ_TYPE_LEVEL_HIG 88 interrupts = <0 IRQ_TYPE_LEVEL_HIGH>; 89 interrupt-names = "INT1"; 89 interrupt-names = "INT1"; 90 }; 90 }; 91 }; 91 };
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.