arm64: defconfig: Actuator noise reduction.

Add CONFIG_AF_NOISE_ELIMINATION for enable/disable actuator separate controlling
to avoid resonance noise during vibrating.

Change-Id: I85d0b4b00a61c4761fa4e13d50da6367a4e3b87b
Signed-off-by: huangdra <huangdra@motorola.com>
Reviewed-on: https://gerrit.mot.com/1835496
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
This commit is contained in:
huangdra authored and Gilberto Gambugge committed 2023-06-01 00:47:14 -03:00
1 parent 4ca15142c9
commit 0891d8d1c1
2 files changed
+19

No files matched your search

+6
View File
@@ -1679,3 +1679,9 @@ source "arch/arm64/kvm/Kconfig"
if CRYPTO
source "arch/arm64/crypto/Kconfig"
endif
config AF_NOISE_ELIMINATION
bool "For elimnating AF resonance noise"
default n
help
Enable it only for produts that suffering AF resonance noise.
+13
View File
@@ -37,6 +37,11 @@
#define QPNP_VIB_MAX_PLAY_MS 15000
#define QPNP_VIB_OVERDRIVE_PLAY_MS 30
#ifdef CONFIG_AF_NOISE_ELIMINATION
extern int mot_actuator_on_vibrate_start(void);
extern int mot_actuator_on_vibrate_stop(void);
#endif
struct vib_ldo_chip {
struct led_classdev cdev;
struct regmap *regmap;
@@ -119,6 +124,14 @@ static inline int qpnp_vib_ldo_enable(struct vib_ldo_chip *chip, bool enable)
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();
else
mot_actuator_on_vibrate_stop();
}
#endif
ret = regmap_update_bits(chip->regmap,
chip->base + QPNP_VIB_LDO_REG_EN_CTL,
QPNP_VIB_LDO_EN,