mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-08 12:58:12 -04:00
aw8697: Stop repeatedly waveform playing
Stop repeatedly waveform playing when receive a stop command. Also cancel the 120s timer when stopping vibrating. When stopping waveform playing, the 120s timer to safely stop vibrating also needs to be canceled because it becomes no use, and it might disturb normal operation when it's triggered later. NO_PROP_NEEDED: This propagation is only needed when the change of framework for this new feature is integrated, being done by engineers in charge of that product. Change-Id: I544ec1c8c391bf5468b22bdd0095a77b9d43d222 Signed-off-by: yangjq <yangjq@lenovo.com> Reviewed-on: https://gerrit.mot.com/1611611 Reviewed-by: Jianqi Yang <yangj@motorola.com> Reviewed-on: https://gerrit.mot.com/1614428 SME-Granted: SME Approvals Granted SLTApproved: Slta Waiver Tested-by: Jira Key Submit-Approved: Jira Key
This commit is contained in:
parent
1dd38c4212
commit
4ba3ddd1dc
1 changed files with 6 additions and 0 deletions
|
|
@ -2565,6 +2565,12 @@ static void aw8697_vibrate(struct aw8697 *aw8697, int value)
|
|||
int seq;
|
||||
|
||||
mutex_lock(&aw8697->lock);
|
||||
#ifdef AW8697_REPEAT_RTP_PLAYING
|
||||
if (aw8697->haptic_mode == HAPTIC_RTP_LOOP) {
|
||||
aw8697->haptic_mode = HAPTIC_RTP;
|
||||
hrtimer_cancel(&aw8697->timer);
|
||||
}
|
||||
#endif
|
||||
aw8697_haptic_stop(aw8697);
|
||||
if (aw8697->index == 0x02)
|
||||
__pm_relax(aw8697->ws);
|
||||
|
|
|
|||
Loading…
Reference in a new issue