linux/drivers/media/dvb/ttpci
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
..
av7110_av.c V4L/DVB (11763): dvb-ttpci: Some whitespace adjustments 2009-06-16 18:21:02 -03:00
av7110_av.h V4L/DVB (6497): saa7146/budget*/dvb-ttpci: Remove V4L1 code 2008-01-25 19:01:52 -02:00
av7110_ca.c V4L/DVB (10391): dvb: constify VFTs 2009-03-30 12:42:34 -03:00
av7110_ca.h
av7110_hw.c V4L/DVB (11569): av7110_hw: fix compile warning 2009-06-16 18:20:37 -03:00
av7110_hw.h firmware: convert av7110 driver to request_firmware() 2009-04-06 14:34:12 -07:00
av7110_ipack.c
av7110_ipack.h
av7110_ir.c V4L/DVB (7515): media/dvb/ttpci replace remaining __FUNCTION__ occurrences 2008-04-24 14:07:58 -03:00
av7110_v4l.c V4L/DVB (12199): remove redundant tests on unsigned 2009-09-12 12:17:23 -03:00
av7110.c headers: smp_lock.h redux 2009-07-12 12:22:34 -07:00
av7110.h V4L/DVB (8889): dvb-ttpci: Support full-ts hardware modification 2008-10-12 09:36:56 -02:00
budget-av.c V4L/DVB: cleanup redundant tests on unsigned 2009-06-16 18:20:58 -03:00
budget-ci.c V4L/DVB (12595): common/ir: use a struct for keycode tables 2009-09-12 12:19:47 -03:00
budget-core.c V4L/DVB (8964): dvb/budget: push adapter_nr mod option down to individual drivers 2008-10-12 09:37:02 -02:00
budget-patch.c V4L/DVB (8964): dvb/budget: push adapter_nr mod option down to individual drivers 2008-10-12 09:37:02 -02:00
budget.c V4L/DVB (11600): budget: Use Continuous clock 2009-06-16 18:20:42 -03:00
budget.h V4L/DVB (9395): Add initial support for two KNC1 DVB-S2 boards 2008-12-29 17:53:15 -02:00
Kconfig V4L/DVB (12153): ttpci: config TTPCI_EEPROM depends on I2C 2009-07-05 14:29:55 -03:00
Makefile Remove fdump tool for av7110 firmware 2009-04-06 14:34:44 -07:00
ttpci-eeprom.c V4L/DVB (7515): media/dvb/ttpci replace remaining __FUNCTION__ occurrences 2008-04-24 14:07:58 -03:00
ttpci-eeprom.h