From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Daniel Mack <zonque@gmail.com>
Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Input: cap1106 - allow changing key mapping from userspace
Date: Wed, 6 Aug 2014 23:20:33 -0700 [thread overview]
Message-ID: <20140807062033.GD651@core.coreip.homeip.net> (raw)
In-Reply-To: <20140721012045.GA4395@core.coreip.homeip.net>
On Sun, Jul 20, 2014 at 06:20:49PM -0700, Dmitry Torokhov wrote:
> Wire up support for EVIOC{G|S}KEYCODE to allow users change key mappings
> from userspace.
>
> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
> ---
>
> Just compiled, not tested.
*ping* Any chance you could give it a try? Thanks!
>
> drivers/input/keyboard/cap1106.c | 8 +++++++-
> 1 file changed, 7 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/input/keyboard/cap1106.c b/drivers/input/keyboard/cap1106.c
> index f7d7a0d..180b184 100644
> --- a/drivers/input/keyboard/cap1106.c
> +++ b/drivers/input/keyboard/cap1106.c
> @@ -64,7 +64,7 @@ struct cap1106_priv {
> struct input_dev *idev;
>
> /* config */
> - unsigned int keycodes[CAP1106_NUM_CHN];
> + unsigned short keycodes[CAP1106_NUM_CHN];
> };
>
> static const struct reg_default cap1106_reg_defaults[] = {
> @@ -272,6 +272,12 @@ static int cap1106_i2c_probe(struct i2c_client *i2c_client,
> for (i = 0; i < CAP1106_NUM_CHN; i++)
> __set_bit(priv->keycodes[i], priv->idev->keybit);
>
> + __clear_bit(KEY_RESERVED, priv->idev->keybit);
> +
> + priv->idev->keycode = priv->keycodes;
> + priv->idev->keycodesize = sizeof(priv->keycodes[0]);
> + priv->idev->keycodemax = ARRAY_SIZE(priv->keycodes);
> +
> priv->idev->id.vendor = CAP1106_MANUFACTURER_ID;
> priv->idev->id.product = CAP1106_PRODUCT_ID;
> priv->idev->id.version = rev;
> --
> 2.0.0.526.g5318336
>
>
> --
> Dmitry
--
Dmitry
next prev parent reply other threads:[~2014-08-07 6:20 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-21 1:20 [PATCH] Input: cap1106 - allow changing key mapping from userspace Dmitry Torokhov
2014-08-07 6:20 ` Dmitry Torokhov [this message]
2014-08-07 6:50 ` Daniel Mack
2014-08-08 6:50 ` Dmitry Torokhov
2014-08-08 10:27 ` Daniel Mack
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=20140807062033.GD651@core.coreip.homeip.net \
--to=dmitry.torokhov@gmail.com \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=zonque@gmail.com \
/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 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.