summaryrefslogtreecommitdiff
path: root/drivers/media/pci/mantis/mantis_dma.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_dma.c
parent1c35cf9ccac5cf32cd865e6a62dfd16dd50ad5dd (diff)
[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_dma.c')
-rw-r--r--drivers/media/pci/mantis/mantis_dma.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/media/pci/mantis/mantis_dma.c b/drivers/media/pci/mantis/mantis_dma.c
index 566c407175a4..1d59c7e039f7 100644
--- a/drivers/media/pci/mantis/mantis_dma.c
+++ b/drivers/media/pci/mantis/mantis_dma.c
@@ -190,7 +190,7 @@ void mantis_dma_start(struct mantis_pci *mantis)
mmwrite(0, MANTIS_DMA_CTL);
mantis->last_block = mantis->busy_block = 0;
- mmwrite(mmread(MANTIS_INT_MASK) | MANTIS_INT_RISCI, MANTIS_INT_MASK);
+ mantis_unmask_ints(mantis, MANTIS_INT_RISCI);
mmwrite(MANTIS_FIFO_EN | MANTIS_DCAP_EN
| MANTIS_RISC_EN, MANTIS_DMA_CTL);
@@ -209,8 +209,7 @@ void mantis_dma_stop(struct mantis_pci *mantis)
mmwrite(mmread(MANTIS_INT_STAT), MANTIS_INT_STAT);
- mmwrite(mmread(MANTIS_INT_MASK) & ~(MANTIS_INT_RISCI |
- MANTIS_INT_RISCEN), MANTIS_INT_MASK);
+ mantis_mask_ints(mantis, MANTIS_INT_RISCI | MANTIS_INT_RISCEN);
}