dragonboard: ir support

Signed-off-by: August <mingxin.android@gmail.com>
This commit is contained in:
August 2018-08-03 16:59:23 +08:00
parent 840cdb0943
commit f951ac6b19
7 changed files with 55 additions and 13 deletions

View file

@ -179,7 +179,7 @@ static int ir_nec_decode(struct rc_dev *dev, struct ir_raw_event ev)
scancode = address << 8 |
not_address << 16 |
command;
IR_dprintk(1, "NEC scancode 0x%06x\n", scancode);
pr_info("NEC scancode 0x%06x\n", scancode);
}
if (data->is_nec_x)

View file

@ -721,6 +721,8 @@ void rc_keydown(struct rc_dev *dev, enum rc_type protocol, u32 scancode, u8 togg
unsigned long flags;
u32 keycode = rc_g_keycode_from_table(dev, scancode);
pr_info("rc keycode = %d\n", keycode);
spin_lock_irqsave(&dev->keylock, flags);
ir_do_keydown(dev, protocol, scancode, keycode, toggle);

View file

@ -19,7 +19,16 @@ static u32 match_addr[MAX_ADDR_NUM];
static u32 match_num;
#endif
static struct rc_map_table sunxi_nec_scan[] = {
{ KEY_ESC, KEY_ESC },
{ 0xc61712, KEY_POWER },
{ 0xc61701, KEY_UP },
{ 0xc61719, KEY_LEFT },
{ 0xc61711, KEY_RIGHT },
{ 0xc61709, KEY_DOWN },
{ 0xc61740, KEY_ENTER },
{ 0xc6170f, KEY_HOME },
{ 0xc6170d, KEY_MENU },
{ 0xc6171c, KEY_VOLUMEUP },
{ 0xc6177f, KEY_VOLUMEDOWN },
};
#ifdef CONFIG_SUNXI_KEYMAPPING_SUPPORT

View file

@ -431,8 +431,6 @@ static const struct file_operations sunxi_ir_proc_fops = {
static struct proc_dir_entry *ir_protocol_dir;
static bool sunxi_get_ir_protocol(void)
{
ir_protocol_dir = proc_create(
(const char *)"sunxi_ir_protocol",
(umode_t)0400, NULL, &sunxi_ir_proc_fops);
@ -540,7 +538,7 @@ static int sunxi_ir_recv_probe(struct platform_device *pdev)
int rc;
char const ir_dev_name[] = "s_cir_rx";
pr_debug("sunxi-ir probe start !\n");
pr_info("sunxi-ir probe start !\n");
ir_data = kzalloc(sizeof(*ir_data), GFP_KERNEL);
if (IS_ERR_OR_NULL(ir_data)) {
pr_err("ir_data: not enough memory for ir data\n");
@ -617,7 +615,7 @@ static int sunxi_ir_recv_probe(struct platform_device *pdev)
}
/* enable here */
pr_debug("ir probe end!\n");
pr_info("ir probe end!\n");
return 0;