环境配置
驱动配置
-
把代码移动到 kernel路径下
$KERNEL_SRC/drivers/input/touchscree/
-
修改
$KERNEL_SRC/drivers/input/touchscree/Makefile
在Makefile的最后添加obj-y += goodix_berlin_driver/
-
修改
$KERNEL_SRC/drivers/input/touchscree/Kconfg
在Kconfig的最后添加source "drivers/input/touchscreen/goodix_berlin_driver/Kconfig"
这个目的是为了在“make menuconfig”中能够选择打开驱动,在每次编译的前,进入make menuconfig选择打开驱动,
打开驱动配置
Setting up in the defconfig file
在/rk3588_android12.0/kernel-5.10/arch/arm64/configs/rockchip_defconfig
- Add the following in you defconfig file.
CONFIG_TOUCHSCREEN_GOODIX_BRL=y
or
CONFIG_TOUCHSCREEN_GOODIX_BRL=m
- If you are on SPI connection, add the following.
CONFIG_TOUCHSCREEN_GOODIX_BRL_SPI=y
- if you are on I2C connection, add the following.
CONFIG_TOUCHSCREEN_GOODIX_BRL_I2C=y
遇到问题
01-01 00:00:01.991 205 205 I vendor storage: 20190527 ret = 0
01-01 00:00:02.059 1 1 E : [GTP-ERR][goodix_i2c_write] I2c write failed,dev:5d,reg:10000,size:8
01-01 00:00:02.060 1 1 E : [GTP-ERR][goodix_ts_power_on] failed power on, -11
01-01 00:00:02.060 1 1 E : [GTP-ERR][goodix_ts_probe] failed power on
01-01 00:00:02.060 1 1 E : [GTP-ERR][goodix_ts_probe] goodix_ts_core failed, ret:-11
01-01 00:00:02.060 1 1 W goodix_ts: probe of goodix_ts.0 failed with error -11
硬件上I2C没连上