V4L/DVB: ir-core: Add support for RC map code register
Instead of having all RC tables hardcoded on one file with
all tables there, add infrastructure for registering and dynamically
load the table(s) when needed.
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
diff --git a/include/media/ir-core.h b/include/media/ir-core.h
index 643ff25..39df3cf 100644
--- a/include/media/ir-core.h
+++ b/include/media/ir-core.h
@@ -52,6 +52,11 @@
spinlock_t lock;
};
+struct rc_keymap {
+ struct list_head list;
+ struct ir_scancode_table map;
+};
+
struct ir_dev_props {
unsigned long allowed_protos;
void *priv;
@@ -126,6 +131,12 @@
const char *driver_name);
void ir_input_unregister(struct input_dev *input_dev);
+/* Routines from rc-map.c */
+
+int ir_register_map(struct rc_keymap *map);
+void ir_unregister_map(struct rc_keymap *map);
+struct ir_scancode_table *get_rc_map(const char *name);
+
/* Routines from ir-sysfs.c */
int ir_register_class(struct input_dev *input_dev);