From 387f5b571694d0be44012b336e499c0b20601c8d Mon Sep 17 00:00:00 2001 From: dengwei1 Date: Mon, 18 Apr 2022 18:00:02 +0800 Subject: [PATCH] rhode: vibrator move camera notice after enable move camera notice after enable Change-Id: I6013833c4658ec4784868742c3f5900f465b53f6 Signed-off-by: dengwei1 Reviewed-on: https://gerrit.mot.com/2245040 SME-Granted: SME Approvals Granted SLTApproved: Slta Waiver Tested-by: Jira Key Reviewed-by: Wang Wang Submit-Approved: Jira Key --- .../misc/ldo_vibrator_mmi/moto_ldo_vibrator.c | 23 ++++++++++--------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/drivers/misc/ldo_vibrator_mmi/moto_ldo_vibrator.c b/drivers/misc/ldo_vibrator_mmi/moto_ldo_vibrator.c index fda476615c0a..d9a9c3e4cf53 100644 --- a/drivers/misc/ldo_vibrator_mmi/moto_ldo_vibrator.c +++ b/drivers/misc/ldo_vibrator_mmi/moto_ldo_vibrator.c @@ -50,17 +50,6 @@ static inline int moto_vib_ldo_enable(struct vib_ldo_chip *chip, bool enable) if (chip->vib_enabled == enable) return 0; -#ifdef CONFIG_VIBRATOR_NOISE_CAMERA - if ((chip->vib_play_ms > 70) && (enable)) { - mot_actuator_on_vibrate_start(); - mot_actuator_started = 1; - } - if(!(enable) && (mot_actuator_started == 1 )) { - mot_actuator_on_vibrate_stop(); - mot_actuator_started = 0; - } -#endif - pr_debug("moto_vib_ldo_enable enable = %d\n", enable); if (enable) { @@ -76,6 +65,18 @@ static inline int moto_vib_ldo_enable(struct vib_ldo_chip *chip, bool enable) chip->vib_enabled = false; } +#ifdef CONFIG_VIBRATOR_NOISE_CAMERA + if ((chip->vib_play_ms > 70) && (enable)) { + mot_actuator_on_vibrate_start(); + mot_actuator_started = 1; + } + if(!(enable) && (mot_actuator_started == 1 )) { + mot_actuator_on_vibrate_stop(); + mot_actuator_started = 0; + } + pr_debug("moto_vib_ldo_enable camera done\n"); +#endif + return ret; }