linux/drivers/media/video/cx18
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
..
cx18-audio.c V4L/DVB (11624): cx18: Toggle the AI1 mux when changing the CX18_AUDIO_ENABLE register 2009-06-16 18:20:45 -03:00
cx18-audio.h V4L/DVB (10758): cx18: Convert I2C devices to v4l2_subdevices 2009-03-30 12:43:01 -03:00
cx18-av-audio.c V4L/DVB (11310): cx18: remove intermediate 'ioctl' step 2009-03-30 12:43:49 -03:00
cx18-av-core.c V4L/DVB (11898): cx18: Perform 64 bit divide so it works for 32 bit systems 2009-06-16 18:21:16 -03:00
cx18-av-core.h V4L/DVB (11369): v4l2-subdev: add load_fw and use that instead of abusing core->init. 2009-04-06 21:44:21 -03:00
cx18-av-firmware.c V4L/DVB (11624): cx18: Toggle the AI1 mux when changing the CX18_AUDIO_ENABLE register 2009-06-16 18:20:45 -03:00
cx18-av-vbi.c V4L/DVB (11864): cx18: Complete support for Sliced and Raw VBI for 625 line systems 2009-06-16 18:21:14 -03:00
cx18-cards.c V4L/DVB (12367): cx18: Add i2c initialization for Z8F0811/Hauppage IR transceivers 2009-09-12 12:18:25 -03:00
cx18-cards.h V4L/DVB (12367): cx18: Add i2c initialization for Z8F0811/Hauppage IR transceivers 2009-09-12 12:18:25 -03:00
cx18-controls.c V4L/DVB (12338): cx18: Read buffer overflow 2009-08-13 20:39:02 -03:00
cx18-controls.h V4L/DVB (8113): ivtv/cx18: remove s/g_ctrl, now all controls are handled through s/g_ext_ctrl 2008-07-20 07:12:23 -03:00
cx18-driver.c V4L/DVB (12207): cx18: Add an EEPROM dump routine for the Yuan MPC718 and future cards 2009-09-12 12:17:26 -03:00
cx18-driver.h V4L/DVB (11950): cx18: Split LeadTek PVR2100 and DVR3100 H into 2 separate card entries 2009-06-16 19:07:33 -03:00
cx18-dvb.c V4L/DVB (12182): cx18: Add DVB-T support for Yuan MPC-718 cards with an MT352 or ZL10353 2009-07-05 14:29:59 -03:00
cx18-dvb.h V4L/DVB (9720): cx18: Major rewrite of interrupt handling for incoming mailbox processing 2008-12-30 09:38:07 -02:00
cx18-fileops.c V4L/DVB (12196): cx18-fileops.c: Remove unnecessary semicolons 2009-09-12 12:17:22 -03:00
cx18-fileops.h V4L/DVB (10135): v4l2: introduce v4l2_file_operations. 2009-01-02 17:11:12 -02:00
cx18-firmware.c V4L/DVB (10757): cx18, v4l2-chip-ident: Finish conversion of AV decoder core to v4l2_subdev 2009-03-30 12:43:01 -03:00
cx18-firmware.h
cx18-gpio.c V4L/DVB (11380): v4l2-subdev: change s_routing prototype 2009-04-06 21:44:27 -03:00
cx18-gpio.h V4L/DVB (10759): cx18: Convert GPIO connected functions to act as v4l2_subdevices 2009-03-30 12:43:01 -03:00
cx18-i2c.c V4L/DVB (12595): common/ir: use a struct for keycode tables 2009-09-12 12:19:47 -03:00
cx18-i2c.h V4L/DVB (10758): cx18: Convert I2C devices to v4l2_subdevices 2009-03-30 12:43:01 -03:00
cx18-io.c V4L/DVB (9727): cx18: Adjust outgoing mailbox timeouts and remove statistics logging 2008-12-30 09:38:11 -02:00
cx18-io.h V4L/DVB (9778): cx18: cx18_writel_expect() should not declare success on a PCI read error 2008-12-30 09:38:20 -02:00
cx18-ioctl.c V4L/DVB (12199): remove redundant tests on unsigned 2009-09-12 12:17:23 -03:00
cx18-ioctl.h V4L/DVB (10138): v4l2-ioctl: change to long return type to match unlocked_ioctl. 2009-01-02 17:11:34 -02:00
cx18-irq.c V4L/DVB (9728): cx18: Copyright attribution update for files modified by awalls 2008-12-30 09:38:11 -02:00
cx18-irq.h V4L/DVB (9728): cx18: Copyright attribution update for files modified by awalls 2008-12-30 09:38:11 -02:00
cx18-mailbox.c V4L/DVB (11618): cx18: Convert per stream mutex locks to per queue spin locks 2009-06-16 18:20:44 -03:00
cx18-mailbox.h V4L/DVB (11615): cx18: Rename the work queue to "in_work_queue" 2009-06-16 18:20:44 -03:00
cx18-queue.c V4L/DVB (11619): cx18: Simplify the work handler for outgoing mailbox commands 2009-06-16 18:20:44 -03:00
cx18-queue.h V4L/DVB (10280): cx18: Rename structure members: dev to pci_dev and v4l2dev to video_dev 2009-03-30 12:42:25 -03:00
cx18-scb.c V4L/DVB (9895): cx18: Refine the firmware load and firmware startup process 2008-12-30 09:39:09 -02:00
cx18-scb.h V4L/DVB (9728): cx18: Copyright attribution update for files modified by awalls 2008-12-30 09:38:11 -02:00
cx18-streams.c V4L/DVB (11864): cx18: Complete support for Sliced and Raw VBI for 625 line systems 2009-06-16 18:21:14 -03:00
cx18-streams.h V4L/DVB (11619): cx18: Simplify the work handler for outgoing mailbox commands 2009-06-16 18:20:44 -03:00
cx18-vbi.c V4L/DVB (11092): cx18: Optimize processing of VBI buffers from the capture unit 2009-03-30 12:43:28 -03:00
cx18-vbi.h V4L/DVB (10440): cx18: Fix presentation timestamp (PTS) for VBI buffers 2009-03-30 12:42:38 -03:00
cx18-version.h V4L/DVB (11620): cx18: Increment version due to significant buffer handling changes 2009-06-16 18:20:45 -03:00
cx18-video.c V4L/DVB (11380): v4l2-subdev: change s_routing prototype 2009-04-06 21:44:27 -03:00
cx18-video.h
cx23418.h V4L/DVB (10278): cx18: Fix bad audio in first analog capture. 2009-03-30 12:42:25 -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 (8913): cx18: Create cx18_ specific wrappers for all pci mmio accessesors. 2008-10-12 09:36:58 -02:00