mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-10 22:40:54 -04:00
sensor: fix incorrect event report for stylus_pen
For the EV_SW type event, only the event value of 0/1 will be reported, and other values are reported as value 1 reported. If the status is unstable, the status of the report will be inconsistent with the actual status. Remove unnecessary events that reported value 2. Change-Id: I304dc9632f026a8417d2ac87cf19be6e31f05ca4 Signed-off-by: huangjq9 <huangjq9@motorola.com> Reviewed-on: https://gerrit.mot.com/1442158 SLTApproved: Slta Waiver SME-Granted: SME Approvals Granted Tested-by: Jira Key Reviewed-by: Huosheng Liao <liaohs@motorola.com> Submit-Approved: Jira Key
This commit is contained in:
parent
7626f5344e
commit
5379d3d0f3
1 changed files with 2 additions and 4 deletions
|
|
@ -306,15 +306,13 @@ static void pen_report_function(struct work_struct *dat)
|
|||
}else{
|
||||
hall_sensor_dev->status = 0;
|
||||
}
|
||||
pen_info("[%s] SW_PEN_INSERTED check value = %d\n", DRIVER_NAME,!hall_sensor_dev->status);
|
||||
pen_info("[%s] SW_PEN_INSERTED check[%d] value = %d\n", DRIVER_NAME, counter, !hall_sensor_dev->status);
|
||||
spin_unlock_irqrestore(&hall_sensor_dev->mHallSensorLock, flags);
|
||||
}
|
||||
|
||||
if((status > 0) && (status < 3)){
|
||||
pen_info("[%s] SW_PEN_INSERTED do not report to framework.\n", DRIVER_NAME);
|
||||
hall_sensor_dev->status = initial_status;
|
||||
input_report_switch(hall_sensor_dev->pen_indev, SW_PEN_INSERTED, 2);
|
||||
input_sync(hall_sensor_dev->pen_indev);
|
||||
//wake_unlock(&hall_sensor_dev->wake_lock);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue