From 46a823467054dba0a99d4b60607e0e7f86f65dac Mon Sep 17 00:00:00 2001 From: yangjq Date: Wed, 15 Aug 2018 11:10:21 +0800 Subject: [PATCH] Vibrate 1 second when booting in driver instead in rc The EVT1A phone with TI's drv2624 vibrator controller would vibrate twice when booting which is not good. So move vibrating from init.mmi.overlay.rc here as TI drv2624's auto-calibration does on boot time. Change-Id: Ie4dd78615fb88785a12c0b523832de17e30da4e2 Signed-off-by: yangjq Reviewed-on: https://gerrit.mot.com/1227043 SME-Granted: SME Approvals Granted SLTApproved: Slta Waiver Tested-by: Jira Key Reviewed-by: Tao Sun Submit-Approved: Jira Key --- drivers/misc/awinic/aw869x.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/misc/awinic/aw869x.c b/drivers/misc/awinic/aw869x.c index f14eed5f5ef7..d2265699e214 100644 --- a/drivers/misc/awinic/aw869x.c +++ b/drivers/misc/awinic/aw869x.c @@ -74,7 +74,7 @@ struct aw869x *g_aw869x; * ******************************************************/ static void aw869x_interrupt_clear(struct aw869x *aw869x); - +static void aw869x_vibrate(struct aw869x *aw869x, int value); /****************************************************** * @@ -211,6 +211,9 @@ static void aw869x_rtp_loaded(const struct firmware *cont, void *context) aw869x->rtp_init = 1; pr_info("%s: rtp update complete\n", __func__); + + /* Vibrate for 1 second as TI drv2624's auto-calibration does */ + aw869x_vibrate(aw869x, 1000); } static int aw869x_rtp_update(struct aw869x *aw869x)