LKML Archive on
help / color / mirror / Atom feed
From: Dan Engel <>
Subject: [PATCH] hid: add two led codes to hid input mapping
Date: Sat, 31 Mar 2007 22:56:28 -0400	[thread overview]
Message-ID: <1175396188.7857.15.camel@monica.engel.home> (raw)

From: Daniel P. Engel <>

Add the "Off-hook" and "Speaker" LED codes 0xb and 0xc to the hid-input configuration,
mapping them to the 0x17 and 0x1e usages in the HID usage table.

Signed-off-by: Daniel P. Engel <>
This patch is really being offered because it's what's needed to make the operation
of the Belkin Flip USB KVM switch avaiable to user-space programs through the HID input
event interface. The Belkin Flip KVM overloads LED usages to give software control
over the device, providing options to flip either audio, video or both. However,
without an input mapping to the Off-hook and Speaker LED usages, this functionality
isn't available.

It's a minor patch, adding two led codes to the EV_LED type, and mapping them to
corresponding HID usages.

This patch was created against kernel version

diff -uprN -X linux- linux- linux-2.6/drivers/hid/hid-input.c
--- linux-	2007-03-23 15:52:51.000000000 -0400
+++ linux-2.6/drivers/hid/hid-input.c	2007-03-31 13:43:46.000000000 -0400
@@ -381,6 +381,8 @@ static void hidinput_configure_usage(str
 				case 0x4b:  map_led (LED_MISC);     break;    /*   "Generic Indicator"        */
 				case 0x19:  map_led (LED_MAIL);     break;    /*   "Message Waiting"          */
 				case 0x4d:  map_led (LED_CHARGING); break;    /*   "External Power Connected" */
+				case 0x17:  map_led (LED_OFFHOOK);  break;    /*   "Off Hook"                 */
+				case 0x1e:  map_led (LED_SPEAKER);  break;    /*   "Speaker"                  */
 				default: goto ignore;
diff -uprN -X linux- linux- linux-2.6/include/linux/input.h
--- linux-	2007-03-23 15:52:51.000000000 -0400
+++ linux-2.6/include/linux/input.h	2007-03-31 13:42:22.000000000 -0400
@@ -630,6 +630,8 @@ struct input_absinfo {
 #define LED_MISC		0x08
 #define LED_MAIL		0x09
 #define LED_CHARGING		0x0a
+#define LED_OFFHOOK		0x0b
+#define LED_SPEAKER		0x0c
 #define LED_MAX			0x0f

             reply	other threads:[~2007-04-01  2:56 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-04-01  2:56 Dan Engel [this message]
2007-04-01  9:01 ` Jiri Kosina
2007-04-01 14:57   ` Dmitry Torokhov
2007-04-01 17:43     ` Jiri Kosina
2007-04-02  3:28       ` Dan Engel
2007-04-02  4:04         ` Dmitry Torokhov
2007-04-02 10:14           ` Dan Engel
2007-04-02 13:06             ` Dmitry Torokhov
2007-04-02 13:33               ` Dan Engel
2007-04-02 13:46                 ` Dmitry Torokhov

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:

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

  git send-email \
    --in-reply-to=1175396188.7857.15.camel@monica.engel.home \ \ \ \
    --subject='Re: [PATCH] hid: add two led codes to hid input mapping' \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

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