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 <awhite6@motorola.com>
Reviewed-on: https://gerrit.mot.com/1593615
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Konstantin Makariev <kmakariev@motorola.com>
Submit-Approved: Jira Key
This commit is contained in:
Andy White 2020-06-01 11:20:38 -05:00
commit 0b3fdf0116
2 changed files with 9 additions and 0 deletions

View file

@ -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

View file

@ -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);
}