diff options
author | davidycchen <davidycchen@google.com> | 2021-08-02 13:57:40 +0800 |
---|---|---|
committer | David Chen <davidycchen@google.com> | 2021-08-04 02:18:11 +0000 |
commit | debbe1aacd0ae579c0aef6dd28359486b402a106 (patch) | |
tree | 162d6b2d555bdf9b4564f8afef32e0d80b545efa | |
parent | 7fb11a00f2abe804965ec0e0deffe595bc151f21 (diff) | |
download | fts_touch-debbe1aacd0ae579c0aef6dd28359486b402a106.tar.gz |
touch: fst2: enable touch controller interrupt
Enable the touch controller interrupt by setting touch register.
This is a temporary solution provided by the vendor and the interrupt
enable should be done by firmware in later version.
Bug: 193085179
Signed-off-by: davidycchen <davidycchen@google.com>
Change-Id: Ia77704c423b681685c5c01d138873201dddbe0ca
-rw-r--r-- | fst2/fts.c | 8 | ||||
-rw-r--r-- | fst2/fts_lib/fts_io.c | 7 |
2 files changed, 15 insertions, 0 deletions
@@ -718,6 +718,9 @@ static void unregister_panel_bridge(struct drm_bridge *bridge) static int fts_init_sensing(struct fts_ts_info *info) { int error = 0; + int add = 0x001C; + uint8_t int_data = 0x01; + int res = 0; error |= register_panel_bridge(info); error |= fts_interrupt_install(info); @@ -725,6 +728,11 @@ static int fts_init_sensing(struct fts_ts_info *info) error |= fts_mode_handler(info, 0); error |= fts_reset_disable_irq_count(); + res = fts_write_fw_reg(add, &int_data, 1); + if (res < OK) { + log_info(1, "%s ERROR %08X\n", __func__, res); + } + if (error < OK) log_info(1, "%s: Init error (ERROR = %08X)\n", __func__, error); diff --git a/fst2/fts_lib/fts_io.c b/fst2/fts_lib/fts_io.c index f7c4fb1..e7c9e60 100644 --- a/fst2/fts_lib/fts_io.c +++ b/fst2/fts_lib/fts_io.c @@ -905,6 +905,8 @@ int fts_system_reset(int poll_event) u8 data = SYSTEM_RESET_VAL; int event_to_search = EVT_ID_CONTROLLER_READY; u8 read_data[8] = { 0x00 }; + int add = 0x001C; + uint8_t int_data = 0x01; if (reset_gpio == GPIO_NOT_DEFINED) { res = fts_write_u8ux(FTS_CMD_HW_REG_W, BITS_32, SYS_RST_ADDR, @@ -928,6 +930,11 @@ int fts_system_reset(int poll_event) } else msleep(100); + res = fts_write_fw_reg(add, &int_data, 1); + if (res < OK) { + log_info(1, "%s ERROR %08X\n", __func__, res); + } + return res; } |