Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 192934
b: refs/heads/master
c: 4f9256b
h: refs/heads/master
v: v3
  • Loading branch information
Mauro Carvalho Chehab committed May 19, 2010
1 parent 02f4a20 commit bbebc40
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 36 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 587835a4b0ada7d78c4f3300e3ab26b7b2495705
refs/heads/master: 4f9256b496677adf799342cee7d406dd46e566d9
34 changes: 0 additions & 34 deletions trunk/include/media/ir-core.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
#ifndef _IR_CORE
#define _IR_CORE

#include <linux/input.h>
#include <linux/spinlock.h>
#include <linux/kfifo.h>
#include <linux/time.h>
Expand All @@ -27,39 +26,13 @@ extern int ir_core_debug;
#define IR_dprintk(level, fmt, arg...) if (ir_core_debug >= level) \
printk(KERN_DEBUG "%s: " fmt , __func__, ## arg)

#define IR_TYPE_UNKNOWN 0
#define IR_TYPE_RC5 (1 << 0) /* Philips RC5 protocol */
#define IR_TYPE_PD (1 << 1) /* Pulse distance encoded IR */
#define IR_TYPE_NEC (1 << 2)
#define IR_TYPE_OTHER (((u64)1) << 63l)

enum raw_event_type {
IR_SPACE = (1 << 0),
IR_PULSE = (1 << 1),
IR_START_EVENT = (1 << 2),
IR_STOP_EVENT = (1 << 3),
};

struct ir_scancode {
u16 scancode;
u32 keycode;
};

struct ir_scancode_table {
struct ir_scancode *scan;
unsigned int size; /* Max number of entries */
unsigned int len; /* Used number of entries */
unsigned int alloc; /* Size of *scan in bytes */
u64 ir_type;
char *name;
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;
Expand Down Expand Up @@ -108,13 +81,6 @@ struct ir_raw_handler {

#define to_ir_input_dev(_attr) container_of(_attr, struct ir_input_dev, attr)

/* 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);
void rc_map_init(void);

/* Routines from ir-keytable.c */

u32 ir_g_keycode_from_table(struct input_dev *input_dev,
Expand Down
37 changes: 36 additions & 1 deletion trunk/include/media/rc-map.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,42 @@
* (at your option) any later version.
*/

#include <media/ir-core.h>
#include <linux/input.h>

#define IR_TYPE_UNKNOWN 0
#define IR_TYPE_RC5 (1 << 0) /* Philips RC5 protocol */
#define IR_TYPE_PD (1 << 1) /* Pulse distance encoded IR */
#define IR_TYPE_NEC (1 << 2)
#define IR_TYPE_OTHER (1u << 31)

struct ir_scancode {
u16 scancode;
u32 keycode;
};

struct ir_scancode_table {
struct ir_scancode *scan;
unsigned int size; /* Max number of entries */
unsigned int len; /* Used number of entries */
unsigned int alloc; /* Size of *scan in bytes */
u64 ir_type;
char *name;
spinlock_t lock;
};

struct rc_keymap {
struct list_head list;
struct ir_scancode_table map;
};

/* 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);
void rc_map_init(void);

/* Names of the several keytables defined in-kernel */

#define RC_MAP_ADSTECH_DVB_T_PCI "rc-adstech-dvb-t-pci"
#define RC_MAP_APAC_VIEWCOMP "rc-apac-viewcomp"
Expand Down

0 comments on commit bbebc40

Please sign in to comment.