aw869x: Add debug code for vibrating fail issue

As for the vibrating fail issue is difficult to reproduce, add debug
codes from awinic to find more if it's reproduced by user.

Change-Id: I588875a1baa201fb2088f0fdc0ac4dc27e0537a7
Signed-off-by: yangjq <yangjq@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1247441
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Submit-Approved: Jira Key
This commit is contained in:
yangjq 2018-09-27 12:14:25 +08:00 • committed by Jianqi Yang
commit 36d842cd14

View file

@ -486,6 +486,11 @@ static int aw869x_haptic_stop(struct aw869x *aw869x)
aw869x_haptic_play_mode(aw869x, AW869X_HAPTIC_STANDBY_MODE);
aw869x_i2c_write_bits(aw869x, AW869X_REG_SYSCTRL,
AW869X_BIT_SYSCTRL_WORK_MODE_MASK, AW869X_BIT_SYSCTRL_STANDBY);
msleep(1);
/* RAMINIT Disable */
aw869x_i2c_write_bits(aw869x, AW869X_REG_SYSCTRL,
AW869X_BIT_SYSCTRL_RAMINIT_MASK, AW869X_BIT_SYSCTRL_RAMINIT_OFF);
/* RAMINIT Disable End */
return 0;
}
@ -493,7 +498,12 @@ static int aw869x_haptic_start(struct aw869x *aw869x)
{
aw869x_i2c_write_bits(aw869x, AW869X_REG_SYSCTRL,
AW869X_BIT_SYSCTRL_WORK_MODE_MASK, AW869X_BIT_SYSCTRL_ACTIVE);
aw869x_i2c_write(aw869x, AW869X_REG_PROC_CTRL,
/* RAMINIT Enable */
aw869x_i2c_write_bits(aw869x, AW869X_REG_SYSCTRL,
AW869X_BIT_SYSCTRL_RAMINIT_MASK, AW869X_BIT_SYSCTRL_RAMINIT_EN);
/* RAMINIT Enable End */
aw869x_interrupt_clear(aw869x);
aw869x_i2c_write(aw869x, AW869X_REG_PROC_CTRL,
AW869X_BIT_PROC_CTRL_GO);
return 0;
}