-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
V4L/DVB (13613): IR: create ir-core module
Split the ir-common into two separate modules: - ir-core: it is the IR-independent functions; - ir-common: has the common part used by V4L drivers. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
- Loading branch information
Mauro Carvalho Chehab
committed
Dec 16, 2009
1 parent
e27d381
commit 446e4a6
Showing
6 changed files
with
86 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,9 @@ | ||
config VIDEO_IR | ||
config IR_CORE | ||
tristate | ||
depends on INPUT | ||
default INPUT | ||
|
||
config VIDEO_IR | ||
tristate | ||
depends on IR_CORE | ||
default IR_CORE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
ir-common-objs := ir-functions.o ir-keymaps.o ir-keytable.o | ||
ir-common-objs := ir-functions.o ir-keymaps.o | ||
ir-core-objs := ir-keytable.o | ||
|
||
obj-$(CONFIG_IR_CORE) += ir-core.o | ||
obj-$(CONFIG_VIDEO_IR) += ir-common.o |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
/* | ||
* Remote Controller core header | ||
* | ||
* This program is free software; you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation version 2 of the License. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
*/ | ||
|
||
#ifndef _IR_CORE | ||
#define _IR_CORE | ||
|
||
#include <linux/input.h> | ||
#include <linux/spinlock.h> | ||
|
||
extern int ir_core_debug; | ||
#define IR_dprintk(level, fmt, arg...) if (ir_core_debug >= level) \ | ||
printk(KERN_DEBUG "%s: " fmt , __func__, ## arg) | ||
|
||
enum ir_type { | ||
IR_TYPE_UNKNOWN = 0, | ||
IR_TYPE_RC5 = 1, | ||
IR_TYPE_PD = 2, /* Pulse distance encoded IR */ | ||
IR_TYPE_NEC = 3, | ||
IR_TYPE_OTHER = 99, | ||
}; | ||
|
||
struct ir_scancode { | ||
u16 scancode; | ||
u32 keycode; | ||
}; | ||
|
||
struct ir_scancode_table { | ||
struct ir_scancode *scan; | ||
int size; | ||
enum ir_type ir_type; | ||
spinlock_t lock; | ||
}; | ||
|
||
/* Routines from ir-keytable.c */ | ||
|
||
u32 ir_g_keycode_from_table(struct input_dev *input_dev, | ||
u32 scancode); | ||
|
||
int ir_set_keycode_table(struct input_dev *input_dev, | ||
struct ir_scancode_table *rc_tab); | ||
|
||
int ir_roundup_tablesize(int n_elems); | ||
int ir_copy_table(struct ir_scancode_table *destin, | ||
const struct ir_scancode_table *origin); | ||
void ir_input_free(struct input_dev *input_dev); | ||
|
||
#endif |