OpenCloudOS-Kernel/drivers/media/video/cx231xx
Mauro Carvalho Chehab 715a223323 V4L/DVB (12595): common/ir: use a struct for keycode tables
Currently, V4L uses a scancode table whose index is the scancode and
the value is the keycode. While this works, it has some drawbacks:

1) It requires that the scancode to be at the range 00-7f;

2) keycodes should be masked on 7 bits in order for it to work;

3) due to the 7 bits approach, sometimes it is not possible to replace
the default keyboard to another one with a different encoding rule;

4) it is different than what is done with dvb-usb approach;

5) it requires a typedef for it to work. This is not a recommended
Linux CodingStyle.

This patch is part of a larger series of IR changes. It basically
replaces the IR_KEYTAB_TYPE tables by a structured table:
struct ir_scancode {
       u16     scancode;
       u32     keycode;
};

This is very close to what dvb does. So, a further integration with DVB
code will be easy.

While we've changed the tables, for now, the IR keycode handling is still
based on the old approach.

The only notable effect is the redution of about 35% of the ir-common
module size:

   text    data     bss     dec     hex filename
   6721   29208       4   35933    8c5d old/ir-common.ko
   5756   18040       4   23800    5cf8 new/ir-common.ko

In thesis, we could be using above u8 for scancode, reducing even more the size
of the module, but defining it as u16 is more convenient, since, on dvb, each
scancode has up to 16 bits, and we currently have a few troubles with rc5, as their
scancodes are defined with more than 8 bits.

This patch itself shouldn't be doing any functional changes.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-12 12:19:47 -03:00
..
Kconfig V4L/DVB (11494a): cx231xx Kconfig fixes 2009-04-29 15:41:11 -03:00
Makefile V4L/DVB (11038): Fix the issue with audio module & correction of Names 2009-04-06 21:44:06 -03:00
cx231xx-audio.c cx231xx: Convert to snd_card_create() 2009-04-06 21:44:53 -03:00
cx231xx-avcore.c V4L/DVB (11913): cx231xx: TRY_FMT should not actually set anything 2009-06-23 03:21:20 -03:00
cx231xx-cards.c V4L/DVB (11845): ir-kbd-i2c: Use initialization data 2009-06-16 18:21:11 -03:00
cx231xx-conf-reg.h V4L/DVB (12470): cx231xx/cx231xx-conf-reg.h: fix bad whitespaces 2009-09-12 12:19:01 -03:00
cx231xx-core.c V4L/DVB (11134): cx231xx: dmesg cleanup 2009-04-06 21:44:10 -03:00
cx231xx-dvb.c V4L/DVB (10957): cx231xx: Fix CodingStyle 2009-04-06 21:44:03 -03:00
cx231xx-i2c.c V4L/DVB (12343): Stop defining I2C adapter IDs nobody uses 2009-09-12 12:18:13 -03:00
cx231xx-input.c V4L/DVB (11843): ir-kbd-i2c: Don't use i2c_client.name for our own needs 2009-06-16 18:21:11 -03:00
cx231xx-pcb-cfg.c V4L/DVB (11133): cx231xx: don't print pcb config debug messages by default 2009-04-06 21:44:09 -03:00
cx231xx-pcb-cfg.h V4L/DVB (11129): cx231xx: Use generic names for each device block 2009-04-06 21:44:07 -03:00
cx231xx-reg.h V4L/DVB (10958): cx231xx: some additional CodingStyle and minor fixes 2009-04-06 21:44:04 -03:00
cx231xx-vbi.c V4L/DVB: cx231xx: remove unused #include <linux/version.h>'s 2009-06-16 18:20:36 -03:00
cx231xx-vbi.h V4L/DVB (10957): cx231xx: Fix CodingStyle 2009-04-06 21:44:03 -03:00
cx231xx-video.c V4L/DVB (12197): Remove unnecessary semicolons 2009-09-12 12:17:23 -03:00
cx231xx.h V4L/DVB (12595): common/ir: use a struct for keycode tables 2009-09-12 12:19:47 -03:00