summaryrefslogtreecommitdiffstats
path: root/drivers/media/pci/mantis/mantis_input.h
diff options
context:
space:
mode:
authorJan Klötzke <jan@kloetzke.net>2015-06-06 16:58:13 -0300
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>2015-06-10 11:58:24 -0300
commita96762da0cfcbe27f18febb84797269cd9faf791 (patch)
treefc5d8339e60fa9efdd7306d54a3840992d918b28 /drivers/media/pci/mantis/mantis_input.h
parent1c35cf9ccac5cf32cd865e6a62dfd16dd50ad5dd (diff)
downloadlinux-a96762da0cfcbe27f18febb84797269cd9faf791.tar.bz2
[media] mantis: add remote control support
The embedded UART is apparently used to receive decoded IR (RC5?) codes. Forward these scan codes to the RC framework and (where known) add corresponding mapping tables to translate them into regular keys. This patch has been tested on a TechniSat CableStar HD2. The mappings of other rc-maps were taken from Christoph Pinkl's patch (http://patchwork.linuxtv.org/patch/7217/) and the s2-liplianin repository. The major difference to Christoph's patch is a reworked interrupt handling of the UART because the RX interrupt is apparently level triggered and requires masking until the FIFO is read by the UART worker. Signed-off-by: Jan Klötzke <jan@kloetzke.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers/media/pci/mantis/mantis_input.h')
-rw-r--r--drivers/media/pci/mantis/mantis_input.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/drivers/media/pci/mantis/mantis_input.h b/drivers/media/pci/mantis/mantis_input.h
new file mode 100644
index 000000000000..3bbde8b11ce1
--- /dev/null
+++ b/drivers/media/pci/mantis/mantis_input.h
@@ -0,0 +1,28 @@
+/*
+ Mantis PCI bridge driver
+
+ Copyright (C) Manu Abraham (abraham.manu@gmail.com)
+
+ 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; either version 2 of the License, or
+ (at your option) any later version.
+
+ 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.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*/
+
+#ifndef __MANTIS_INPUT_H
+#define __MANTIS_INPUT_H
+
+extern int mantis_input_init(struct mantis_pci *mantis);
+extern void mantis_input_exit(struct mantis_pci *mantis);
+extern void mantis_input_process(struct mantis_pci *mantis, int scancode);
+
+#endif /* __MANTIS_UART_H */