summaryrefslogtreecommitdiff
path: root/drivers/input/keyboard
diff options
context:
space:
mode:
authorGergo Koteles <soyer@irl.hu>2023-02-21 22:47:48 +0300
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2023-02-22 00:56:36 +0300
commit4b665e1781e2cd64b3b9492e49156925ba02bfa9 (patch)
tree8489b8ccf195e38d3c60ed1733ee4f437d850dcf /drivers/input/keyboard
parent40e40fdfec3faf08951c2a600177e23f4d43fc32 (diff)
downloadlinux-4b665e1781e2cd64b3b9492e49156925ba02bfa9.tar.xz
Input: gpio-keys - add support for linux,input-value DTS property
Allows setting the value of EV_ABS events from DTS. This property is included in the gpio-keys.yaml scheme, but was only implemented for gpio-keys-polled. Signed-off-by: Gergo Koteles <soyer@irl.hu> Link: https://lore.kernel.org/r/3519a11b0ef5324a2befbd137cd2aa0cb8fd057d.1676850819.git.soyer@irl.hu Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'drivers/input/keyboard')
-rw-r--r--drivers/input/keyboard/gpio_keys.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/input/keyboard/gpio_keys.c b/drivers/input/keyboard/gpio_keys.c
index 5496482a38c1..c42f86ad0766 100644
--- a/drivers/input/keyboard/gpio_keys.c
+++ b/drivers/input/keyboard/gpio_keys.c
@@ -770,6 +770,9 @@ gpio_keys_get_devtree_pdata(struct device *dev)
&button->type))
button->type = EV_KEY;
+ fwnode_property_read_u32(child, "linux,input-value",
+ (u32 *)&button->value);
+
button->wakeup =
fwnode_property_read_bool(child, "wakeup-source") ||
/* legacy name */