aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/common/ir-functions.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2009-12-16V4L/DVB (13612): IR: Move common IR code to drivers/media/IRMauro Carvalho Chehab1-373/+0
This is the first step of creating a common code for IR that can be used by other input devices. For now, keep IR dir at drivers/media, to easy the movement of the IR files, but later patches may move it to drivers/IR or drivers/input/IR. No functional changes is done on this patch. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05V4L/DVB (13538): ir-common: Use a dynamic keycode tableMauro Carvalho Chehab1-8/+11
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05V4L/DVB (13537): ir: Prepare the code for dynamic keycode table allocationMauro Carvalho Chehab1-1/+11
Currently, the IR table is initialized by calling ir_input_init(). However, this function doesn't return any error code, nor has a function to be called when de-initializing the IR's. Change the return argment to integer and make sure that each driver will handle the error code. Also adds a function to free any resources that may be allocating there: ir_input_free(). Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05V4L/DVB (13533): ir: use dynamic tables, instead of static onesMauro Carvalho Chehab1-26/+6
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05V4L/DVB (13531): ir-common: rename the debug routine to allow exporting itMauro Carvalho Chehab1-13/+10
As newer IR common code will be added on other files, we need a global debug var inside the module. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05V4L/DVB (13099): ir-functions: Export ir_rc5_decode() for use by the cx23885 moduleAndy Walls1-1/+2
Signed-off-by: Andy Walls <awalls@radix.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-11-27V4L/DVB (13530): Fix wrong parameter order in memsetAlan Cox1-1/+1
Edwin Török found the following: In function ‘memset’, inlined from ‘ir_input_init’ at drivers/media/common/ir-functions.c:67: /home/edwin/builds/linux-2.6/arch/x86/include/asm/string_64.h:61: warning: call to ‘__warn_memset_zero_len’ declared with attribute warning: memset used with constant zero length parameter; this could be due to transposed parameters memset(ir->ir_codes, sizeof(ir->ir_codes), 0); In actual practice the only caller I can find happens to already have cleared the buffer before calling ir_input_init. Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-12V4L/DVB (12595): common/ir: use a struct for keycode tablesMauro Carvalho Chehab1-2/+13
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>
2008-07-20V4L/DVB (8394): ir-common: CodingStyle fix: move EXPORT_SYMBOL_GPL to their proper placesMauro Carvalho Chehab1-17/+8
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20v4l-dvb: remove legacy checks to allow support for kernels < 2.6.10Hans Verkuil1-1/+0
Also remove some blank lines that were used to split compat code at -devel tree. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24V4L/DVB (7094): static memoryDouglas Schilling Landgraf1-1/+1
- Static memory is always initialized with 0. - Replaced in some cases C99 comments for /* */ Signed-off-by: Douglas Schilling Landgraf <dougsland@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25V4L/DVB (6574): common/ir-functions.c: make a function staticAdrian Bunk1-2/+1
ir_rc5_decode() can become static. Signed-off-by: Adrian Bunk <bunk@kernel.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09V4L/DVB (6079): Cleanup: remove linux/moduleparam.h from drivers/media filesMauro Carvalho Chehab1-1/+0
Since at least kernel 2.6.12-rc2, module.h includes moduleparm.h. This patch removes all occurences of moduleparm.h from drivers/media files. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-07-20V4L/DVB (5859): use msecs_to_jiffies on InfraRed RC5 timeoutMauro Carvalho Chehab1-2/+2
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-07-18V4L/DVB (5832): ir-common: optimize bit extract functionTrent Piepho1-12/+11
New code is simpler, shorter, compiles to about half the size, and is 2 to 4 times faster depending on how many bits in the mask are set. Signed-off-by: Trent Piepho <xyzzy@speakeasy.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-03-27V4L/DVB (5332): Ir_rc5_timer_end decoder lockup fixVincent Penne1-2/+4
ir_rc5_timer_end decoder lockup fix Signed-off-by: Vincent Penne <ziggy@sashipa.com> Signed-off-by: Hermann Pitton <hermann-pitton@arcor.de> Signed-off-by: Hartmut Hackmann <hartmut.hackmann@t-online.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-02-21V4L/DVB (4961): Add support for the ASUS P7131 remote controlHermann Pitton1-0/+110
Besides adding the board specific code, this patch moves the RC5 decoding code from bt8xx to ir-functions.c to make it available for all drivers. Signed-off-by: Marc Fargas <telenieko.telenieko.com> Signed-off-by: Hermann Pitton <hermann-pitton@arcor.de> Signed-off-by: Hartmut Hackmann <hartmut.hackmann@t-online.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-12-27V4L/DVB (5001): Add two required headers on kernel 2.6.20-rc1Mauro Carvalho Chehab1-0/+1
include/media/ir-common.h:78: error: field 'work' has incomplete type drivers/media/common/ir-functions.c: In function 'ir_rc5_timer_end': drivers/media/common/ir-functions.c:301: error: 'jiffies' undeclared (first use in this function) drivers/media/common/ir-functions.c:301: error: (Each undeclared identifier is reported only once) drivers/media/common/ir-functions.c:301: error: for each function it appears in.) drivers/media/common/ir-functions.c:347: error: 'HZ' undeclared (first use in this function) Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-06-25V4L/DVB (3718): Removed trailing newlinesMichael Krufky1-1/+0
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-03-03V4L/DVB (3197a): IR keymaps are exported by the ir-common module nowRicardo Cerqueira1-0/+272
Moved keymaps to the ir-common module, and export them from there, instead of #including them in each module Included missing files from V4L/DVB(3197). Signed-off-by: Ricardo Cerqueira <v4l@cerqueira.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>