Skip to content

GTX8 enhancements #19

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 0 additions & 10 deletions drivers/input/touchscreen/gtx8/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,6 @@ menuconfig TOUCHSCREEN_GOODIX_GTX8

if TOUCHSCREEN_GOODIX_GTX8

config TOUCHSCREEN_GOODIX_GTX8_UPDATE
tristate "Goodix GTx8 firmware update module"
default y
help
Say Y here to enable support for doing firmware update.

If unsure, say N.

To compile this driver as a module, choose M here.

config TOUCHSCREEN_GOODIX_GTX8_GESTURE
tristate "Goodix GTx8 gesture wakeup feature"
default n
Expand Down
1 change: 0 additions & 1 deletion drivers/input/touchscreen/gtx8/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
obj-$(CONFIG_TOUCHSCREEN_GOODIX_GTX8) += goodix_core.o
goodix_core-y := goodix_ts_i2c.o goodix_ts_core.o goodix_cfg_bin.o
obj-$(CONFIG_TOUCHSCREEN_GOODIX_GTX8_UPDATE) += goodix_gtx8_update.o
obj-$(CONFIG_TOUCHSCREEN_GOODIX_GTX8_GESTURE) += goodix_ts_gesture.o
obj-$(CONFIG_TOUCHSCREEN_GOODIX_GTX8_TOOLS) += goodix_ts_tools.o
60 changes: 30 additions & 30 deletions drivers/input/touchscreen/gtx8/goodix_cfg_bin.c
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ static int goodix_parse_cfg_bin(struct goodix_cfg_bin *cfg_bin)
}

