V4L/DVB: ir-core: Add callbacks for input/evdev open/close on IR core

Especially when IR needs to do polling, it generates lots of wakeups per
second. This makes no sense, if the input event device is closed.

Adds a callback handler to the IR hardware driver, to allow registering
an open/close ops.

Signed-off-by: Mauro Carvalho Chehab <[email protected]>
This commit is contained in:
Mauro Carvalho Chehab 2010-03-31 14:40:35 -03:00
commit 716aab44df
6 changed files with 98 additions and 17 deletions

View file

@ -50,6 +50,7 @@ struct card_ir {
struct ir_input_state ir;
char name[32];
char phys[32];
int users;
u32 running:1;
struct ir_dev_props props;

View file

@ -56,6 +56,8 @@ struct ir_dev_props {
unsigned long allowed_protos;
void *priv;
int (*change_protocol)(void *priv, u64 ir_type);
int (*open)(void *priv);
void (*close)(void *priv);
};
struct ir_raw_event {