rk29 phonesdk: update mpu3050 to version 3.40
authorlyx <lyx@rock-chips.com>
Thu, 11 Aug 2011 02:46:30 +0000 (19:46 -0700)
committerlyx <lyx@rock-chips.com>
Fri, 12 Aug 2011 02:39:59 +0000 (19:39 -0700)
arch/arm/mach-rk29/board-rk29-phonesdk.c

index 6aea88643dbfed89d3348bbeb66d45f25d11100b..b42455deaa8a46bc9f4b602f0c4293e08f097650 100755 (executable)
@@ -575,44 +575,57 @@ static struct mma8452_platform_data mma8452_info = {
 };
 #endif
 
-#if defined (CONFIG_SENSORS_MPU3050)
+#if defined (CONFIG_MPU_SENSORS_MPU3050)
 /*mpu3050*/
 static struct mpu3050_platform_data mpu3050_data = {
                .int_config = 0x10,
                //.orientation = { 1, 0, 0,0, -1, 0,0, 0, 1 },
                //.orientation = { 0, 1, 0,-1, 0, 0,0, 0, -1 },
+               //.orientation = { -1, 0, 0,0, -1, 0,0, 0, -1 },
+               //.orientation = { 0, 1, 0, -1, 0, 0, 0, 0, 1 },
                .orientation = { 1, 0, 0,0, 1, 0, 0, 0, 1 },
                .level_shifter = 0,
-#if defined (CONFIG_SENSORS_KXTF9)
+#if defined (CONFIG_MPU_SENSORS_KXTF9)
                .accel = {
-                               .get_slave_descr = kxtf9_get_slave_descr ,
+#ifdef CONFIG_MPU_SENSORS_MPU3050_MODULE
+                               .get_slave_descr = NULL ,
+#else
+                               .get_slave_descr = get_accel_slave_descr ,                      
+#endif
                                .adapt_num = 0, // The i2c bus to which the mpu device is
                                // connected
-                               .irq = RK29_PIN6_PC4,
+                               //.irq = RK29_PIN6_PC4,
                                .bus = EXT_SLAVE_BUS_SECONDARY,  //The secondary I2C of MPU
                                .address = 0x0f,
                                //.orientation = { 1, 0, 0,0, 1, 0,0, 0, 1 },
                                //.orientation = { 0, -1, 0,-1, 0, 0,0, 0, -1 },
                                //.orientation = { 0, 1, 0,1, 0, 0,0, 0, -1 },
+                               //.orientation = { 0, 1 ,0, -1 ,0, 0, 0, 0, 1 },
                                .orientation = {1, 0, 0, 0, 1, 0, 0, 0, 1},
                },
 #endif
-#if defined (CONFIG_SENSORS_AK8975)
+#if defined (CONFIG_MPU_SENSORS_AK8975)
                .compass = {
-                               .get_slave_descr = ak8975_get_slave_descr,/*ak5883_get_slave_descr,*/
+#ifdef CONFIG_MPU_SENSORS_MPU3050_MODULE
+                               .get_slave_descr = NULL,/*ak5883_get_slave_descr,*/
+#else
+                               .get_slave_descr = get_compass_slave_descr,
+#endif                                         
                                .adapt_num = 0, // The i2c bus to which the compass device is. 
                                // It can be difference with mpu
                                // connected
-                               .irq = RK29_PIN6_PC5,
+                               //.irq = RK29_PIN6_PC5,
                                .bus = EXT_SLAVE_BUS_PRIMARY,
                                .address = 0x0d,
                                //.orientation = { -1, 0, 0,0, -1, 0,0, 0, 1 },
                                //.orientation = { 0, -1, 0,-1, 0, 0,0, 0, -1 },
+                               //.orientation = { 0, 1, 0,1, 0, 0,0, 0, -1 },
+                               //.orientation = { 0, -1, 0, 1, 0, 0, 0, 0, 1 },
                                .orientation = {0, 1, 0, -1, 0, 0, 0, 0, 1},
                },
-#endif
 };
 #endif
+#endif
 
 #if defined(CONFIG_GPIO_WM831X)
 struct rk29_gpio_expander_info  wm831x_gpio_settinginfo[] = {
@@ -1908,7 +1921,7 @@ static struct i2c_board_info __initdata board_i2c0_devices[] = {
                .platform_data  = &l3g4200d_info,
        },
 #endif
-#if defined (CONFIG_SENSORS_MPU3050) 
+#if defined (CONFIG_MPU_SENSORS_MPU3050) 
        {
                .type                   = "mpu3050",
                .addr                   = 0x68,