mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
V4L/DVB: ir-core: prepare to add more operations for ir decoders
Some decoders and a lirc_dev interface may need some other operations to work. For example: IR device register/unregister and ir_keydown events may need to be tracked. As some operations can occur in interrupt time, and a lock is needed to prevent un-registering a decode while decoding a key, the lock needed to be convert into a spin lock. Signed-off-by: Mauro Carvalho Chehab <[email protected]>
This commit is contained in:
parent
995187bed3
commit
93c312ff21
4 changed files with 62 additions and 24 deletions
|
|
@ -88,6 +88,8 @@ struct ir_raw_handler {
|
|||
int (*decode)(struct input_dev *input_dev,
|
||||
struct ir_raw_event *evs,
|
||||
int len);
|
||||
int (*raw_register)(struct input_dev *input_dev);
|
||||
int (*raw_unregister)(struct input_dev *input_dev);
|
||||
};
|
||||
|
||||
#define to_ir_input_dev(_attr) container_of(_attr, struct ir_input_dev, attr)
|
||||
|
|
@ -116,12 +118,7 @@ int ir_raw_event_store(struct input_dev *input_dev, enum raw_event_type type);
|
|||
int ir_raw_event_handle(struct input_dev *input_dev);
|
||||
int ir_raw_handler_register(struct ir_raw_handler *ir_raw_handler);
|
||||
void ir_raw_handler_unregister(struct ir_raw_handler *ir_raw_handler);
|
||||
|
||||
#ifdef MODULE
|
||||
void ir_raw_init(void);
|
||||
#else
|
||||
#define ir_raw_init() 0
|
||||
#endif
|
||||
|
||||
/* from ir-nec-decoder.c */
|
||||
#ifdef CONFIG_IR_NEC_DECODER_MODULE
|
||||
|
|
|
|||
Loading…
Reference in a new issue