phonepad:add light sensor isl29023 support
authorluowei <lw@rock-chips.com>
Wed, 26 Sep 2012 11:37:59 +0000 (19:37 +0800)
committerluowei <lw@rock-chips.com>
Wed, 26 Sep 2012 11:37:59 +0000 (19:37 +0800)
arch/arm/configs/rk30_phonepad_c8003_defconfig
arch/arm/mach-rk30/board-rk30-phonepad.c

index 57924ec5326487053a4161df6c3b891bfe999c74..cfe08bd91f29fd6f647067cfa06e4b07091b975a 100755 (executable)
@@ -256,6 +256,8 @@ CONFIG_GSENSOR_DEVICE=y
 CONFIG_GS_KXTIK=y
 CONFIG_COMPASS_DEVICE=y
 CONFIG_GYROSCOPE_DEVICE=y
+CONFIG_LIGHT_DEVICE=y
+CONFIG_LS_ISL29023=y
 # CONFIG_SERIO is not set
 # CONFIG_CONSOLE_TRANSLATIONS is not set
 # CONFIG_LEGACY_PTYS is not set
index 428d72a604c504b64d73936f62504863b367e133..9406f968eef345388f42e2b18d58a4757b9e5cd5 100755 (executable)
@@ -837,7 +837,7 @@ struct goodix_platform_data goodix_info = {
 #define TOUCH_INT_PIN   RK30_PIN4_PC2
 int ft5306_init_platform_hw(void)
 {
-       printk("ft5406_init_platform_hw\n");
+       printk("ft5306_init_platform_hw\n");
 
        rk30_mux_api_set(GPIO4C2_SMCDATA2_TRACEDATA2_NAME, 0);
        if(gpio_request(TOUCH_RESET_PIN,NULL) != 0){
@@ -888,14 +888,17 @@ int ft5306_platform_wakeup(void)
 }
 
 struct ft5x0x_platform_data ft5306_info = {
-       .max_x = 1024,
-       .max_y = 768,
-       .key_min_x = 1024,
-       .init_platform_hw= ft5306_init_platform_hw,
-       .exit_platform_hw= ft5306_exit_platform_hw,
-       .ft5x0x_platform_sleep  = ft5306_platform_sleep,
-       .ft5x0x_platform_wakeup = ft5306_platform_wakeup,
-
+  .model = 5306,
+  .max_x = 1024,
+  .max_y = 768,
+  .key_min_x = 1024,
+  .xy_swap = 1,
+  .x_revert = 1,
+  .y_revert = 0,
+  .init_platform_hw= ft5306_init_platform_hw,
+  .exit_platform_hw= ft5306_exit_platform_hw,
+  .ft5x0x_platform_sleep  = ft5306_platform_sleep,
+  .ft5x0x_platform_wakeup = ft5306_platform_wakeup,
 };
 
 
@@ -1523,6 +1526,15 @@ static struct sensor_platform_data light_stk3171_info = {
 };
 #endif
 
+#if defined(CONFIG_LS_ISL29023)
+static struct sensor_platform_data light_isl29023_info = {
+       .type = SENSOR_TYPE_LIGHT,
+       .irq_enable = 1,
+       .poll_delay_ms = 200,
+};
+#endif
+
+
 
 
 #ifdef CONFIG_FB_ROCKCHIP
@@ -2569,6 +2581,17 @@ static struct i2c_board_info __initdata i2c2_info[] = {
                .platform_data = &goodix_info,
        },
 #endif
+
+#if defined (CONFIG_LS_ISL29023)
+       {
+               .type           = "ls_isl29023",
+               .addr           = 0x44,            
+               .flags          = 0,
+               .irq            = RK30_PIN4_PC6,        
+               .platform_data = &light_isl29023_info,
+       },
+#endif
+
 };
 #endif