IMX6 GT9XX 10.1寸觸摸屏移植

硬件平臺:IMX6Q+GT928(10.1寸)
操作系統:Android 4.2.2

GT928接口原理圖這裏寫圖片描述

觸摸屏接口用到的硬件外設
I2C => I2C3
RST => GPIO2_27
INT => GPIO6_8

註冊GT928 i2c設備

static struct i2c_board_info mxc_i2c2_board_info[] __initdata = {
    {
        I2C_BOARD_INFO("sgtl5000", 0x0a),
    },
    {
        I2C_BOARD_INFO("ov564x", 0x3c),
        .platform_data = (void *)&camera_data,
    },
    {
        I2C_BOARD_INFO("mxc_hdmi_i2c", 0x50),
    },
    {
        I2C_BOARD_INFO("Goodix-TS", 0x14),
//      .irq = gpio_to_irq(SABRESD_CAP_TCH_INT0),
    },
};

修改gt9xx.h對rst和int腳的定義

#define GTP_RST_PORT    IMX_GPIO_NR(2, 27)      
#define GTP_INT_PORT    IMX_GPIO_NR(6, 8) 

修改touchscreen驅動Makefile

ifneq ($(wildcard drivers/input/touchscreen/gt9xx.c),)
obj-$(CONFIG_TOUCHSCREEN_GT9XX)        += gt9xx.o gt9xx_update.o goodix_tool.o 
else
obj-$(CONFIG_TOUCHSCREEN_GT9XX)        += gt9xx.module gt9xx_update.module goodix_tool.module
endif

修改touchscreen驅動Kconfig

config TOUCHSCREEN_TSC2007
    tristate "TSC2007 based touchscreens"
    depends on I2C
    help
      Say Y here if you have a TSC2007 based touchscreen.

      If unsure, say N.

      To compile this driver as a module, choose M here: the
      module will be called tsc2007.



config TOUCHSCREEN_GT9XX
    tristate "GT9XX based touchscreens"
    depends on I2C
    help
      Say Y here if you have a Gt9xx based touchscreen.

      If unsure, say N.

      To compile this driver as a module, choose M here: the
      module will be called gt9xx.

配置內核
添加支持GT928觸摸屏

gt928驅動下載地址
附上調試信息

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章