linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* gpio-keys-polled enhancements v2
@ 2019-02-14  8:36 Enrico Weigelt, metux IT consult
  2019-02-14  8:36 ` [PATCH 1/2] input: keyboard: gpio-keys-polled: use input name from pdata if available Enrico Weigelt, metux IT consult
  2019-02-14  8:36 ` [PATCH 2/2] input: keyboard: gpio_keys_polled: use gpio lookup table Enrico Weigelt, metux IT consult
  0 siblings, 2 replies; 5+ messages in thread
From: Enrico Weigelt, metux IT consult @ 2019-02-14  8:36 UTC (permalink / raw)
  To: linux-kernel; +Cc: dmitry.torokhov, linux-input

Hi folks,


here's v2 of my gpio-keys-polled enhancements queue.

I'm using this to allow it to be initialized by some other platform
driver (in my case for the APUv2 board), when no proper fw data
(oftree or acpi) is available.


--mtx

-- 
Enrico Weigelt, metux IT consult
Free software and Linux embedded engineering
info@metux.net -- +49-151-27565287

^ permalink raw reply	[flat|nested] 5+ messages in thread
* [PATCH 1/2] input: keyboard: gpio-keys-polled: use input name from pdata if available
@ 2019-06-27 15:07 Enrico Weigelt, metux IT consult
  2019-07-07  6:14 ` Dmitry Torokhov
  0 siblings, 1 reply; 5+ messages in thread
From: Enrico Weigelt, metux IT consult @ 2019-06-27 15:07 UTC (permalink / raw)
  To: linux-kernel; +Cc: dmitry.torokhov, linux-input

Instead of hardcoding the input name to the driver name
('gpio-keys-polled'), allow the passing a name via platform data
('name' field was already present), but default to old behaviour
in case of NULL.

Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: linux-input@vger.kernel.org
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
---
 drivers/input/keyboard/gpio_keys_polled.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/input/keyboard/gpio_keys_polled.c b/drivers/input/keyboard/gpio_keys_polled.c
index 1eafe6b..c168493 100644
--- a/drivers/input/keyboard/gpio_keys_polled.c
+++ b/drivers/input/keyboard/gpio_keys_polled.c
@@ -269,7 +269,7 @@ static int gpio_keys_polled_probe(struct platform_device *pdev)
 
 	input = poll_dev->input;
 
-	input->name = pdev->name;
+	input->name = (pdata->name ? pdata->name : pdev->name);
 	input->phys = DRV_NAME"/input0";
 
 	input->id.bustype = BUS_HOST;
-- 
1.9.1

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

end of thread, other threads:[~2019-07-07  6:14 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-02-14  8:36 gpio-keys-polled enhancements v2 Enrico Weigelt, metux IT consult
2019-02-14  8:36 ` [PATCH 1/2] input: keyboard: gpio-keys-polled: use input name from pdata if available Enrico Weigelt, metux IT consult
2019-02-14  8:36 ` [PATCH 2/2] input: keyboard: gpio_keys_polled: use gpio lookup table Enrico Weigelt, metux IT consult
  -- strict thread matches above, loose matches on Subject: below --
2019-06-27 15:07 [PATCH 1/2] input: keyboard: gpio-keys-polled: use input name from pdata if available Enrico Weigelt, metux IT consult
2019-07-07  6:14 ` Dmitry Torokhov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).