From 0b3fdf011667c2b765a95a6880cfc3eba1ee43c2 Mon Sep 17 00:00:00 2001 From: Andy White Date: Mon, 1 Jun 2020 11:20:38 -0500 Subject: [PATCH] aw8697: smith: Add boot-up vibration Add 1-second long vibration after waveform library load as a boot-up vibration. This is distinct from the f0 calibration pulse. Change-Id: Ic31062da9cbcd163f9af3882e7cdd2bcc389020c Signed-off-by: Perry White Reviewed-on: https://gerrit.mot.com/1593615 SME-Granted: SME Approvals Granted SLTApproved: Slta Waiver Tested-by: Jira Key Reviewed-by: Konstantin Makariev Submit-Approved: Jira Key --- drivers/misc/awinic/aw8697/Kbuild | 4 ++++ drivers/misc/awinic/aw8697/aw8697.c | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/drivers/misc/awinic/aw8697/Kbuild b/drivers/misc/awinic/aw8697/Kbuild index cb708ee2d5af..4cb9b63437aa 100644 --- a/drivers/misc/awinic/aw8697/Kbuild +++ b/drivers/misc/awinic/aw8697/Kbuild @@ -6,4 +6,8 @@ ifneq ($(filter m y,$(CONFIG_INPUT_AWINIC_HAPTIC)),) EXTRA_CFLAGS += -DCONFIG_INPUT_AWINIC_HAPTIC endif +ifneq (,$(filter smith%,$(TARGET_PRODUCT))) + EXTRA_CFLAGS += -DCONFIG_AW8697_BOOT_VIBRATION +endif + obj-m += aw8697.o diff --git a/drivers/misc/awinic/aw8697/aw8697.c b/drivers/misc/awinic/aw8697/aw8697.c index 2cfde05c161f..7e86befe0677 100644 --- a/drivers/misc/awinic/aw8697/aw8697.c +++ b/drivers/misc/awinic/aw8697/aw8697.c @@ -423,6 +423,11 @@ static void aw8697_ram_loaded(const struct firmware *cont, void *context) aw8697_haptic_trig_enable_config(aw8697); +#ifdef CONFIG_AW8697_BOOT_VIBRATION + aw8697_vibrate(aw8697, 1000); /* Boot-up vibration */ +#endif + + aw8697_rtp_update(aw8697); }