All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/1] GPIO buttons keyboard driver update
@ 2023-03-20 19:06 Svyatoslav Ryhel
  2023-03-20 19:06 ` [PATCH v2 1/1] input: button_kbd: make driver complementary to gpio buttons Svyatoslav Ryhel
  0 siblings, 1 reply; 3+ messages in thread
From: Svyatoslav Ryhel @ 2023-03-20 19:06 UTC (permalink / raw)
  To: Svyatoslav Ryhel, Simon Glass, Dzmitry Sankouski, Maxim Schwalm; +Cc: u-boot

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.

Changes from v1:
- add reviewed-by
- re-send after month

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(-)

-- 
2.37.2


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH v2 1/1] input: button_kbd: make driver complementary to gpio buttons
  2023-03-20 19:06 [PATCH v2 0/1] GPIO buttons keyboard driver update Svyatoslav Ryhel
@ 2023-03-20 19:06 ` Svyatoslav Ryhel
  2023-03-31 14:17   ` Tom Rini
  0 siblings, 1 reply; 3+ messages in thread
From: Svyatoslav Ryhel @ 2023-03-20 19:06 UTC (permalink / raw)
  To: Svyatoslav Ryhel, Simon Glass, Dzmitry Sankouski, Maxim Schwalm; +Cc: u-boot

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      |  2 +-
 drivers/input/button_kbd.c | 10 ++++------
 2 files changed, 5 insertions(+), 7 deletions(-)

diff --git a/drivers/input/Kconfig b/drivers/input/Kconfig
index 32360d94c0..c2b365af11 100644
--- a/drivers/input/Kconfig
+++ b/drivers/input/Kconfig
@@ -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.
diff --git a/drivers/input/button_kbd.c b/drivers/input/button_kbd.c
index 99e65f12f0..74fadfca8b 100644
--- a/drivers/input/button_kbd.c
+++ b/drivers/input/button_kbd.c
@@ -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"
+};
-- 
2.37.2


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH v2 1/1] input: button_kbd: make driver complementary to gpio buttons
  2023-03-20 19:06 ` [PATCH v2 1/1] input: button_kbd: make driver complementary to gpio buttons Svyatoslav Ryhel
@ 2023-03-31 14:17   ` Tom Rini
  0 siblings, 0 replies; 3+ messages in thread
From: Tom Rini @ 2023-03-31 14:17 UTC (permalink / raw)
  To: Svyatoslav Ryhel; +Cc: Simon Glass, Dzmitry Sankouski, Maxim Schwalm, u-boot

[-- Attachment #1: Type: text/plain, Size: 487 bytes --]

On Mon, Mar 20, 2023 at 09:06:30PM +0200, Svyatoslav Ryhel wrote:

> 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>

Applied to u-boot/next, thanks!

-- 
Tom

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-03-31 14:22 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-20 19:06 [PATCH v2 0/1] GPIO buttons keyboard driver update Svyatoslav Ryhel
2023-03-20 19:06 ` [PATCH v2 1/1] input: button_kbd: make driver complementary to gpio buttons Svyatoslav Ryhel
2023-03-31 14:17   ` Tom Rini

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.