[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1420599537-28740-2-git-send-email-walter@vanguardiasur.com.ar>
Date: Tue, 6 Jan 2015 23:58:57 -0300
From: Walter Lozano <walter@...guardiasur.com.ar>
To: michael.hennerich@...log.com, dmitry.torokhov@...il.com,
robh+dt@...nel.org, pawel.moll@....com, mark.rutland@....com,
ijc+devicetree@...lion.org.uk, galak@...eaurora.org,
devicetree@...r.kernel.org, linux-input@...r.kernel.org,
linux-kernel@...r.kernel.org
Cc: Walter Lozano <walter@...guardiasur.com.ar>
Subject: [PATCH 2/2] Input: adxl34x - add device tree documentation
This patch adds a basic documentation regarding the device tree
bindings of adxl34x digital accelerometer.
Signed-off-by: Walter Lozano <walter@...guardiasur.com.ar>
---
.../devicetree/bindings/input/adxl34x.txt | 53 ++++++++++++++++++++
1 file changed, 53 insertions(+)
create mode 100644 Documentation/devicetree/bindings/input/adxl34x.txt
diff --git a/Documentation/devicetree/bindings/input/adxl34x.txt b/Documentation/devicetree/bindings/input/adxl34x.txt
new file mode 100644
index 0000000..0774f7e
--- /dev/null
+++ b/Documentation/devicetree/bindings/input/adxl34x.txt
@@ -0,0 +1,53 @@
+Device Tree bindings for adxl34x digital accelerometer, both spi and i2c.
+
+Depending on the interface this node should be a child of a spi or i2c bus.
+
+Required properties:
+- compatible: "adxl34x"
+- reg: SPI/I2C device address
+- interrupt-parent: a phandle for the interrupt controller
+- interrupts: interrupt to which the chip is connected
+
+Optional parameters:
+Please refer to include/linux/input/adxl34x.h for specific info. If the value
+is not specified the driver will use its default.
+
+- adi,tap-axis-control: u8 default 0
+- adi,tap-threshold: u8 default 35
+- adi,tap-duration: u8 default 3
+- adi,tap-latency: u8 default 20
+- adi,tap-window: u8 default 20
+- adi,act-axis-control: u8 default 0xFF
+- adi,activity-threshold: u8 default 6
+- adi,inactivity-threshold: u8 default 4
+- adi,inactivity-time: u8 default 3
+- adi,free-fall-threshold: u8 default 8
+- adi,free-fall-time: u8 default 20
+- adi,data-rate: u8 default 8
+- adi,data-range: u8 default 4
+- adi,low-power-mode: u8 defaut 0
+- adi,power-mode: u8 default 0x30
+- adi,fifo-mode: u8 default 2
+- adi,watermark: u8 default 0
+- adi,use-int2: u8
+- adi,orientation-enable: u8 default 0
+- adi,deadzone-angle: u8 default 0
+- divisor-length: u8 default 0
+
+Example
+
+&i2c1 {
+ status = "okay";
+
+ accel1: accelerometer@53 {
+ compatible = "adxl34x";
+ reg = <0x53>;
+
+ interrupt-parent = <&portc>;
+ interrupts = <3 2>;
+
+ adi,inactivity-time = /bits/ 8 <6>;
+ adi,data-range = /bits/ 8 <1>;
+ };
+};
+
--
1.7.10.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists