phonepad:add light sensor isl29023 support

This commit is contained in:
luowei
2012-09-26 19:37:59 +08:00
parent 922ffca145
commit 5415fb99ac
2 changed files with 34 additions and 9 deletions

View File

@@ -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

View File

@@ -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