Back to home page

OSCL-LXR

 
 

    


0001 # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
0002 %YAML 1.2
0003 ---
0004 $id: http://devicetree.org/schemas/iio/accel/fsl,mma7455.yaml#
0005 $schema: http://devicetree.org/meta-schemas/core.yaml#
0006 
0007 title: Freescale MMA7455 and MMA7456 three axis accelerometers
0008 
0009 maintainers:
0010   - Jonathan Cameron <jic23@kernel.org>
0011 
0012 description:
0013   Devices support both SPI and I2C interfaces.
0014 
0015 properties:
0016   compatible:
0017     enum:
0018       - fsl,mma7455
0019       - fsl,mma7456
0020   reg:
0021     maxItems: 1
0022 
0023   avdd-supply: true
0024   vddio-supply: true
0025 
0026   interrupts:
0027     minItems: 1
0028     maxItems: 2
0029 
0030   interrupt-names:
0031     description:
0032       Data ready is only available on INT1, but events can use either or
0033       both pins.  If not specified, first element assumed to correspond
0034       to INT1 and second (where present) to INT2.
0035     minItems: 1
0036     maxItems: 2
0037     items:
0038       enum:
0039         - "INT1"
0040         - "INT2"
0041 
0042   spi-max-frequency: true
0043 
0044 required:
0045   - compatible
0046   - reg
0047 
0048 additionalProperties: false
0049 
0050 examples:
0051   - |
0052     # include <dt-bindings/interrupt-controller/irq.h>
0053     i2c {
0054         #address-cells = <1>;
0055         #size-cells = <0>;
0056 
0057         accelerometer@18 {
0058             compatible = "fsl,mma7455";
0059             reg = <0x18>;
0060             vddio-supply = <&iovdd>;
0061             avdd-supply = <&avdd>;
0062             interrupts = <57 IRQ_TYPE_EDGE_FALLING>, <58 IRQ_TYPE_EDGE_FALLING>;
0063             interrupt-names = "INT2", "INT1";
0064         };
0065     };
0066   - |
0067     # include <dt-bindings/interrupt-controller/irq.h>
0068     spi {
0069         #address-cells = <1>;
0070         #size-cells = <0>;
0071         accelerometer@0 {
0072             compatible = "fsl,mma7456";
0073             reg = <0>;
0074             spi-max-frequency = <10000000>;
0075             vddio-supply = <&iovdd>;
0076             avdd-supply = <&avdd>;
0077             interrupts = <57 IRQ_TYPE_EDGE_FALLING>;
0078             interrupt-names = "INT1";
0079         };
0080     };
0081 ...