summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordianlujitao <dianlujitao@lineageos.org>2018-02-02 17:31:04 +0800
committerMichael Bestas <mkbestas@lineageos.org>2020-05-01 18:21:41 +0300
commit90c10133cc8328fa367cc06a16facef32b1fc6ac (patch)
tree0192a38f86453ba034b1d1652a345816fe49fa40
parent3a3483a0c47be13dad8513bb243f05c6e41f02ba (diff)
input: fingerprint: goodix: Respect capacitive keys state
* Only report home key event when capacitive keys enabled Change-Id: Id30ba1fd7a589b2fce7bd3d2f433a6b1d756b37d
-rw-r--r--drivers/input/fingerprint/goodix/gf_spi.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/input/fingerprint/goodix/gf_spi.c b/drivers/input/fingerprint/goodix/gf_spi.c
index baf31edfb878..8f40c0ee5ae3 100644
--- a/drivers/input/fingerprint/goodix/gf_spi.c
+++ b/drivers/input/fingerprint/goodix/gf_spi.c
@@ -52,6 +52,10 @@
#include <linux/platform_device.h>
#endif
+#ifdef CONFIG_TOUCHSCREEN_COMMON
+#include <linux/input/tp_common.h>
+#endif
+
#define VER_MAJOR 1
#define VER_MINOR 2
#define PATCH_LEVEL 10
@@ -371,6 +375,10 @@ static void gf_kernel_key_input(struct gf_dev *gf_dev, struct gf_key *gf_key)
uint32_t key_input = 0;
if (gf_key->key == GF_KEY_HOME) {
+#ifdef CONFIG_TOUCHSCREEN_COMMON
+ if (!capacitive_keys_enabled)
+ return;
+#endif
key_input = GF_KEY_INPUT_HOME;
} else if (gf_key->key == GF_KEY_POWER) {
key_input = GF_KEY_INPUT_POWER;