linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Hans de Goede <hdegoede@redhat.com>
Cc: "russianneuromancer @ ya . ru" <russianneuromancer@ya.ru>,
	Gregor Riepl <onitake@gmail.com>,
	linux-input@vger.kernel.org
Subject: Re: [PATCH 1/2] Input: soc_button_array - Set input device name
Date: Sat, 21 Jan 2017 11:13:28 -0800	[thread overview]
Message-ID: <20170121191328.GC36944@dtor-ws> (raw)
In-Reply-To: <20170109175707.12854-1-hdegoede@redhat.com>

On Mon, Jan 09, 2017 at 06:57:06PM +0100, Hans de Goede wrote:
> 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.

Why does it have to have unique name? You should be able to match on
other input device properties, for example ATTR{capabilities/ev} or
ATTR{capabilities/keys} to identify the device you want to adjust.

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

Thanks.

-- 
Dmitry

  parent reply	other threads:[~2017-01-21 19:13 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 ` Dmitry Torokhov [this message]
2017-01-22  8:49   ` [PATCH 1/2] Input: soc_button_array - Set input device name 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170121191328.GC36944@dtor-ws \
    --to=dmitry.torokhov@gmail.com \
    --cc=hdegoede@redhat.com \
    --cc=linux-input@vger.kernel.org \
    --cc=onitake@gmail.com \
    --cc=russianneuromancer@ya.ru \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).