sensors: add rk_sensor.txt
author郭毅 <gy@rock-chips.com>
Wed, 30 Apr 2014 08:57:13 +0000 (16:57 +0800)
committer郭毅 <gy@rock-chips.com>
Wed, 30 Apr 2014 08:57:13 +0000 (16:57 +0800)
Documentation/devicetree/bindings/input/sensors/rk_sensor.txt [new file with mode: 0644]

diff --git a/Documentation/devicetree/bindings/input/sensors/rk_sensor.txt b/Documentation/devicetree/bindings/input/sensors/rk_sensor.txt
new file mode 100644 (file)
index 0000000..22113a0
--- /dev/null
@@ -0,0 +1,47 @@
+* Sensor Controller\r
+\r
+Required properties:\r
+- compatible: the sensor name,exampel: "gs_mma8452";\r
+- reg: i2c slave address;\r
+- type: sensor type;\r
+- irq-gpio: sensor interrupt gpio pin;\r
+- irq_enable: 1 use irq; 0 use pull mode;\r
+- poll_delay_ms: pull delay time if use pull mode;\r
+- layout: sensor orientation, choose 1-8 to make product work fine;\r
+\r
+Example:\r
+\r
+       sensor@1d {\r
+               compatible = "gs_mma8452";\r
+               reg = <0x1d>;\r
+               type = <SENSOR_TYPE_ACCEL>;\r
+               irq-gpio = <&gpio8 GPIO_A0 IRQ_TYPE_EDGE_FALLING>;\r
+               irq_enable = <1>;\r
+               poll_delay_ms = <30>;\r
+               layout = <1>;\r
+       };\r
+               sensor@19 {\r
+               compatible = "gs_lis3dh";\r
+               reg = <0x19>;\r
+               type = <SENSOR_TYPE_ACCEL>;\r
+               irq-gpio = <&gpio0 GPIO_A0 IRQ_TYPE_LEVEL_LOW>;\r
+               irq_enable = <1>;\r
+               poll_delay_ms = <30>;\r
+               layout = <1>;\r
+       };\r
+\r
+\r
+\r
+TYPE: \r
+      \r
+        SENSOR_TYPE_NULL  0     \r
+        SENSOR_TYPE_ANGLE 1\r
+        SENSOR_TYPE_ACCEL 2\r
+        SENSOR_TYPE_COMPASS 3   \r
+        SENSOR_TYPE_GYROSCOPE 4 \r
+        SENSOR_TYPE_LIGHT 5     \r
+        SENSOR_TYPE_PROXIMITY 6\r
+        SENSOR_TYPE_TEMPERATURE 7       \r
+        SENSOR_TYPE_PRESSURE 8\r
+        SENSOR_TYPE_HALL 9\r
+        define SENSOR_NUM_TYPES 10
\ No newline at end of file