mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-10 14:19:09 -04:00
aw8695: improve vibrator experience
1. Support to vibrate for 1s when boot up. 2. Change f0 calibrate voltage as 1.8v Vrms. Change-Id: I4f3cbb863d619b6bec343c7db95fc655a8bf06c4 Signed-off-by: Weilong Wu <wuwl10@motorola.com> Reviewed-on: https://gerrit.mot.com/1351275 SLTApproved: Slta Waiver SME-Granted: SME Approvals Granted Tested-by: Jira Key Reviewed-by: Hujun Liao <liaohj@motorola.com> Submit-Approved: Jira Key (cherry picked from commit d0c752bc3b9fdf37c2d86b091b114cbc09f9ad86) Reviewed-on: https://gerrit.mot.com/1365557 Reviewed-by: Jianqi Yang <yangj@motorola.com>
This commit is contained in:
parent
be9b8f9f0c
commit
5ce18e2d3e
2 changed files with 4 additions and 8 deletions
|
|
@ -1404,8 +1404,8 @@ static int aw8695_haptic_get_f0(struct aw8695 *aw8695)
|
|||
|
||||
/* f0 trace parameter */
|
||||
f0_pre_num = 0x05;
|
||||
f0_wait_num = 0x03;
|
||||
f0_repeat_num = 0x02;
|
||||
f0_wait_num = 0x02;
|
||||
f0_repeat_num = 0x0d;
|
||||
f0_trace_num = 0x0f;
|
||||
aw8695_i2c_write(aw8695, AW8695_REG_NUM_F0_1, (f0_pre_num << 4) | (f0_wait_num << 0));
|
||||
aw8695_i2c_write(aw8695, AW8695_REG_NUM_F0_2, (f0_repeat_num << 0));
|
||||
|
|
@ -1511,10 +1511,6 @@ static int aw8695_haptic_f0_calibration(struct aw8695 *aw8695)
|
|||
pr_info("%s final trim_lra=0x%02x\n", __func__, reg_val);
|
||||
}
|
||||
|
||||
if (aw8695_haptic_get_f0(aw8695)) {
|
||||
pr_err("%s get f0 error, user defafult f0\n", __func__);
|
||||
}
|
||||
|
||||
/* restore default work mode */
|
||||
aw8695_haptic_play_mode(aw8695, AW8695_HAPTIC_STANDBY_MODE);
|
||||
aw8695->play_mode = AW8695_HAPTIC_RAM_MODE;
|
||||
|
|
|
|||
|
|
@ -76,8 +76,8 @@
|
|||
#ifdef LRA_205HZ
|
||||
#define AW8695_HAPTIC_F0_PRE 2050 // 205Hz
|
||||
#define AW8695_HAPTIC_F0_CALI_PERCEN 7 // -7%~7%
|
||||
#define AW8695_HAPTIC_CONT_DRV_LVL 115 // 125*6.1/255=2.75v
|
||||
#define AW8695_HAPTIC_CONT_DRV_LVL_OV 135 // 155*6.1/255=3.22v
|
||||
#define AW8695_HAPTIC_CONT_DRV_LVL 100 // 125*6.1/255=2.75v
|
||||
#define AW8695_HAPTIC_CONT_DRV_LVL_OV 120 // 155*6.1/255=3.22v
|
||||
#define AW8695_HAPTIC_CONT_TD 0x006c
|
||||
#define AW8695_HAPTIC_CONT_ZC_THR 0x0ff1
|
||||
#define AW8695_HAPTIC_CONT_NUM_BRK 3
|
||||
|
|
|
|||
Loading…
Reference in a new issue