kernel-fxtec-pro1x/drivers/media/video/cx88
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
..
cx88-alsa.c V4L/DVB (11992): Add missing __devexit_p() 2009-06-16 19:07:51 -03:00
cx88-blackbird.c headers: smp_lock.h redux 2009-07-12 12:22:34 -07:00
cx88-cards.c V4L/DVB (12486): cx88: fix TBS 8920 card support 2009-09-12 12:19:09 -03:00
cx88-core.c V4L/DVB (11394): cx88: Add support for stereo and sap detection for A2 2009-06-16 19:14:17 -03:00
cx88-dsp.c V4L/DVB (11441): cx88-dsp: fixing 64bit math 2009-06-16 19:14:19 -03:00
cx88-dvb.c V4L/DVB (12469): fix bad whitespaces at cx88_geniatech_x8000_mt 2009-09-12 12:19:45 -03:00
cx88-i2c.c V4L/DVB (11844): ir-kbd-i2c: Switch to the new-style device binding model 2009-06-16 18:21:11 -03:00
cx88-input.c V4L/DVB (12595): common/ir: use a struct for keycode tables 2009-09-12 12:19:47 -03:00
cx88-mpeg.c V4L/DVB (12349): cx88: HVR1300 ensure switching from Encoder to DVB-T and back is reliable 2009-08-13 20:39:03 -03:00
cx88-reg.h V4L/DVB (6066): cx88-alsa: Change order of interrupt enabling, fix spurious IRQs 2007-10-09 22:05:55 -03:00
cx88-tvaudio.c V4L/DVB (11396): cx88: avoid reprogramming every audio register on A2 stereo/mono change 2009-06-16 19:14:18 -03:00
cx88-vbi.c V4L/DVB (7094): static memory 2008-04-24 13:42:20 -03:00
cx88-video.c headers: smp_lock.h redux 2009-07-12 12:22:34 -07:00
cx88-vp3054-i2c.c v4l-dvb: remove legacy checks to allow support for kernels < 2.6.10 2008-07-20 07:17:52 -03:00
cx88-vp3054-i2c.h V4L/DVB (5629): Cx88: VP3054 support can't be a module when cx88 is compiled in 2007-07-18 14:23:11 -03:00
cx88.h V4L/DVB (12439): cx88: add support for WinFast DTV2000H rev. J 2009-09-12 12:18:50 -03:00
Kconfig V4L/DVB (11127): Kconfig: replace all occurrences of CUSTOMIZE to CUSTOMISE 2009-03-30 12:43:31 -03:00
Makefile V4L/DVB (11394): cx88: Add support for stereo and sap detection for A2 2009-06-16 19:14:17 -03:00