From f0d2c7cabeaaa206fdb96e3a569b6d28dd53f28e Mon Sep 17 00:00:00 2001 From: "xiaoliang.wang" Date: Tue, 14 Aug 2018 18:23:11 -0400 Subject: [PATCH] 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 Signed-off-by: xiaoliang.wang --- drivers/amlogic/input/keyboard/gpio_keypad.c | 7 +++++++ 1 file changed, 7 insertions(+) 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; -- 2.7.4