#include <linux/mmc/host.h>
#include <linux/android_pmem.h>
#include <linux/usb/android_composite.h>
+#include <linux/mpu.h>
+#include <linux/mpu3050.h>
#include <mach/hardware.h>
#include <asm/setup.h>
};
#endif
+#if defined (CONFIG_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 },
+ .level_shifter = 0,
+#if defined (CONFIG_SENSORS_KXTF9)
+ .accel = {
+ .get_slave_descr = kxtf9_get_slave_descr ,
+ .adapt_num = 0, // The i2c bus to which the mpu device is
+ // connected
+ .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 = {1, 0, 0, 0, -1, 0, 0, 0, -1},
+ },
+#endif
+#if defined (CONFIG_SENSORS_AK8975)
+ .compass = {
+ .get_slave_descr = ak8975_get_slave_descr,/*ak5883_get_slave_descr,*/
+ .adapt_num = 0, // The i2c bus to which the compass device is.
+ // It can be difference with mpu
+ // connected
+ .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 },
+ },
+#endif
+};
+#endif
+
+
/*****************************************************************************************
* i2c devices
* author: kfx@rock-chips.com
.irq = RK29_PIN2_PA3,
},
#endif
+#if defined (CONFIG_SENSORS_MPU3050)
+ {
+ .type = "mpu3050",
+ .addr = 0x68,
+ .flags = 0,
+ .irq = RK29_PIN5_PA3,
+ .platform_data = &mpu3050_data,
+ },
+#endif
};
#endif