aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/common/ir-functions.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2008-07-21 00:14:42 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-07-21 00:14:42 -0400
commitf894d18380e7e7ff05f6622ccb75d2881922c6e9 (patch)
treee3c11b831b68096239a49dec539a49e49c1d90b7 /drivers/media/common/ir-functions.c
parentd13ff0559fea73f237a01669887d2c10e11d7662 (diff)
parentd20b27478d6ccf7c4c8de4f09db2bdbaec82a6c0 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/v4l-dvb
* git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/v4l-dvb: (277 commits) V4L/DVB (8415): gspca: Infinite loop in i2c_w() of etoms. V4L/DVB (8414): videodev/cx18: fix get_index bug and error-handling lock-ups V4L/DVB (8411): videobuf-dma-contig.c: fix 64-bit build for pre-2.6.24 kernels V4L/DVB (8410): sh_mobile_ceu_camera: fix 64-bit compiler warnings V4L/DVB (8397): video: convert select VIDEO_ZORAN_ZR36060 into depends on V4L/DVB (8396): video: Fix Kbuild dependency for VIDEO_IR_I2C V4L/DVB (8395): saa7134: Fix Kbuild dependency of ir-kbd-i2c V4L/DVB (8394): ir-common: CodingStyle fix: move EXPORT_SYMBOL_GPL to their proper places V4L/DVB (8393): media/video: Fix depencencies for VIDEOBUF V4L/DVB (8392): media/Kconfig: Convert V4L1_COMPAT select into "depends on" V4L/DVB (8390): videodev: add comment and remove magic number. V4L/DVB (8389): videodev: simplify get_index() V4L/DVB (8387): Some cosmetic changes V4L/DVB (8381): ov7670: fix compile warnings V4L/DVB (8380): saa7115: use saa7115_auto instead of saa711x as the autodetect driver name. V4L/DVB (8379): saa7127: Make device detection optional V4L/DVB (8378): cx18: move cx18_av_vbi_setup to av-core.c and rename to cx18_av_std_setup V4L/DVB (8377): ivtv/cx18: ensure the default control values are correct V4L/DVB (8376): cx25840: move cx25840_vbi_setup to core.c and rename to cx25840_std_setup V4L/DVB (8374): gspca: No conflict of 0c45:6011 with the sn9c102 driver. ...
Diffstat (limited to 'drivers/media/common/ir-functions.c')
-rw-r--r--drivers/media/common/ir-functions.c26
1 files changed, 8 insertions, 18 deletions
diff --git a/drivers/media/common/ir-functions.c b/drivers/media/common/ir-functions.c
index 266505207925..16792a68a449 100644
--- a/drivers/media/common/ir-functions.c
+++ b/drivers/media/common/ir-functions.c
@@ -66,7 +66,6 @@ void ir_input_init(struct input_dev *dev, struct ir_input_state *ir,
66 if (ir_codes) 66 if (ir_codes)
67 memcpy(ir->ir_codes, ir_codes, sizeof(ir->ir_codes)); 67 memcpy(ir->ir_codes, ir_codes, sizeof(ir->ir_codes));
68 68
69
70 dev->keycode = ir->ir_codes; 69 dev->keycode = ir->ir_codes;
71 dev->keycodesize = sizeof(IR_KEYTAB_TYPE); 70 dev->keycodesize = sizeof(IR_KEYTAB_TYPE);
72 dev->keycodemax = IR_KEYTAB_SIZE; 71 dev->keycodemax = IR_KEYTAB_SIZE;
@@ -78,6 +77,7 @@ void ir_input_init(struct input_dev *dev, struct ir_input_state *ir,
78 if (repeat) 77 if (repeat)
79 set_bit(EV_REP, dev->evbit); 78 set_bit(EV_REP, dev->evbit);
80} 79}
80EXPORT_SYMBOL_GPL(ir_input_init);
81 81
82void ir_input_nokey(struct input_dev *dev, struct ir_input_state *ir) 82void ir_input_nokey(struct input_dev *dev, struct ir_input_state *ir)
83{ 83{
@@ -86,6 +86,7 @@ void ir_input_nokey(struct input_dev *dev, struct ir_input_state *ir)
86 ir_input_key_event(dev,ir); 86 ir_input_key_event(dev,ir);
87 } 87 }
88} 88}
89EXPORT_SYMBOL_GPL(ir_input_nokey);
89 90
90void ir_input_keydown(struct input_dev *dev, struct ir_input_state *ir, 91void ir_input_keydown(struct input_dev *dev, struct ir_input_state *ir,
91 u32 ir_key, u32 ir_raw) 92 u32 ir_key, u32 ir_raw)
@@ -104,6 +105,7 @@ void ir_input_keydown(struct input_dev *dev, struct ir_input_state *ir,
104 ir_input_key_event(dev,ir); 105 ir_input_key_event(dev,ir);
105 } 106 }
106} 107}
108EXPORT_SYMBOL_GPL(ir_input_keydown);
107 109
108/* -------------------------------------------------------------------------- */ 110/* -------------------------------------------------------------------------- */
109/* extract mask bits out of data and pack them into the result */ 111/* extract mask bits out of data and pack them into the result */
@@ -122,6 +124,7 @@ u32 ir_extract_bits(u32 data, u32 mask)
122 124
123 return value; 125 return value;
124} 126}
127EXPORT_SYMBOL_GPL(ir_extract_bits);
125 128
126static int inline getbit(u32 *samples, int bit) 129static int inline getbit(u32 *samples, int bit)
127{ 130{
@@ -146,6 +149,7 @@ int ir_dump_samples(u32 *samples, int count)
146 printk("\n"); 149 printk("\n");
147 return 0; 150 return 0;
148} 151}
152EXPORT_SYMBOL_GPL(ir_dump_samples);
149 153
150/* decode raw samples, pulse distance coding used by NEC remotes */ 154/* decode raw samples, pulse distance coding used by NEC remotes */
151int ir_decode_pulsedistance(u32 *samples, int count, int low, int high) 155int ir_decode_pulsedistance(u32 *samples, int count, int low, int high)
@@ -212,6 +216,7 @@ int ir_decode_pulsedistance(u32 *samples, int count, int low, int high)
212 216
213 return value; 217 return value;
214} 218}
219EXPORT_SYMBOL_GPL(ir_decode_pulsedistance);
215 220
216/* decode raw samples, biphase coding, used by rc5 for example */ 221/* decode raw samples, biphase coding, used by rc5 for example */
217int ir_decode_biphase(u32 *samples, int count, int low, int high) 222int ir_decode_biphase(u32 *samples, int count, int low, int high)
@@ -253,6 +258,7 @@ int ir_decode_biphase(u32 *samples, int count, int low, int high)
253 } 258 }
254 return value; 259 return value;
255} 260}
261EXPORT_SYMBOL_GPL(ir_decode_biphase);
256 262
257/* RC5 decoding stuff, moved from bttv-input.c to share it with 263/* RC5 decoding stuff, moved from bttv-input.c to share it with
258 * saa7134 */ 264 * saa7134 */
@@ -353,6 +359,7 @@ void ir_rc5_timer_end(unsigned long data)
353 } 359 }
354 } 360 }
355} 361}
362EXPORT_SYMBOL_GPL(ir_rc5_timer_end);
356 363
357void ir_rc5_timer_keyup(unsigned long data) 364void ir_rc5_timer_keyup(unsigned long data)
358{ 365{
@@ -361,21 +368,4 @@ void ir_rc5_timer_keyup(unsigned long data)
361 dprintk(1, "ir-common: key released\n"); 368 dprintk(1, "ir-common: key released\n");
362 ir_input_nokey(ir->dev, &ir->ir); 369 ir_input_nokey(ir->dev, &ir->ir);
363} 370}
364
365EXPORT_SYMBOL_GPL(ir_input_init);
366EXPORT_SYMBOL_GPL(ir_input_nokey);
367EXPORT_SYMBOL_GPL(ir_input_keydown);
368
369EXPORT_SYMBOL_GPL(ir_extract_bits);
370EXPORT_SYMBOL_GPL(ir_dump_samples);
371EXPORT_SYMBOL_GPL(ir_decode_biphase);
372EXPORT_SYMBOL_GPL(ir_decode_pulsedistance);
373
374EXPORT_SYMBOL_GPL(ir_rc5_timer_end);
375EXPORT_SYMBOL_GPL(ir_rc5_timer_keyup); 371EXPORT_SYMBOL_GPL(ir_rc5_timer_keyup);
376
377/*
378 * Local variables:
379 * c-basic-offset: 8
380 * End:
381 */