rk3188 ds1006h: configuration the akm8963 based sensors framework
authorwuhao <wuhao@wuhao@rock-chips.com>
Tue, 12 Mar 2013 08:46:20 +0000 (16:46 +0800)
committerwuhao <wuhao@wuhao@rock-chips.com>
Tue, 12 Mar 2013 08:46:20 +0000 (16:46 +0800)
arch/arm/configs/rk3188_ds1006h_defconfig
arch/arm/mach-rk3188/board-rk3188-ds1006h.c

index 1d259a1f44500b1b3cfe0707e95ec2039d23e1d9..0e5cd993d4f446fe2e49a450f8fb1532eb51fe97 100644 (file)
@@ -194,11 +194,8 @@ CONFIG_MTD_NAND_IDS=y
 CONFIG_MTD_RKNAND=y
 CONFIG_BLK_DEV_LOOP=y
 CONFIG_MISC_DEVICES=y
-CONFIG_SENSORS_AK8963=y
 CONFIG_UID_STAT=y
 CONFIG_APANIC=y
-CONFIG_3G_MODULE=y
-CONFIG_MT6229=y
 CONFIG_SCSI=y
 CONFIG_BLK_DEV_SD=y
 CONFIG_SCSI_MULTI_LUN=y
@@ -251,6 +248,7 @@ CONFIG_LIGHT_SENSOR_DEVICE=y
 CONFIG_SENSOR_DEVICE=y
 CONFIG_GSENSOR_DEVICE=y
 CONFIG_COMPASS_DEVICE=y
+CONFIG_COMPASS_AK8963=y
 CONFIG_GYROSCOPE_DEVICE=y
 CONFIG_LIGHT_DEVICE=y
 CONFIG_LS_PHOTORESISTOR=y
index 24c0d5ac129dc207774863400c7fd2d6354dc2e4..d90e7d96f546c436969a5c5d5f9970ba6be01f03 100755 (executable)
@@ -259,17 +259,44 @@ static struct sensor_platform_data lis3dh_info = {
        .irq_enable = 1,
        .poll_delay_ms = 30,
         .init_platform_hw = lis3dh_init_platform_hw,
-       .orientation = {-1, 0, 0, 0, 0, -1, 0, 1, 0},
+       .orientation = {-1, 0, 0, 0, 1, 0, 0, 0, -1},
 };
 #endif
 
-#if (defined(CONFIG_SENSORS_AK8963) || defined(CONFIG_SENSORS_AK8963_MODULE)) 
-static struct akm8963_platform_data akm_platform_data_8963 = { 
-                 .gpio_DRDY      = RK30_PIN3_PD7, 
-                 .gpio_RST        = 0, 
-                 .layout              = 3, 
-                 .outbit           = 1, 
-}; 
+#if defined (CONFIG_COMPASS_AK8963)
+static struct sensor_platform_data akm8963_info =
+{
+       .type = SENSOR_TYPE_COMPASS,
+       .irq_enable = 1,
+       .poll_delay_ms = 30,
+       .m_layout = 
+       {
+               {
+                       {0, 1, 0},
+                       {1, 0, 0},
+                       {0, 0, -1},
+               },
+
+               {
+                       {1, 0, 0},
+                       {0, 1, 0},
+                       {0, 0, 1},
+               },
+
+               {
+                       {0, -1, 0},
+                       {-1, 0, 0},
+                       {0, 0, -1},
+               },
+
+               {
+                       {1, 0, 0},
+                       {0, 1, 0},
+                       {0, 0, 1},
+               },
+       }
+};
+
 #endif
 
 #if defined(CONFIG_LS_PHOTORESISTOR)
@@ -1294,15 +1321,16 @@ static struct i2c_board_info __initdata i2c0_info[] = {
                .platform_data = &lis3dh_info,
        },
 #endif
-#if defined (CONFIG_SENSORS_AK8963)
-        {
-                .type             = "akm8963",
-                .addr           = 0x0d,
-                .flags           = I2C_CLIENT_WAKE,
-               .irq             = RK30_PIN3_PD7,
-              .platform_data = &akm_platform_data_8963,
-        },
+#if defined (CONFIG_COMPASS_AK8963)
+       {
+               .type          = "ak8963",
+               .addr          = 0x0d,
+               .flags         = 0,
+               .irq           = RK30_PIN3_PD7, 
+               .platform_data = &akm8963_info,
+       },
 #endif
+
 #if defined (CONFIG_LS_PHOTORESISTOR)
        {
                .type           = "ls_photoresistor",