aw8697: treat 100ms haptics as short vibration

Gboard settings UI allows vibration strength to be 100ms. Make driver
considering 100ms vibration as short haptics instead of long one.

Change-Id: I3fe503b2718e6fa2349cc6fea2f76f4805b0374e
Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Reviewed-on: https://gerrit.mot.com/1667611
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Reviewed-by: Konstantin Makariev <kmakariev@motorola.com>
Submit-Approved: Jira Key
This commit is contained in:
Konstantin Makariev 2020-07-07 12:51:37 -05:00 • committed by Konstantin Makariev
commit 8ea2836beb

View file

@ -2607,7 +2607,7 @@ static void aw8697_vibrate(struct aw8697 *aw8697, int value)
HRTIMER_MODE_REL);
}
#endif
} else if (value < 100 || seq > 2) {
} else if (value <= 100 || seq > 2) {
aw8697->haptic_mode = HAPTIC_SHORT;
if (aw8697->info.short_gain)
aw8697->gain = aw8697->info.short_gain;