Caprip: modify the actuator noise reduction work flow.
when app send "long vib+short vib"(such as 200+50) to driver. Driver could not stop actuator correctly. Change-Id: I83095079418f31b536ca00b88b4c7e19e07e2aa6 Signed-off-by: huangdra <huangdra@motorola.com> Reviewed-on: https://gerrit.mot.com/1968503 SME-Granted: SME Approvals Granted SLTApproved: Slta Waiver Tested-by: Jira Key Reviewed-by: Zhangqing Huang <huangzq2@motorola.com> Reviewed-by: Wang Wang <wangwang1@lenovo.com> Submit-Approved: Jira Key
This commit is contained in:
1 parent
24b662adbd
commit
13447c9f2c
1 file changed
+8
-5
@@ -120,18 +120,21 @@ static int qpnp_vib_ldo_set_voltage(struct vib_ldo_chip *chip, int new_uV)
|
||||
static inline int qpnp_vib_ldo_enable(struct vib_ldo_chip *chip, bool enable)
|
||||
{
|
||||
int ret;
|
||||
#ifdef CONFIG_AF_NOISE_ELIMINATION
|
||||
static int mot_actuator_started = 0;
|
||||
#endif
|
||||
|
||||
if (chip->vib_enabled == enable)
|
||||
return 0;
|
||||
|
||||
#ifdef CONFIG_AF_NOISE_ELIMINATION
|
||||
if (chip->vib_play_ms > 80) {
|
||||
if (enable)
|
||||
mot_actuator_on_vibrate_start();
|
||||
if ((chip->vib_play_ms > 80) && (enable)) {
|
||||
mot_actuator_on_vibrate_start();
|
||||
mot_actuator_started = 1;
|
||||
}
|
||||
if(!enable)
|
||||
{
|
||||
if(!enable && (mot_actuator_started == 1 )) {
|
||||
mot_actuator_on_vibrate_stop();
|
||||
mot_actuator_started = 0;
|
||||
}
|
||||
#endif
|
||||
ret = regmap_update_bits(chip->regmap,
|
||||
|
||||
Reference in new issue
Block a user