mirror of
https://github.com/torvalds/linux.git
synced 2026-06-09 07:03:37 +02:00
phonepad:add ft5306 touch support
This commit is contained in:
parent
643074a5ad
commit
3c4d048747
|
|
@ -242,15 +242,7 @@ CONFIG_TABLET_USB_HANWANG=y
|
|||
CONFIG_TABLET_USB_KBTAB=y
|
||||
CONFIG_TABLET_USB_WACOM=y
|
||||
CONFIG_INPUT_TOUCHSCREEN=y
|
||||
CONFIG_TOUCHSCREEN_SYNAPTICS_RMI4_I2C_RK=y
|
||||
CONFIG_TOUCHSCREEN_SYNAPTICS_S3202=y
|
||||
CONFIG_RMI4_BUS=y
|
||||
CONFIG_RMI4_I2C=y
|
||||
CONFIG_RMI4_I2C_SCL_RATE=200000
|
||||
CONFIG_RMI4_GENERIC=y
|
||||
CONFIG_RMI4_F1A=y
|
||||
CONFIG_RMI4_F11=y
|
||||
CONFIG_RMI4_F34=y
|
||||
CONFIG_TOUCHSCREEN_FT5306=y
|
||||
CONFIG_INPUT_MISC=y
|
||||
CONFIG_INPUT_KEYCHORD=y
|
||||
CONFIG_INPUT_UINPUT=y
|
||||
|
|
@ -314,10 +306,13 @@ CONFIG_BACKLIGHT_LCD_SUPPORT=y
|
|||
CONFIG_BACKLIGHT_CLASS_DEVICE=y
|
||||
# CONFIG_BACKLIGHT_GENERIC is not set
|
||||
CONFIG_DISPLAY_SUPPORT=y
|
||||
CONFIG_LCD_HV070WSA100=y
|
||||
CONFIG_LCD_HJ080NA=y
|
||||
CONFIG_FB_ROCKCHIP=y
|
||||
# CONFIG_DUAL_DISP_IN_KERNEL is not set
|
||||
CONFIG_LCDC_RK30=y
|
||||
# CONFIG_LCDC1_RK30 is not set
|
||||
CONFIG_RK_HDMI=y
|
||||
CONFIG_HDMI_RK30=y
|
||||
CONFIG_RGA_RK30=y
|
||||
CONFIG_LOGO=y
|
||||
# CONFIG_LOGO_LINUX_MONO is not set
|
||||
|
|
|
|||
|
|
@ -770,6 +770,77 @@ struct goodix_platform_data goodix_info = {
|
|||
};
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_TOUCHSCREEN_FT5306)
|
||||
|
||||
#define TOUCH_RESET_PIN RK30_PIN4_PD0
|
||||
#define TOUCH_INT_PIN RK30_PIN4_PC2
|
||||
int ft5306_init_platform_hw(void)
|
||||
{
|
||||
printk("ft5406_init_platform_hw\n");
|
||||
|
||||
rk30_mux_api_set(GPIO4C2_SMCDATA2_TRACEDATA2_NAME, 0);
|
||||
if(gpio_request(TOUCH_RESET_PIN,NULL) != 0){
|
||||
gpio_free(TOUCH_RESET_PIN);
|
||||
printk("ft5406_init_platform_hw gpio_request error\n");
|
||||
return -EIO;
|
||||
}
|
||||
|
||||
if(gpio_request(TOUCH_INT_PIN,NULL) != 0){
|
||||
gpio_free(TOUCH_INT_PIN);
|
||||
printk("ift5406_init_platform_hw gpio_request error\n");
|
||||
return -EIO;
|
||||
}
|
||||
|
||||
rk30_mux_api_set(GPIO4D0_SMCDATA8_TRACEDATA8_NAME, 0);
|
||||
|
||||
gpio_direction_output(TOUCH_RESET_PIN, 0);
|
||||
gpio_set_value(TOUCH_RESET_PIN,GPIO_LOW);
|
||||
mdelay(10);
|
||||
gpio_direction_input(TOUCH_INT_PIN);
|
||||
mdelay(10);
|
||||
gpio_set_value(TOUCH_RESET_PIN,GPIO_HIGH);
|
||||
msleep(300);
|
||||
return 0;
|
||||
|
||||
}
|
||||
|
||||
void ft5306_exit_platform_hw(void)
|
||||
{
|
||||
printk("ft5306_exit_platform_hw\n");
|
||||
gpio_free(TOUCH_RESET_PIN);
|
||||
gpio_free(TOUCH_INT_PIN);
|
||||
}
|
||||
|
||||
int ft5306_platform_sleep(void)
|
||||
{
|
||||
//printk("ft5306_platform_sleep\n");
|
||||
gpio_set_value(TOUCH_RESET_PIN,GPIO_LOW);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int ft5306_platform_wakeup(void)
|
||||
{
|
||||
//printk("ft5306_platform_wakeup\n");
|
||||
gpio_set_value(TOUCH_RESET_PIN,GPIO_HIGH);
|
||||
msleep(300);
|
||||
return 0;
|
||||
}
|
||||
|
||||
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,
|
||||
|
||||
};
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
static struct spi_board_info board_spi_devices[] = {
|
||||
};
|
||||
|
||||
|
|
@ -2246,6 +2317,17 @@ static struct i2c_board_info __initdata i2c2_info[] = {
|
|||
.platform_data = &s3202_platformdata,
|
||||
},
|
||||
#endif
|
||||
|
||||
#if defined (CONFIG_TOUCHSCREEN_FT5306)
|
||||
{
|
||||
.type = "ft5x0x_ts",
|
||||
.addr = 0x3e,
|
||||
.flags = 0,
|
||||
.irq = RK30_PIN4_PC2,
|
||||
.platform_data = &ft5306_info,
|
||||
},
|
||||
#endif
|
||||
|
||||
};
|
||||
#endif
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user