summaryrefslogtreecommitdiff
path: root/drivers/media/pci/mantis/mantis_pcmcia.c
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_pcmcia.c
parent1c35cf9ccac5cf32cd865e6a62dfd16dd50ad5dd (diff)
downloadlwn-a96762da0cfcbe27f18febb84797269cd9faf791.tar.gz
lwn-a96762da0cfcbe27f18febb84797269cd9faf791.zip
[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_pcmcia.c')
-rw-r--r--drivers/media/pci/mantis/mantis_pcmcia.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/media/pci/mantis/mantis_pcmcia.c b/drivers/media/pci/mantis/mantis_pcmcia.c
index 2f188c089666..b2dbc7b2e0f6 100644
--- a/drivers/media/pci/mantis/mantis_pcmcia.c
+++ b/drivers/media/pci/mantis/mantis_pcmcia.c
@@ -89,7 +89,7 @@ int mantis_pcmcia_init(struct mantis_ca *ca)
u32 gpif_stat, card_stat;
- mmwrite(mmread(MANTIS_INT_MASK) | MANTIS_INT_IRQ0, MANTIS_INT_MASK);
+ mantis_unmask_ints(mantis, MANTIS_INT_IRQ0);
gpif_stat = mmread(MANTIS_GPIF_STATUS);
card_stat = mmread(MANTIS_GPIF_IRQCFG);
@@ -117,5 +117,5 @@ void mantis_pcmcia_exit(struct mantis_ca *ca)
struct mantis_pci *mantis = ca->ca_priv;
mmwrite(mmread(MANTIS_GPIF_STATUS) & (~MANTIS_CARD_PLUGOUT | ~MANTIS_CARD_PLUGIN), MANTIS_GPIF_STATUS);
- mmwrite(mmread(MANTIS_INT_MASK) & ~MANTIS_INT_IRQ0, MANTIS_INT_MASK);
+ mantis_mask_ints(mantis, MANTIS_INT_IRQ0);
}