]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
input: button_kbd: make driver complementary to gpio buttons
authorSvyatoslav Ryhel <clamor95@gmail.com>
Mon, 20 Mar 2023 19:06:30 +0000 (21:06 +0200)
committerTom Rini <trini@konsulko.com>
Thu, 30 Mar 2023 19:09:59 +0000 (15:09 -0400)
Remove need of dts binding for button keyboard since it reuses
gpio-keys binding. Select gpio-keys driver if button keyboard
is selected since button keyboard can not operate on its own.

Tested-by: Svyatoslav Ryhel <clamor95@gmail.com> # HTC One X T30
Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
drivers/input/Kconfig
drivers/input/button_kbd.c

index 32360d94c05f0e672171773fd19c10337091af5d..c2b365af11d1f0f8ca1e29ff2bba1d14980f6a0e 100644 (file)
@@ -48,8 +48,8 @@ config APPLE_SPI_KEYB
 
 config BUTTON_KEYBOARD
        bool "Buttons as keyboard"
-       depends on BUTTON_GPIO
        depends on DM_KEYBOARD
+       select BUTTON_GPIO
        help
          Enable support for mapping buttons to keycode events. Use linux,code button driver
          dt node to define button-event mapping.
index 99e65f12f01a54f6a121d5b3b9674f19c2d0a874..74fadfca8bb8ce944c2c3f2e4ba54ddbd292e769 100644 (file)
@@ -111,16 +111,14 @@ static int button_kbd_probe(struct udevice *dev)
        return 0;
 }
 
-static const struct udevice_id button_kbd_ids[] = {
-       { .compatible = "button-kbd" },
-       { }
-};
-
 U_BOOT_DRIVER(button_kbd) = {
        .name           = "button_kbd",
        .id             = UCLASS_KEYBOARD,
-       .of_match       = button_kbd_ids,
        .ops            = &button_kbd_ops,
        .priv_auto      = sizeof(struct button_kbd_priv),
        .probe          = button_kbd_probe,
 };
+
+U_BOOT_DRVINFO(button_kbd) = {
+       .name = "button_kbd"
+};