All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] Input: soc_button_array - Set input device name
@ 2017-01-09 17:57 Hans de Goede
  2017-01-09 17:57 ` [PATCH 2/2] Input: soc_button_array - Debounce the buttons Hans de Goede
  2017-01-21 19:13 ` [PATCH 1/2] Input: soc_button_array - Set input device name Dmitry Torokhov
  0 siblings, 2 replies; 11+ messages in thread
From: Hans de Goede @ 2017-01-09 17:57 UTC (permalink / raw)
  To: Dmitry Torokhov
  Cc: Hans de Goede, russianneuromancer @ ya . ru, Gregor Riepl, linux-input

On some tablets using the soc_button_array driver the buttons do not
follow the standard home, power, volume_up, volume_down, rotation_lock
button order as published by Microsoft.

We can use the existing udev hwdb mechanism to fix this up, but then
the created devices must have a unique name, therefor this commit adds
a unique name for the 2 created gpio-keys input devices.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
 drivers/input/misc/soc_button_array.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/input/misc/soc_button_array.c b/drivers/input/misc/soc_button_array.c
index 9bc1b20..d2e5186 100644
--- a/drivers/input/misc/soc_button_array.c
+++ b/drivers/input/misc/soc_button_array.c
@@ -113,6 +113,11 @@ soc_button_device_create(struct platform_device *pdev,
 	gpio_keys_pdata->nbuttons = n_buttons;
 	gpio_keys_pdata->rep = autorepeat;
 
+	if (autorepeat)
+		gpio_keys_pdata->name = "SoC Button Array (autorepeat buttons)";
+	else
+		gpio_keys_pdata->name = "SoC Button Array";
+
 	pd = platform_device_alloc("gpio-keys", PLATFORM_DEVID_AUTO);
 	if (!pd) {
 		error = -ENOMEM;
-- 
2.9.3


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

end of thread, other threads:[~2017-02-12 12:36 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-09 17:57 [PATCH 1/2] Input: soc_button_array - Set input device name Hans de Goede
2017-01-09 17:57 ` [PATCH 2/2] Input: soc_button_array - Debounce the buttons Hans de Goede
2017-01-21 19:14   ` Dmitry Torokhov
2017-01-21 19:13 ` [PATCH 1/2] Input: soc_button_array - Set input device name Dmitry Torokhov
2017-01-22  8:49   ` Hans de Goede
2017-01-22 10:00     ` Dmitry Torokhov
2017-01-22 10:10       ` Hans de Goede
2017-01-23 21:17         ` Hans de Goede
2017-01-23 22:10         ` Dmitry Torokhov
2017-01-23 22:14           ` Dmitry Torokhov
2017-02-12 12:36           ` Hans de Goede

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.