From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Cc: Russell King <linux@arm.linux.org.uk>,
Daniel Mack <daniel@zonque.org>,
Robert Jarzmik <robert.jarzmik@free.fr>,
Linus Walleij <linus.walleij@linaro.org>,
Alexandre Courbot <gnurou@gmail.com>,
Wolfram Sang <wsa@the-dreams.de>, Bryan Wu <cooloney@gmail.com>,
Richard Purdie <rpurdie@rpsys.net>,
Samuel Ortiz <sameo@linux.intel.com>,
Lee Jones <lee.jones@linaro.org>, Mark Brown <broonie@kernel.org>,
Jingoo Han <jg1.han@samsung.com>,
Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>,
Tomi Valkeinen <tomi.valkeinen@ti.com>,
Liam Girdwood <lgirdwood@gmail.com>,
Andrea Adami <andrea.adami@gmail.com>,
linux-arm-kernel@lists.infradead.org, linux-gpio@vger.kernel.org,
linux-i2c@vger.kernel.org, linux-input@vger.kernel.org,
linux-leds@vger.kernel.org, linux-spi@vger.kernel.org,
linux-fbdev@vger.kernel.org, alsa-devel@alsa-project.org
Subject: Re: [PATCH v2 04/17] input: locomokbd: provide an Alt-SysRQ combination
Date: Tue, 12 May 2015 13:12:15 -0700 [thread overview]
Message-ID: <20150512201215.GD20725@dtor-ws> (raw)
In-Reply-To: <1430178954-11138-5-git-send-email-dbaryshkov@gmail.com>
Hi Dmitry,
On Tue, Apr 28, 2015 at 02:55:41AM +0300, Dmitry Eremin-Solenikov wrote:
> It is usefull sometimes to have an Alt-SysRQ combo on the keyboard to be
> able to trigger sysrq functions directly. Add an option providing sysrq
> mapping for Contact-Home keys.
No, if you want to remap the keys please do it from usepspace; locomokbd
supports it (EVIOCSKEYCODE ioctl).
Thanks.
>
> Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
> ---
> drivers/input/keyboard/Kconfig | 7 +++++++
> drivers/input/keyboard/locomokbd.c | 14 +++++++++++---
> 2 files changed, 18 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/input/keyboard/Kconfig b/drivers/input/keyboard/Kconfig
> index 0a3d875..eb8b11b 100644
> --- a/drivers/input/keyboard/Kconfig
> +++ b/drivers/input/keyboard/Kconfig
> @@ -343,6 +343,13 @@ config KEYBOARD_LOCOMO
> To compile this driver as a module, choose M here: the
> module will be called locomokbd.
>
> +config KEYBOARD_LOCOMO_SYSRQ
> + bool "Provide SysRQ key on LoCoMo keyboard"
> + depends on KEYBOARD_LOCOMO
> + help
> + Say Y here to be able to use Contact-Home as Alt-Sysrq combo.
> + Say N if you want to use them as usual keys.
> +
> config KEYBOARD_LPC32XX
> tristate "LPC32XX matrix key scanner support"
> depends on ARCH_LPC32XX && OF
> diff --git a/drivers/input/keyboard/locomokbd.c b/drivers/input/keyboard/locomokbd.c
> index eed0a94..eb8dbe2 100644
> --- a/drivers/input/keyboard/locomokbd.c
> +++ b/drivers/input/keyboard/locomokbd.c
> @@ -40,6 +40,14 @@
> #define KEY_CONTACT KEY_F18
> #define KEY_CENTER KEY_F15
>
> +#ifdef CONFIG_KEYBOARD_LOCOMOKBD_SYSRQ
> +#define LOCOMO_KEY_CONTACT KEY_LEFTALT
> +#define LOCOMO_KEY_HOME KEY_SYSRQ
> +#else
> +#define LOCOMO_KEY_CONTACT KEY_CONTACT
> +#define LOCOMO_KEY_HOME KEY_HOME
> +#endif
> +
> #define KB_ROWS 16
> #define KB_COLS 8
> #define LOCOMOKBD_NUMKEYS (KB_ROWS * KB_COLS)
> @@ -48,7 +56,7 @@
> static const unsigned char
> locomokbd_keycode[LOCOMOKBD_NUMKEYS] = {
> 0, KEY_ESC, KEY_ACTIVITY, 0, 0, 0, 0, 0, 0, 0, /* 0 - 9 */
> - 0, 0, 0, 0, 0, 0, 0, KEY_MENU, 0, KEY_CONTACT, /* 10 - 19 */
> + 0, 0, 0, 0, 0, 0, 0, KEY_MENU, 0, LOCOMO_KEY_CONTACT, /* 10 - 19 */
> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 20 - 29 */
> 0, 0, 0, KEY_CENTER, 0, KEY_MAIL, 0, 0, 0, 0, /* 30 - 39 */
> 0, 0, 0, 0, 0, 0, 0, 0, 0, KEY_RIGHT, /* 40 - 49 */
> @@ -280,9 +288,9 @@ static int locomokbd_probe(struct platform_device *dev)
> sizeof(locomokbd->keycode));
>
> if (machine_is_collie())
> - locomokbd->keycode[18] = KEY_HOME;
> + locomokbd->keycode[18] = LOCOMO_KEY_HOME;
> else
> - locomokbd->keycode[3] = KEY_HOME;
> + locomokbd->keycode[3] = LOCOMO_KEY_HOME;
>
> for (i = 0; i < LOCOMOKBD_NUMKEYS; i++)
> input_set_capability(input_dev, EV_KEY, locomokbd->keycode[i]);
> --
> 2.1.4
>
--
Dmitry
next prev parent reply other threads:[~2015-05-12 20:12 UTC|newest]
Thread overview: 46+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-27 23:55 [PATCH v2 00/17] new locomo driver set Dmitry Eremin-Solenikov
2015-04-27 23:55 ` [PATCH v2 01/17] mfd: add new driver for Sharp LoCoMo Dmitry Eremin-Solenikov
[not found] ` <1430178954-11138-2-git-send-email-dbaryshkov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-04-28 18:45 ` Lee Jones
2015-05-12 20:39 ` Dmitry Eremin-Solenikov
2015-05-13 9:41 ` Lee Jones
2015-04-27 23:55 ` [PATCH v2 02/17] leds: port locomo leds driver to new locomo core Dmitry Eremin-Solenikov
2015-05-06 15:05 ` Jacek Anaszewski
2015-05-12 15:35 ` Dmitry Eremin-Solenikov
[not found] ` <CALT56yNJWapNw1XLrzfbUDUz1LF_BB9DfF94H6GhbnBUEP80_w-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-05-13 10:31 ` Jacek Anaszewski
[not found] ` <555327EA.5060402-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2015-05-13 14:14 ` Dmitry Eremin-Solenikov
2015-05-13 14:53 ` Jacek Anaszewski
[not found] ` <5553654F.4010608-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2015-05-13 16:42 ` Dmitry Torokhov
2015-05-14 6:35 ` Jacek Anaszewski
2015-04-27 23:55 ` [PATCH v2 05/17] video: backlight: add new locomo backlight driver Dmitry Eremin-Solenikov
2015-04-27 23:55 ` [PATCH v2 07/17] gpio: port LoCoMo gpio support from old driver Dmitry Eremin-Solenikov
2015-05-06 14:12 ` Linus Walleij
2015-04-27 23:55 ` [PATCH v2 08/17] gpio: locomo: implement per-pin irq handling Dmitry Eremin-Solenikov
2015-05-06 14:15 ` Linus Walleij
2015-05-06 16:42 ` Dmitry Eremin-Solenikov
2015-05-12 11:15 ` Linus Walleij
2015-04-27 23:55 ` [PATCH v2 09/17] spi: add locomo SPI driver Dmitry Eremin-Solenikov
2015-04-29 11:27 ` Mark Brown
[not found] ` <1430178954-11138-1-git-send-email-dbaryshkov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-04-27 23:55 ` [PATCH v2 03/17] input: convert LoCoMo keyboard driver to use new locomo core Dmitry Eremin-Solenikov
2015-05-12 20:21 ` Dmitry Torokhov
2015-05-12 21:01 ` Dmitry Eremin-Solenikov
2015-05-12 21:13 ` Dmitry Torokhov
2015-04-27 23:55 ` [PATCH v2 04/17] input: locomokbd: provide an Alt-SysRQ combination Dmitry Eremin-Solenikov
2015-05-12 20:12 ` Dmitry Torokhov [this message]
2015-05-12 20:40 ` Dmitry Eremin-Solenikov
2015-04-27 23:55 ` [PATCH v2 06/17] video: lcd: add LoCoMo LCD driver Dmitry Eremin-Solenikov
2015-04-27 23:55 ` [PATCH v2 10/17] i2c: add locomo i2c driver Dmitry Eremin-Solenikov
2015-05-12 19:24 ` Wolfram Sang
2015-05-12 19:27 ` Dmitry Eremin-Solenikov
2015-05-12 19:28 ` Wolfram Sang
2015-04-27 23:55 ` [PATCH v2 11/17] ARM: sa1100: make collie use new locomo drivers Dmitry Eremin-Solenikov
2015-04-27 23:55 ` [PATCH v2 12/17] ARM: sa1100: don't preallocate IRQ space for locomo Dmitry Eremin-Solenikov
2015-04-27 23:55 ` [PATCH v2 13/17] ASoC: pxa: poodle: make use of new locomo GPIO interface Dmitry Eremin-Solenikov
2015-05-06 14:19 ` Linus Walleij
2015-04-27 23:55 ` [PATCH v2 14/17] ARM: pxa: poodle: use new LoCoMo driver Dmitry Eremin-Solenikov
[not found] ` <1430178954-11138-15-git-send-email-dbaryshkov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-04-28 19:35 ` Robert Jarzmik
2015-05-06 14:20 ` Linus Walleij
2015-04-27 23:55 ` [PATCH v2 15/17] ARM: pxa: poodle: don't preallocate IRQ space for locomo Dmitry Eremin-Solenikov
2015-04-28 19:36 ` Robert Jarzmik
2015-04-27 23:55 ` [PATCH v2 16/17] video: backlight: drop old locomo bl/lcd driver Dmitry Eremin-Solenikov
2015-04-27 23:55 ` [PATCH v2 17/17] ARM: drop old LoCoMo driver Dmitry Eremin-Solenikov
[not found] ` <1430178954-11138-18-git-send-email-dbaryshkov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-05-06 14:22 ` Linus Walleij
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=20150512201215.GD20725@dtor-ws \
--to=dmitry.torokhov@gmail.com \
--cc=alsa-devel@alsa-project.org \
--cc=andrea.adami@gmail.com \
--cc=broonie@kernel.org \
--cc=cooloney@gmail.com \
--cc=daniel@zonque.org \
--cc=dbaryshkov@gmail.com \
--cc=gnurou@gmail.com \
--cc=jg1.han@samsung.com \
--cc=lee.jones@linaro.org \
--cc=lgirdwood@gmail.com \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-fbdev@vger.kernel.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-leds@vger.kernel.org \
--cc=linux-spi@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
--cc=plagnioj@jcrosoft.com \
--cc=robert.jarzmik@free.fr \
--cc=rpurdie@rpsys.net \
--cc=sameo@linux.intel.com \
--cc=tomi.valkeinen@ti.com \
--cc=wsa@the-dreams.de \
/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).