rk3026: rk3028a_tb: gsensor: lis3dh support
authorkfx <kfx@rock-chips.com>
Thu, 8 Aug 2013 02:49:08 +0000 (10:49 +0800)
committerkfx <kfx@rock-chips.com>
Thu, 8 Aug 2013 02:49:50 +0000 (10:49 +0800)
arch/arm/mach-rk3026/board-rk3028a-tb.c

index 43409f1a6dcac7ed160fcc21747b92319cbbaa6f..cca707dedbd25cf77b4734e4b5d26bcf6fd1a572 100755 (executable)
@@ -435,6 +435,20 @@ static struct sensor_platform_data mma8452_info = {
         .orientation = {-1, 0, 0, 0, -1, 0, 0, 0, 1},
 };
 #endif
+#if defined (CONFIG_GS_LIS3DH)
+static int lis3dh_init_platform_hw(void)
+{
+        return 0;
+}
+
+static struct sensor_platform_data lis3dh_info = {
+       .type = SENSOR_TYPE_ACCEL,
+       .irq_enable = 1,
+       .poll_delay_ms = 30,
+        .init_platform_hw = lis3dh_init_platform_hw,
+       .orientation = {-1, 0, 0, 0, -1, 0, 0, 0, 1},
+};
+#endif
 
 /***********************************************************
 *      keyboard
@@ -1147,6 +1161,16 @@ static struct i2c_board_info __initdata i2c0_info[] = {
                .platform_data = &mma8452_info,
        },
 #endif
+#if defined (CONFIG_GS_LIS3DH)
+       {
+               .type           = "gs_lis3dh",
+               .addr           = 0x19,   //0x19(SA0-->VCC), 0x18(SA0-->GND)
+               .flags          = 0,
+               .irq            = GS_INT_PIN,
+               .platform_data = &lis3dh_info,
+       },
+#endif
+
 };
 #endif