Skip to content

Commit

Permalink
ipts: Dont automatically switch sensor modes
Browse files Browse the repository at this point in the history
We don't want IPTS to set itself to singletouch mode in case it thinks
that might fix anything, because it doesn't. Even a malfunctioning
multitouch IPTS has a higher chance of working than singletouch.

Signed-off-by: Dorian Stoll <dorian.stoll@tmsp.io>
  • Loading branch information
StollD committed Dec 20, 2019
1 parent 8dbbfa6 commit 894fbba
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 24 deletions.
4 changes: 0 additions & 4 deletions drivers/misc/ipts/ipts.h
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,6 @@ struct ipts_info {
int gfx_status;
bool display_status;

bool switch_sensor_mode;
enum touch_sensor_mode new_sensor_mode;

int retry;
bool restart;
};

Expand Down
20 changes: 0 additions & 20 deletions drivers/misc/ipts/msg-handler.c
Original file line number Diff line number Diff line change
Expand Up @@ -171,14 +171,6 @@ int ipts_restart(struct ipts_info *ipts)
{
ipts_dbg(ipts, "ipts restart\n");
ipts_stop(ipts);
ipts->retry++;

// Try wth HID mode
if (ipts->retry == IPTS_MAX_RETRY &&
ipts->sensor_mode == TOUCH_SENSOR_MODE_RAW_DATA)
ipts->sensor_mode = TOUCH_SENSOR_MODE_HID;
else if (ipts->retry > IPTS_MAX_RETRY)
return -EPERM;

ipts_send_sensor_quiesce_io_cmd(ipts);
ipts->restart = true;
Expand Down Expand Up @@ -360,9 +352,6 @@ int ipts_handle_resp(struct ipts_info *ipts,
cmd_status = ipts_handle_cmd(ipts,
TOUCH_SENSOR_HID_READY_FOR_DATA_CMD, NULL, 0);

// reset retry since we are getting touh data
ipts->retry = 0;

break;
}
case TOUCH_SENSOR_QUIESCE_IO_RSP: {
Expand All @@ -381,15 +370,6 @@ int ipts_handle_resp(struct ipts_info *ipts,
break;
}

// support sysfs debug node for switch sensor mode
if (ipts->switch_sensor_mode) {
ipts_set_state(ipts, IPTS_STA_INIT);
ipts->sensor_mode = ipts->new_sensor_mode;
ipts->switch_sensor_mode = false;

ipts_send_sensor_clear_mem_window_cmd(ipts);
}

break;
}
}
Expand Down

0 comments on commit 894fbba

Please sign in to comment.