mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-10 22:40:54 -04:00
dlkm:optimise pen probe & report function
need report pen status after pen is enable solve kernel panic issue when phone startup sometimes Change-Id: I8ea796fc71ccdb5853e10e600e2093c9ee3fa3ab Signed-off-by: chenlj2 <chenlj2@motorola.com> Reviewed-on: https://gerrit.mot.com/2409191 SME-Granted: SME Approvals Granted SLTApproved: Slta Waiver Tested-by: Jira Key Reviewed-by: Jianqiu Huang <huangjq9@motorola.com> Reviewed-by: Tao Sun <suntao2@motorola.com> Submit-Approved: Jira Key
This commit is contained in:
parent
d68c51f1f9
commit
037d1964af
1 changed files with 5 additions and 1 deletions
|
|
@ -297,6 +297,10 @@ static void pen_report_function(struct work_struct *dat)
|
|||
int counter, status = 0, initial_status;
|
||||
|
||||
pen_dbg_func_in();
|
||||
if (!hall_sensor_dev->enable) {
|
||||
pen_info("[%s] pen isn't enable,don't report.\n", DRIVER_NAME);
|
||||
return;
|
||||
}
|
||||
initial_status = hall_sensor_dev->status;
|
||||
for (counter = 0;counter < 3;counter++){
|
||||
msleep(50);
|
||||
|
|
@ -422,7 +426,7 @@ static int bu520xx_pen_probe(struct platform_device *pdev)
|
|||
}
|
||||
|
||||
spin_lock_init(&hall_sensor_dev->mHallSensorLock);
|
||||
hall_sensor_dev->enable = 1;
|
||||
hall_sensor_dev->enable = 0;
|
||||
|
||||
//set gpio
|
||||
hall_sensor_dev->gpio = of_get_named_gpio_flags(np,
|
||||
|
|
|
|||
Loading…
Reference in a new issue