summaryrefslogtreecommitdiff
path: root/include/media
diff options
context:
space:
mode:
authorDavid Härdeman <david@hardeman.nu>2010-10-29 23:08:07 +0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2010-12-29 13:16:35 +0300
commit62c6503125389763a74911408d984c5dd09eeb97 (patch)
treea9b419280d25fca5086d82f8992a1d5843da75f1 /include/media
parent2997137be8eba5bf9c07a24d5fda1f4225f9ca7d (diff)
downloadlinux-62c6503125389763a74911408d984c5dd09eeb97.tar.xz
[media] ir-core: remove remaining users of the ir-functions keyhandlers
This patch removes the remaining usages of the ir_input_nokey() and ir_input_keydown() functions provided by drivers/media/IR/ir-functions.c by using the corresponding functionality in ir-core instead. Signed-off-by: David Härdeman <david@hardeman.nu> Acked-by: Jarod Wilson <jarod@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'include/media')
-rw-r--r--include/media/ir-common.h31
-rw-r--r--include/media/ir-core.h3
-rw-r--r--include/media/ir-kbd-i2c.h4
3 files changed, 7 insertions, 31 deletions
diff --git a/include/media/ir-common.h b/include/media/ir-common.h
index 415242047b6a..4a32e89a3cfe 100644
--- a/include/media/ir-common.h
+++ b/include/media/ir-common.h
@@ -1,7 +1,7 @@
/*
- *
- * some common structs and functions to handle infrared remotes via
- * input layer ...
+ * some common functions to handle infrared remote protocol decoding for
+ * drivers which have not yet been (or can't be) converted to use the
+ * regular protocol decoders...
*
* (c) 2003 Gerd Knorr <kraxel@bytesex.org> [SuSE Labs]
*
@@ -33,30 +33,17 @@
#define RC5_ADDR(x) (((x)>>6)&31)
#define RC5_INSTR(x) ((x)&63)
-struct ir_input_state {
- /* configuration */
- u64 ir_type;
-
- /* key info */
- u32 ir_key; /* ir scancode */
- u32 keycode; /* linux key code */
- int keypressed; /* current state */
-};
-
/* this was saa7134_ir and bttv_ir, moved here for
* rc5 decoding. */
struct card_ir {
struct input_dev *dev;
- struct ir_input_state ir;
char name[32];
char phys[32];
int users;
-
u32 running:1;
struct ir_dev_props props;
/* Usual gpio signalling */
-
u32 mask_keycode;
u32 mask_keydown;
u32 mask_keyup;
@@ -65,7 +52,6 @@ struct card_ir {
int shift_by;
int start; // What should RC5_START() be
int addr; // What RC5_ADDR() should be.
- int rc5_key_timeout;
int rc5_remote_gap;
struct work_struct work;
struct timer_list timer;
@@ -73,8 +59,6 @@ struct card_ir {
/* RC5 gpio */
u32 rc5_gpio;
struct timer_list timer_end; /* timer_end for code completion */
- struct timer_list timer_keyup; /* timer_end for key release */
- u32 last_rc5; /* last good rc5 code */
u32 last_bit; /* last raw bit seen */
u32 code; /* raw code under construction */
struct timeval base_time; /* time of last seen code */
@@ -89,16 +73,7 @@ struct card_ir {
};
/* Routines from ir-functions.c */
-
-int ir_input_init(struct input_dev *dev, struct ir_input_state *ir,
- const u64 ir_type);
-void ir_input_nokey(struct input_dev *dev, struct ir_input_state *ir);
-void ir_input_keydown(struct input_dev *dev, struct ir_input_state *ir,
- u32 ir_key);
u32 ir_extract_bits(u32 data, u32 mask);
-u32 ir_rc5_decode(unsigned int code);
-
void ir_rc5_timer_end(unsigned long data);
-void ir_rc5_timer_keyup(unsigned long data);
#endif
diff --git a/include/media/ir-core.h b/include/media/ir-core.h
index 6dc37fae6606..bff75f258fbc 100644
--- a/include/media/ir-core.h
+++ b/include/media/ir-core.h
@@ -159,7 +159,8 @@ void ir_input_unregister(struct input_dev *input_dev);
void ir_repeat(struct input_dev *dev);
void ir_keydown(struct input_dev *dev, int scancode, u8 toggle);
-void ir_keyup(struct ir_input_dev *ir);
+void ir_keydown_notimeout(struct input_dev *dev, int scancode, u8 toggle);
+void ir_keyup(struct input_dev *dev);
u32 ir_g_keycode_from_table(struct input_dev *input_dev, u32 scancode);
/* From ir-raw-event.c */
diff --git a/include/media/ir-kbd-i2c.h b/include/media/ir-kbd-i2c.h
index 557c676ab7dc..8c37b5ec0cf6 100644
--- a/include/media/ir-kbd-i2c.h
+++ b/include/media/ir-kbd-i2c.h
@@ -12,8 +12,7 @@ struct IR_i2c {
struct i2c_client *c;
struct input_dev *input;
- struct ir_input_state ir;
- u64 ir_type;
+
/* Used to avoid fast repeating */
unsigned char old;
@@ -41,6 +40,7 @@ struct IR_i2c_init_data {
const char *name;
u64 type; /* IR_TYPE_RC5, etc */
u32 polling_interval; /* 0 means DEFAULT_POLLING_INTERVAL */
+
/*
* Specify either a function pointer or a value indicating one of
* ir_kbd_i2c's internal get_key functions