RK3188 触摸屏调试(基于radxa rock)

来源:互联网 发布:js图片特效 编辑:程序博客网 时间:2024/05/01 21:38

使用Goodix 的GT801进行调试

1、内核配置


选中GT801


2、修改相应的PIN脚定义

修改的相关文件:

/kernel/arch/arm/mach-rk30/board-rk30-box.c

根据硬件的实际情况配置,主要改动 RESET ,PWR, IRQ 引脚

#if defined(CONFIG_TOUCHSCREEN_GT8XX)#define TOUCH_RESET_PIN  RK30_PIN4_PD0     //根据硬件的实际情况去配置#define TOUCH_PWR_PIN    INVALID_GPIO      //根据硬件的实际情况去配置int goodix_init_platform_hw(void){   ...}

#ifdef CONFIG_I2C2_RK30static 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

3、kernel/drivers/input/touchscreen/Makefile

看这个配置对应的驱动文件

obj-$(CONFIG_D70_L3188A)                += goodix_touch.oobj-$(CONFIG_TOUCHSCREEN_GT8XX)                += rk29_i2c_goodix.o

从上面看到GT8XX 对应的驱动文件是 rk29_i2C_goodix.c


4、kernel/drivers/input/touchscreen/rk29_i2c_goodix.c

static struct i2c_driver rk_ts_driver = {        .probe          = rk_ts_probe,        .remove         = rk_ts_remove,        .shutdown       = rk_ts_shutdown,#ifndef CONFIG_HAS_EARLYSUSPEND        .suspend        = rk_ts_suspend,        .resume         = rk_ts_resume,#endif        .id_table       = goodix_ts_id,        .driver = {                .name   = "Goodix-TS",  //此处的名字和<span style="font-family: 微软雅黑; font-size: 14px;">board-rk30-box.c中的type要保持一致</span>                .owner = THIS_MODULE,        },};



 


0 0
原创粉丝点击