/*debug, print pkg information*/
ts_info("Driver bin info: ver %s, len %d, pkgs %d",
ts_debug("Driver bin info: ver %s, len %d, pkgs %d",
cfg_bin->head.bin_version, cfg_bin->head.bin_len,
cfg_bin->head.pkg_num);
for (i = 0; i < cfg_bin->head.pkg_num; i++) {
Expand Down Expand Up @@ -206,7 +206,7 @@ static int goodix_cfg_bin_proc(struct goodix_ts_core *core_data)
/*parse cfg bin*/
r = goodix_parse_cfg_bin(cfg_bin);
if (!r) {
ts_info("parse cfg bin SUCCESS");
ts_debug("parse cfg bin SUCCESS");
} else {
ts_err("parse cfg bin FAILED");
goto exit;
Expand All @@ -215,25 +215,25 @@ static int goodix_cfg_bin_proc(struct goodix_ts_core *core_data)
/*get register address and configuration from cfg bin*/
r = goodix_get_reg_and_cfg(ts_dev, cfg_bin);
if (!r) {
ts_info("success get reg and cfg info from cfg bin");
ts_debug("success get reg and cfg info from cfg bin");
} else {
ts_err("failed get cfg and reg info, update fw then retry");
}

/*debug*/
ts_info("cfg_send_flag:0x%04x", ts_dev->reg.cfg_send_flag);
ts_info("pid:0x%04x", ts_dev->reg.pid);
ts_info("vid:0x%04x", ts_dev->reg.vid);
ts_info("sensor_id:0x%04x", ts_dev->reg.sensor_id);
ts_info("fw_mask:0x%04x", ts_dev->reg.fw_mask);
ts_info("fw_status:0x%04x", ts_dev->reg.fw_status);
ts_info("cfg_addr:0x%04x", ts_dev->reg.cfg_addr);
ts_info("esd:0x%04x", ts_dev->reg.esd);
ts_info("command:0x%04x", ts_dev->reg.command);
ts_info("coor:0x%04x", ts_dev->reg.coor);
ts_info("gesture:0x%04x", ts_dev->reg.gesture);
ts_info("fw_request:0x%04x", ts_dev->reg.fw_request);
ts_info("proximity:0x%04x", ts_dev->reg.proximity);
ts_debug("cfg_send_flag:0x%04x", ts_dev->reg.cfg_send_flag);
ts_debug("pid:0x%04x", ts_dev->reg.pid);
ts_debug("vid:0x%04x", ts_dev->reg.vid);
ts_debug("sensor_id:0x%04x", ts_dev->reg.sensor_id);
ts_debug("fw_mask:0x%04x", ts_dev->reg.fw_mask);
ts_debug("fw_status:0x%04x", ts_dev->reg.fw_status);
ts_debug("cfg_addr:0x%04x", ts_dev->reg.cfg_addr);
ts_debug("esd:0x%04x", ts_dev->reg.esd);
ts_debug("command:0x%04x", ts_dev->reg.command);
ts_debug("coor:0x%04x", ts_dev->reg.coor);
ts_debug("gesture:0x%04x", ts_dev->reg.gesture);
ts_debug("fw_request:0x%04x", ts_dev->reg.fw_request);
ts_debug("proximity:0x%04x", ts_dev->reg.proximity);

exit:
kfree(cfg_bin->cfg_pkgs);
Expand All @@ -244,7 +244,7 @@ static int goodix_cfg_bin_proc(struct goodix_ts_core *core_data)
else
goodix_ts_blocking_notify(NOTIFY_CFG_BIN_SUCCESS, &r);

ts_info("cfg bin state %d, ret %d", ts_dev->cfg_bin_state, r);
ts_debug("cfg bin state %d, ret %d", ts_dev->cfg_bin_state, r);
return r;
}

Expand All @@ -269,13 +269,13 @@ static int goodix_extract_cfg_pkg(struct goodix_ts_device *ts_dev,
return -EINVAL;
}
if (ts_cfg->length) {
ts_info("get config type %d, len %d",
ts_debug("get config type %d, len %d",
cfg_pkg->cnst_info.cfg_type, ts_cfg->length);
memcpy(ts_cfg->data, cfg_pkg->cfg, ts_cfg->length);
ts_cfg->initialized = TS_CFG_STABLE;
mutex_init(&ts_cfg->lock);
} else {
ts_info("no config data");
ts_debug("no config data");
}

/*get register info*/
Expand Down Expand Up @@ -336,12 +336,12 @@ static int goodix_get_reg_and_cfg(struct goodix_ts_device *ts_dev,
continue;
}

ts_info("ic_type:%d", ts_dev->ic_type);
ts_debug("ic_type:%d", ts_dev->ic_type);

/* contrast sensor id */
addr = cfg_bin->cfg_pkgs[i].reg_info.sensor_id.addr;
if (!addr) {
ts_info("pkg:%d, sensor_id reg is NULL", i);
ts_debug("pkg:%d, sensor_id reg is NULL", i);
continue;
}

Expand All @@ -351,7 +351,7 @@ static int goodix_get_reg_and_cfg(struct goodix_ts_device *ts_dev,
addr);
goto get_default_pkg;
}
ts_info("sensor id is %d", temp_sensor_id);
ts_debug("sensor id is %d", temp_sensor_id);
/*sensor.reserved1 is a mask, if it's not ZERO, use it*/
if (cfg_bin->cfg_pkgs[i].reg_info.sensor_id.reserved1 != 0)
temp_sensor_id &= cfg_bin->cfg_pkgs[i]
Expand Down Expand Up @@ -416,7 +416,7 @@ static int goodix_get_reg_and_cfg(struct goodix_ts_device *ts_dev,
continue;
}

ts_info("try get package info: ic type %s, cfg type %d",
ts_debug("try get package info: ic type %s, cfg type %d",
cfg_bin->cfg_pkgs[i].cnst_info.ic_type,
cfg_bin->cfg_pkgs[i].cnst_info.cfg_type);
/* currently only support normal and high_sense config */
Expand All @@ -428,7 +428,7 @@ static int goodix_get_reg_and_cfg(struct goodix_ts_device *ts_dev,
if (!r) {
ts_dev->cfg_bin_state =
CFG_BIN_STATE_INITIALIZED;
ts_info("success parse cfg bin");
ts_debug("success parse cfg bin");
} else {
ts_err("failed parse cfg bin");
break;
Expand All @@ -449,7 +449,7 @@ static int goodix_get_reg_and_cfg(struct goodix_ts_device *ts_dev,
ts_dev->cfg_bin_state = CFG_BIN_STATE_ERROR;
} else {
ts_dev->cfg_bin_state = CFG_BIN_STATE_TEMP;
ts_info("get temp config data");
ts_debug("get temp config data");
}

r = -EINVAL;
Expand All @@ -468,7 +468,7 @@ static int goodix_read_cfg_bin(struct device *dev,
/*get cfg_bin_name*/
strlcpy(cfg_bin_name, TS_DEFAULT_CFG_BIN, sizeof(cfg_bin_name));

ts_info("cfg_bin_name:%s", cfg_bin_name);
ts_debug("cfg_bin_name:%s", cfg_bin_name);

for (i = 0; i < TS_RQST_FW_RETRY_TIMES; i++) {
r = request_firmware(&firmware, cfg_bin_name, dev);
Expand All @@ -477,7 +477,7 @@ static int goodix_read_cfg_bin(struct device *dev,
cfg_bin_name, r, i + 1);
msleep(1000);
} else {
ts_info("Cfg_bin image [%s] is ready, try_times:%d",
ts_debug("Cfg_bin image [%s] is ready, try_times:%d",
cfg_bin_name, i + 1);
break;
}
Expand Down Expand Up @@ -564,7 +564,7 @@ static int goodix_later_init_thread(void *data)
if (ret)
ts_err("parse cfg bin encounter error, %d", ret);
else
ts_info("success get cfg bin");
ts_debug("success get cfg bin");

if (ts_dev->cfg_bin_state == CFG_BIN_STATE_ERROR) {
ts_err("parse cfg bin encounter fatal err");
Expand All @@ -580,7 +580,7 @@ static int goodix_later_init_thread(void *data)
ts_err("fw update failed, %d", ret);
goto release_core;
}
ts_info("fw update success retry parse cfg bin");
ts_debug("fw update success retry parse cfg bin");
ret = goodix_cfg_bin_proc(ts_core);
if (ret) {
ts_err("failed parse cfg bin after fw update");
Expand All @@ -598,7 +598,7 @@ static int goodix_later_init_thread(void *data)
}
ret = goodix_ts_stage2_init(ts_core);
if (!ret) {
ts_info("stage2 init success");
ts_debug("stage2 init success");
return ret;
}
ts_err("stage2 init failed, %d", ret);
Expand Down
6 changes: 0 additions & 6 deletions drivers/input/touchscreen/gtx8/goodix_default_fw.h

This file was deleted.

Loading