mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-13 00:00:00 -04:00
dlkm: aw8624: fixed abnormal vibrator issue
In some scenario, vibrator may can not stop immediately because stop command was returned. use 5ms delay to replace it and make sure short vibrator can work well. Change-Id: I82720f0d031c7306e1b5f806aa5a380ccccb8eec Signed-off-by: Weilong Wu <wuwl10@motorola.com> Reviewed-on: https://gerrit.mot.com/1436810 SLTApproved: Slta Waiver SME-Granted: SME Approvals Granted Tested-by: Jira Key Reviewed-by: Hujun Liao <liaohj@motorola.com> Submit-Approved: Jira Key
This commit is contained in:
parent
4d7ceac3fc
commit
499088dfa7
1 changed files with 3 additions and 1 deletions
|
|
@ -1550,6 +1550,7 @@ static ssize_t aw8624_duration_store(struct device *dev,
|
|||
if (rc < 0)
|
||||
return rc;
|
||||
|
||||
pr_debug("%s: value=%d\n", __FUNCTION__, val);
|
||||
/* setting 0 on duration is NOP for now */
|
||||
if (val <= 0)
|
||||
return count;
|
||||
|
|
@ -1590,7 +1591,8 @@ static ssize_t aw8624_activate_store(struct device *dev,
|
|||
pr_debug("%s: value=%d\n", __FUNCTION__, val);
|
||||
|
||||
if (val == 0)
|
||||
return count;
|
||||
msleep(5);
|
||||
|
||||
mutex_lock(&aw8624->lock);
|
||||
hrtimer_cancel(&aw8624->timer);
|
||||
aw8624->state = val;
|
||||
|
|
|
|||
Loading…
Reference in a new issue