#define RK30_FB0_MEM_SIZE 8*SZ_1M
+#if defined(CONFIG_TOUCHSCREEN_GT8XX)
+#define TOUCH_RESET_PIN RK30_PIN4_PD0
+#define TOUCH_PWR_PIN INVALID_GPIO
+int goodix_init_platform_hw(void)
+{
+ int ret;
+ printk("goodix_init_platform_hw\n");
+ ret = gpio_request(TOUCH_PWR_PIN, "goodix power pin");
+ if(ret != 0){
+ gpio_free(TOUCH_PWR_PIN);
+ printk("goodix power error\n");
+ return -EIO;
+ }
+ gpio_direction_output(TOUCH_PWR_PIN, 0);
+ gpio_set_value(TOUCH_PWR_PIN,GPIO_LOW);
+ msleep(100);
+ ret = gpio_request(TOUCH_RESET_PIN, "goodix reset pin");
+ if(ret != 0){
+ gpio_free(TOUCH_RESET_PIN);
+ printk("goodix gpio_request error\n");
+ return -EIO;
+ }
+ gpio_direction_output(TOUCH_RESET_PIN, 0);
+ gpio_set_value(TOUCH_RESET_PIN,GPIO_LOW);
+ msleep(10);
+ gpio_set_value(TOUCH_RESET_PIN,GPIO_HIGH);
+ msleep(500);
+ return 0;
+}
+
+struct goodix_platform_data goodix_info = {
+ .model= 8105,
+ .irq_pin = RK30_PIN4_PC2,
+ .rest_pin = TOUCH_RESET_PIN,
+ .init_platform_hw = goodix_init_platform_hw,
+};
+#endif
+
+
/*****************************************************************************************
* xpt2046 touch panel
* author: hhb@rock-chips.com
#ifdef CONFIG_I2C2_RK30
static struct i2c_board_info __initdata i2c2_info[] = {
+#if defined (CONFIG_TOUCHSCREEN_GT8XX)
+ {
+ .type = "Goodix-TS",
+ .addr = 0x55,
+ .flags =0,
+ .irq =RK30_PIN4_PC2,
+ .platform_data = &goodix_info,
+ },
+#endif
+
};
#endif
int gpio_DRDY;
};
+struct goodix_platform_data {
+ int model ;
+ int rest_pin;
+ int irq_pin ;
+ int (*get_pendown_state)(void);
+ int (*init_platform_hw)(void);
+ int (*platform_sleep)(void);
+ int (*platform_wakeup)(void);
+ void (*exit_platform_hw)(void);
+};
+
#define BOOT_MODE_NORMAL 0
If unsure, say N (but it's safe to say "Y").
config TOUCHSCREEN_GT8XX
- tristate "Goodix touch screen gt8xx support for rk29"
+ tristate "Goodix touch screen gt8xx support"
help
Say Y here if you have a touchscreen interface using the
goodix gt8xx , and your board-specific initialization
ret = request_irq(ts->irq, rk_ts_irq_handler ,IRQ_TYPE_LEVEL_LOW,client->name, ts);\r
if (ret != 0) {\r
printk(KERN_ALERT "Cannot allocate ts INT!ERRNO:%d\n", ret);\r
- gpio_free(INT_PORT);\r
+ gpio_free(irq_to_gpio(ts->irq));\r
goto err_input_register_device_failed;\r
}\r
}\r
{\r
printk(KERN_INFO"Disable TS int!\n");\r
g_enter_isp = 1;\r
- disable_irq(TS_INT);\r
+ disable_irq(gpio_to_irq(ts->irq));\r
}\r
else if(cmd[1] == CMD_ENABLE_TP)\r
{\r
printk(KERN_INFO"Enable TS int!\n");\r
g_enter_isp = 0;\r
- enable_irq(TS_INT);\r
+ enable_irq(gpio_to_irq(ts->irq));\r
}\r
else if(cmd[1] == CMD_READ_VER)\r
{\r
struct rk_ts_data *ts;\r
int len = 0;\r
char *version_info = NULL;\r
- unsigned char read_data[1201] = {80, };\r
+ static unsigned char read_data[1201] = {80, };\r
\r
ts = i2c_get_clientdata(i2c_connect_client);\r
if(ts==NULL)\r