mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
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:
parent
e202c15b42
commit
716aab44df
6 changed files with 98 additions and 17 deletions
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Reference in a new issue