About Kernel Documentation Linux Kernel Contact Linux Resources Linux Blog

Documentation / devicetree / bindings / iio / accel / adxl345.txt


Based on kernel version 4.16.1. Page generated on 2018-04-09 11:52 EST.

1	Analog Devices ADXL345 3-Axis, +/-(2g/4g/8g/16g) Digital Accelerometer
2	
3	http://www.analog.com/en/products/mems/accelerometers/adxl345.html
4	
5	Required properties:
6	 - compatible : should be "adi,adxl345"
7	 - reg : the I2C address or SPI chip select number of the sensor
8	
9	Required properties for SPI bus usage:
10	 - spi-max-frequency : set maximum clock frequency, must be 5000000
11	 - spi-cpol and spi-cpha : must be defined for adxl345 to enable SPI mode 3
12	
13	Optional properties:
14	 - interrupt-parent : phandle to the parent interrupt controller as documented
15	   in Documentation/devicetree/bindings/interrupt-controller/interrupts.txt
16	 - interrupts: interrupt mapping for IRQ as documented in
17	   Documentation/devicetree/bindings/interrupt-controller/interrupts.txt
18	
19	Example for a I2C device node:
20	
21		accelerometer@2a {
22			compatible = "adi,adxl345";
23			reg = <0x53>;
24			interrupt-parent = <&gpio1>;
25			interrupts = <0 IRQ_TYPE_LEVEL_HIGH>;
26		};
27	
28	Example for a SPI device node:
29	
30		accelerometer@0 {
31			compatible = "adi,adxl345";
32			reg = <0>;
33			spi-max-frequency = <5000000>;
34			spi-cpol;
35			spi-cpha;
36			interrupt-parent = <&gpio1>;
37			interrupts = <0 IRQ_TYPE_LEVEL_HIGH>;
38		};
Hide Line Numbers


About Kernel Documentation Linux Kernel Contact Linux Resources Linux Blog