summaryrefslogtreecommitdiff
authorxiaoliang.wang <xiaoliang.wang@amlogic.com>2018-08-14 22:23:11 (GMT)
committer shuide.chen <shuide.chen@amlogic.com>2018-08-20 07:53:46 (GMT)
commit967e759c677fb026991c12f1b79749906bf6a92f (patch)
tree64d877a5a616f8a3a3e1e343922ce471d1a200f2
parent3d26fec6d9f758496a3448c2338eeaa7a8c4a3b6 (diff)
downloadcommon-967e759c677fb026991c12f1b79749906bf6a92f.zip
common-967e759c677fb026991c12f1b79749906bf6a92f.tar.gz
common-967e759c677fb026991c12f1b79749906bf6a92f.tar.bz2
input: gpio_key: add some missing code [1/1]
PD#171750: google b/112555582 add some missing code for send keyevent Change-Id: I2586a0cd163c02b483657ade4e1a998d54f379d8 Signed-off-by: Shuide Chen <shuide.chen@amlogic.com> Signed-off-by: xiaoliang.wang <xiaoliang.wang@amlogic.com>
Diffstat
-rw-r--r--drivers/amlogic/input/keyboard/gpio_keypad.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/amlogic/input/keyboard/gpio_keypad.c b/drivers/amlogic/input/keyboard/gpio_keypad.c
index 44e3238..a2844e9 100644
--- a/drivers/amlogic/input/keyboard/gpio_keypad.c
+++ b/drivers/amlogic/input/keyboard/gpio_keypad.c
@@ -200,6 +200,13 @@ static int meson_gpio_kp_probe(struct platform_device *pdev)
return -EINVAL;
set_bit(EV_KEY, input_dev->evbit);
set_bit(EV_REP, input_dev->evbit);
+
+ for (i = 0; i < keypad->key_size; i++) {
+ set_bit(keypad->key[i].code, input_dev->keybit);
+ dev_info(&pdev->dev, "%s key(%d) registed.\n",
+ keypad->key[i].name, keypad->key[i].code);
+ }
+
input_dev->name = "gpio_keypad";
input_dev->phys = "gpio_keypad/input0";
input_dev->dev.parent = &pdev->dev;