# Motion Sensors Support
#
# CONFIG_MPU_NONE is not set
-# CONFIG_SENSORS_MPU3050 is not set
+CONFIG_SENSORS_MPU3050=y
# CONFIG_SENSORS_MPU6000 is not set
+# CONFIG_SENSORS_ACCELEROMETER_NONE is not set
+# CONFIG_SENSORS_ADXL346 is not set
+# CONFIG_SENSORS_BMA150 is not set
+# CONFIG_SENSORS_BMA222 is not set
+# CONFIG_SENSORS_KXSD9 is not set
+CONFIG_SENSORS_KXTF9=y
+# CONFIG_SENSORS_LIS331DLH is not set
+# CONFIG_SENSORS_LSM303DLHA is not set
+# CONFIG_SENSORS_MMA8450 is not set
+# CONFIG_SENSORS_MMA8451 is not set
+# CONFIG_SENSORS_COMPASS_NONE is not set
+CONFIG_SENSORS_AK8975=y
+# CONFIG_SENSORS_MMC314X is not set
+# CONFIG_SENSORS_AMI30X is not set
+# CONFIG_SENSORS_HMC5883 is not set
+# CONFIG_SENSORS_LSM303DLHM is not set
+# CONFIG_SENSORS_YAS529 is not set
+# CONFIG_SENSORS_HSCDTD00XX is not set
+CONFIG_SENSORS_PRESSURE_NONE=y
+# CONFIG_SENSORS_BMA085 is not set
+# CONFIG_SENSORS_MPU_DEBUG is not set
CONFIG_HAVE_IDE=y
# CONFIG_IDE is not set
# CONFIG_MAG_SENSORS is not set
CONFIG_G_SENSOR_DEVICE=y
# CONFIG_GS_MMA7660 is not set
-CONFIG_GS_MMA8452=y
+# CONFIG_GS_MMA8452 is not set
# CONFIG_GS_L3G4200D is not set
# CONFIG_INPUT_JOGBALL is not set
# CONFIG_LIGHT_SENSOR_DEVICE is not set
#include <linux/mtd/nand.h>
#include <linux/mtd/partitions.h>
#include <linux/i2c-gpio.h>
-
+#include <linux/mpu.h>
#include "devices.h"
#if defined(CONFIG_MTK23D)
};
#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
+
#if defined(CONFIG_GPIO_WM831X)
struct rk29_gpio_expander_info wm831x_gpio_settinginfo[] = {
{
.platform_data = &l3g4200d_info,
},
#endif
+#if defined (CONFIG_SENSORS_MPU3050)
+ {
+ .type = "mpu3050",
+ .addr = 0x68,
+ .flags = 0,
+ .irq = RK29_PIN4_PC4,
+ .platform_data = &mpu3050_data,
+ },
+#endif
};
#endif