mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-11 05:17:10 +09:00
phonepad:add light sensor isl29023 support
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user