Skip to content

Commit

Permalink
Merge pull request #23 from StollD/feature/ipts-no-modeswitch
Browse files Browse the repository at this point in the history
ipts: Dont automatically switch sensor modes
  • Loading branch information
qzed committed Dec 22, 2019
2 parents 8dbbfa6 + 894fbba commit a93d778
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 a93d778

Please sign in to comment.