Skip to contentSkip to conversation

GPIO buttons keyboard driver update

PATCH Superseded Svyatoslav Ryhel 2 participants 5 messages Feb 20, 2023 – Feb 21, 2023 Input drivers

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

cover GPIO buttons keyboard driver update

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.

Svyatoslav Ryhel (1):
input: button_kbd: make driver complementary to gpio buttons

 drivers/input/Kconfig      |  2 +-
 drivers/input/button_kbd.c | 10 ++++------
 2 files changed, 5 insertions(+), 7 deletions(-)
Signature · 1 line
2.37.2
#1 lore raw

PATCH 1/1 input: button_kbd: make driver complementary to gpio buttons

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.

---
 drivers/input/Kconfig      |  2 +-
 drivers/input/button_kbd.c | 10 ++++------
 2 files changed, 5 insertions(+), 7 deletions(-)
drivers/input/Kconfig +1 -1
index 2a373c778a..17c1088545 100644
@@ -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.
drivers/input/button_kbd.c +4 -6
index 99e65f12f0..74fadfca8b 100644
@@ -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"
+};
Signature · 1 line
2.37.2
Reviewed-by on v1 1/1
#2 lore raw

Re: [PATCH v1 1/1] input: button_kbd: make driver complementary to gpio buttons

Quoted 11 lines · Svyatoslav Ryhel

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.

---
 drivers/input/Kconfig      |  2 +-
 drivers/input/button_kbd.c | 10 ++++------
 2 files changed, 5 insertions(+), 7 deletions(-)
#3 lore raw

Re: [PATCH v1 1/1] input: button_kbd: make driver complementary to gpio buttons

Thanks! Do I need someone else to be able to merge this or your review is enough?

Best regards,
Svyatoslav R.

вт, 21 лют. 2023 р. о 21:37 Simon Glass <[email protected]> пише:

Quoted 15 lines · Svyatoslav Ryhel
Quoted 11 lines

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.

---
 drivers/input/Kconfig      |  2 +-
 drivers/input/button_kbd.c | 10 ++++------
 2 files changed, 5 insertions(+), 7 deletions(-)
#4 lore raw

Re: [PATCH v1 1/1] input: button_kbd: make driver complementary to gpio buttons

Hi Svyatoslav,

If there is no input maintainer, It should just get picked up by Tom at some point.

Regards,
Simon

Quoted 24 lines · Svyatoslav Ryhel

Thanks! Do I need someone else to be able to merge this or your review is enough?

Best regards,
Svyatoslav R.

вт, 21 лют. 2023 р. о 21:37 Simon Glass <[email protected]> пише:

Quoted 2 lines

On Mon, 20 Feb 2023 at 10:41, Svyatoslav Ryhel <[email protected]>

Quoted 13 lines · wrote:
Quoted 11 lines

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.

---
 drivers/input/Kconfig      |  2 +-
 drivers/input/button_kbd.c | 10 ++++------
 2 files changed, 5 insertions(+), 7 deletions(-)