diff options
author | Wendly Li <wendlyli@google.com> | 2022-07-07 14:52:58 +0000 |
---|---|---|
committer | Wendly Li <wendlyli@google.com> | 2022-07-08 03:43:59 +0000 |
commit | dac3f71bb15804dd88e2d567a51a8e1354fbfc9a (patch) | |
tree | 0261e01cc09ca0af1744b0befc54fb83fc1873fa /goodix_brl_hw.c | |
parent | 45b9a13cb2d8bebb7b62d02c5b8a69caa680775b (diff) | |
download | goodix_touch-dac3f71bb15804dd88e2d567a51a8e1354fbfc9a.tar.gz |
touch/goodix: Update driver for v10 fw
Bug: 214118830
Bug: 214118837
Test: Be able to enable/disable palm mode
Test: Be able to report heatmap to offload and v4l
Change-Id: I66654bebd01d5226f9efff88953275519dd30b16
Signed-off-by: Wendly Li <wendlyli@google.com>
Diffstat (limited to 'goodix_brl_hw.c')
-rw-r--r-- | goodix_brl_hw.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/goodix_brl_hw.c b/goodix_brl_hw.c index f0d6290..30d6d74 100644 --- a/goodix_brl_hw.c +++ b/goodix_brl_hw.c @@ -1265,15 +1265,11 @@ static int brl_after_event_handler(struct goodix_ts_core *cd) struct goodix_ts_hw_ops *hw_ops = cd->hw_ops; struct goodix_ic_info_misc *misc = &cd->ic_info.misc; u8 sync_clean[1] = { 0 }; - int ret = 0; if (cd->tools_ctrl_sync) return 0; - ret = hw_ops->write(cd, misc->touch_data_addr, sync_clean, sizeof(sync_clean)); - if (ret != 0) - return ret; - return hw_ops->write(cd, misc->frame_data_addr, sync_clean, sizeof(sync_clean)); + return hw_ops->write(cd, misc->touch_data_addr, sync_clean, sizeof(sync_clean)); } static int brld_get_framedata( @@ -1561,7 +1557,7 @@ int brl_set_palm_enabled(struct goodix_ts_core *cd, bool enabled) cmd.cmd = GOODIX_CMD_SET_CUSTOM_MODE; cmd.len = 6; cmd.data[0] = CUSTOM_MODE_PALM; - cmd.data[1] = enabled ? 0 : 1; + cmd.data[1] = enabled ? 1 : 0; if (cd->hw_ops->send_cmd(cd, &cmd)) ts_err("failed to %s palm mode", enabled ? "enable" : "disable"); @@ -1580,7 +1576,7 @@ int brl_get_palm_enabled(struct goodix_ts_core *cd, bool *enabled) *enabled = false; return ret; } - *enabled = (val & CUSTOM_MODE_MASK_PALM) == 0; + *enabled = (val & CUSTOM_MODE_MASK_PALM) != 0; return ret; } |