All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Alfred E. Heggestad" <aeh@db.org>
To: Pavel Machek <pavel@ucw.cz>
Cc: dmitry.torokhov@gmail.com, linux-input@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] input: driver for USB VoIP phones with CM109 chipset
Date: Mon, 03 Mar 2008 23:07:02 +0100	[thread overview]
Message-ID: <47CC7686.5030600@db.org> (raw)
In-Reply-To: <20080209191206.GD5139@ucw.cz>

Pavel Machek wrote:
> Hi!
> 
>> + Komunikate KIP1000 Keyboard Matrix
>> +
>> +     -> -- 1 -- 2 -- 3  --> GPI pin 4 (0x10)
>> +      |    |    |    |
>> +     <- -- 4 -- 5 -- 6  --> GPI pin 5 (0x20)
>> +      |    |    |    |
>> +     END - 7 -- 8 -- 9  --> GPI pin 6 (0x40)
>> +      |    |    |    |
>> +     OK -- * -- 0 -- #  --> GPI pin 7 (0x80)
>> +      |    |    |    |
>> +
>> +     /|\  /|\  /|\  /|\
>> +      |    |    |    |
>> +GPO
>> +pin:  3    2    1    0
>> +     0x8  0x4  0x2  0x1
>> +
>> + */
>> +static int keymap_kip1000(int scancode)
>> +{
>> +	switch (scancode) {			 /* phone 
>> key:   */
>> +	case 0x82: return KEY_0;		 /*   0   
>> */
>> +	case 0x14: return KEY_1;		 /*   1   
>> */
>> +	case 0x12: return KEY_2;		 /*   2   
>> */
>> +	case 0x11: return KEY_3;		 /*   3   
>> */
>> +	case 0x24: return KEY_4;		 /*   4   
>> */
>> +	case 0x22: return KEY_5;		 /*   5   
>> */
>> +	case 0x21: return KEY_6;		 /*   6   
>> */
>> +	case 0x44: return KEY_7;		 /*   7   
>> */
>> +	case 0x42: return KEY_8;		 /*   8   
>> */
>> +	case 0x41: return KEY_9;		 /*   9   
>> */
>> +	case 0x81: return KEY_LEFTSHIFT | KEY_3 << 8; /*  
>> #          */
> 
> That's a very dirty hack, right?
> 

yeah, that is a dirty hack which we should avoid by defining
a new key called e.g. KEY_KPPOUND for the '#'-key.

the CM109 driver is based on the Yealink driver
(drivers/input/misc/yealink.c) so the same hack exists there..


/alfred

  reply	other threads:[~2008-03-03 22:07 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-07 18:38 [PATCH] input: driver for USB VoIP phones with CM109 chipset Alfred E. Heggestad
2008-02-07 21:59 ` Dmitry Torokhov
2008-02-08 21:23   ` Alfred E. Heggestad
2008-06-21 22:23   ` Alfred E. Heggestad
2008-06-24  4:59     ` Dmitry Torokhov
2008-06-25 20:07       ` Alfred E. Heggestad
2008-06-26 10:31         ` Oliver Neukum
2008-02-09 19:12 ` Pavel Machek
2008-03-03 22:07   ` Alfred E. Heggestad [this message]
2008-03-03 22:13     ` Pavel Machek
     [not found] ` <200802091023.02580.oliver@neukum.org>
2008-03-03 22:10   ` Alfred E. Heggestad

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=47CC7686.5030600@db.org \
    --to=aeh@db.org \
    --cc=dmitry.torokhov@gmail.com \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pavel@ucw.cz \
    /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.