1* Sensor Controller 2 3Required properties: 4- compatible: the sensor name,exampel: "gs_mma8452"; 5- reg: i2c slave address; 6- type: sensor type; 7- irq-gpio: sensor interrupt gpio pin; 8- irq_enable: 1 use irq; 0 use pull mode; 9- poll_delay_ms: pull delay time if use pull mode; 10- layout: sensor orientation, choose 1-8 to make product work fine; 11 12Example: 13 14 hall_sensor: hall-mh248 { 15 compatible = "hall-mh248"; 16 pinctrl-names = "default"; 17 pinctrl-0 = <&mh248_irq_gpio>; 18 irq-gpio = <&gpio1 2 IRQ_TYPE_EDGE_RISING>; 19 hall-active = <1>; 20 status = "okay"; 21 }; 22 sensor@1d { 23 compatible = "gs_mma8452"; 24 reg = <0x1d>; 25 type = <SENSOR_TYPE_ACCEL>; 26 irq-gpio = <&gpio8 GPIO_A0 IRQ_TYPE_EDGE_FALLING>; 27 irq_enable = <1>; 28 poll_delay_ms = <30>; 29 layout = <1>; 30 }; 31 sensor@19 { 32 compatible = "gs_lis3dh"; 33 reg = <0x19>; 34 type = <SENSOR_TYPE_ACCEL>; 35 irq-gpio = <&gpio0 GPIO_A0 IRQ_TYPE_LEVEL_LOW>; 36 irq_enable = <1>; 37 poll_delay_ms = <30>; 38 layout = <1>; 39 }; 40 41 42 43TYPE: 44 45 SENSOR_TYPE_NULL 0 46 SENSOR_TYPE_ANGLE 1 47 SENSOR_TYPE_ACCEL 2 48 SENSOR_TYPE_COMPASS 3 49 SENSOR_TYPE_GYROSCOPE 4 50 SENSOR_TYPE_LIGHT 5 51 SENSOR_TYPE_PROXIMITY 6 52 SENSOR_TYPE_TEMPERATURE 7 53 SENSOR_TYPE_PRESSURE 8 54 SENSOR_TYPE_HALL 9 55 define SENSOR_NUM_TYPES 10 56