mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Daniele Forsi <dforsi@gmail.com>
To: Henk Vergonet <Henk.Vergonet@gmail.com>,
	Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: usbb2k-api-dev@nongnu.org, linux-input@vger.kernel.org,
	linux-kernel@vger.kernel.org, Daniele Forsi <dforsi@gmail.com>
Subject: [RFC PATCH 2/2] USB: input: yealink.c: add mapping for "RING" and "MUTE" keys
Date: Mon, 22 Dec 2014 15:41:09 +0100	[thread overview]
Message-ID: <1419259269-23820-3-git-send-email-dforsi@gmail.com> (raw)
In-Reply-To: <1419259269-23820-1-git-send-email-dforsi@gmail.com>

According to the user manual of the "VOIP-3 SKY" USB phone, the RING
key is used to select different ring tones and the MUTE key is used
to mute the microphone.

Signed-off-by: Daniele Forsi <dforsi@gmail.com>
---
 drivers/input/misc/yealink.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/input/misc/yealink.c b/drivers/input/misc/yealink.c
index e9403da..0b86c49 100644
--- a/drivers/input/misc/yealink.c
+++ b/drivers/input/misc/yealink.c
@@ -189,7 +189,9 @@ static int setChar(struct yealink_dev *yld, int el, int chr)
  * USB-P1K button layout:
  *
  *             up
+ *            ring
  *       IN           OUT
+ *            mute
  *            down
  *
  *     pickup   C    hangup
@@ -207,7 +209,9 @@ static int map_p1k_to_key(int scancode)
 	switch(scancode) {		/* phone key:	*/
 	case 0x23: return KEY_LEFT;	/*   IN		*/
 	case 0x33: return KEY_UP;	/*   up		*/
+	case 0x44: return KEY_SOUND;	/*   ring	*/
 	case 0x04: return KEY_RIGHT;	/*   OUT	*/
+	case 0x41: return KEY_MICMUTE;	/*   mute	*/
 	case 0x24: return KEY_DOWN;	/*   down	*/
 	case 0x03: return KEY_ENTER;	/*   pickup	*/
 	case 0x14: return KEY_BACKSPACE; /*  C		*/
-- 
2.1.3


  parent reply	other threads:[~2014-12-22 14:41 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-22 14:41 [RFC PATCH 0/2] USB: input: yealink.c: update key mappings Daniele Forsi
2014-12-22 14:41 ` [RFC PATCH 1/2] USB: input: yealink.c: use KEY_NUMERIC_* for numeric keys, star and pound Daniele Forsi
     [not found]   ` <CAMFK4TMJTb5dJ1kXLBgsu8WE8Ygyh+jW_d_TqmDO5OqB5yr3nw@mail.gmail.com>
2015-01-09 12:41     ` Fwd: " Henk
2014-12-22 14:41 ` Daniele Forsi [this message]
     [not found]   ` <CAMFK4TM4zVNWBt14vS3T=eQMtwM2OMLW4Wf5dfHS1vKVoPrQiw@mail.gmail.com>
2015-01-09 12:42     ` Fwd: [RFC PATCH 2/2] USB: input: yealink.c: add mapping for "RING" and "MUTE" keys Henk
     [not found] ` <CAMFK4TMNuQEao5n3XPjn4ZSkX0eTtfkWO+h=bPbyHthyJYebPw@mail.gmail.com>
2015-01-09 12:40   ` Fwd: [RFC PATCH 0/2] USB: input: yealink.c: update key mappings Henk

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=1419259269-23820-3-git-send-email-dforsi@gmail.com \
    --to=dforsi@gmail.com \
    --cc=Henk.Vergonet@gmail.com \
    --cc=dmitry.torokhov@gmail.com \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=usbb2k-api-dev@nongnu.org \
    /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

Powered by JetHome