lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <47CC7686.5030600@db.org>
Date:	Mon, 03 Mar 2008 23:07:02 +0100
From:	"Alfred E. Heggestad" <aeh@...org>
To:	Pavel Machek <pavel@....cz>
CC:	dmitry.torokhov@...il.com, linux-input@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] input: driver for USB VoIP phones with CM109 chipset

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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