diff options
author | Andy Walls <awalls@md.metrocast.net> | 2010-07-18 23:41:41 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2010-08-08 22:42:55 -0400 |
commit | 98d109f90fc02ce8baf1c2471ffcf8d66fb0d8e6 (patch) | |
tree | df1a3191953696bcccc618a25f749ee8071565a9 /drivers/media/video/cx23885/cx23885-core.c | |
parent | d6b1850d3c49e66f17bbb67f964a48b11528f56b (diff) |
V4L/DVB: cx23885: Add preliminary IR Rx support for the HVR-1250 and TeVii S470
Add initial IR Rx support using the intergrated IR controller in the
A/V core of the CX23885 bridge chip.
This initial support is flawed in that I2C transactions should not
be performed in a hard irq context. That will be fixed in a
follow on patch.
The TeVii S470 support is reported to generate perptual interrupts
that renders a user' system nearly unusable. The TeVii S470 IR
will be disabled by default in a follow on patch.
Signed-off-by: Andy Walls <awalls@md.metrocast.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/cx23885/cx23885-core.c')
-rw-r--r-- | drivers/media/video/cx23885/cx23885-core.c | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/drivers/media/video/cx23885/cx23885-core.c b/drivers/media/video/cx23885/cx23885-core.c index a74c0ab859ed..93e7afb98889 100644 --- a/drivers/media/video/cx23885/cx23885-core.c +++ b/drivers/media/video/cx23885/cx23885-core.c | |||
@@ -1650,7 +1650,7 @@ static irqreturn_t cx23885_irq(int irq, void *dev_id) | |||
1650 | u32 ts1_status, ts1_mask; | 1650 | u32 ts1_status, ts1_mask; |
1651 | u32 ts2_status, ts2_mask; | 1651 | u32 ts2_status, ts2_mask; |
1652 | int vida_count = 0, ts1_count = 0, ts2_count = 0, handled = 0; | 1652 | int vida_count = 0, ts1_count = 0, ts2_count = 0, handled = 0; |
1653 | bool ir_handled = false; | 1653 | bool subdev_handled; |
1654 | 1654 | ||
1655 | pci_status = cx_read(PCI_INT_STAT); | 1655 | pci_status = cx_read(PCI_INT_STAT); |
1656 | pci_mask = cx_read(PCI_INT_MSK); | 1656 | pci_mask = cx_read(PCI_INT_MSK); |
@@ -1681,7 +1681,7 @@ static irqreturn_t cx23885_irq(int irq, void *dev_id) | |||
1681 | PCI_MSK_VID_C | PCI_MSK_VID_B | PCI_MSK_VID_A | | 1681 | PCI_MSK_VID_C | PCI_MSK_VID_B | PCI_MSK_VID_A | |
1682 | PCI_MSK_AUD_INT | PCI_MSK_AUD_EXT | | 1682 | PCI_MSK_AUD_INT | PCI_MSK_AUD_EXT | |
1683 | PCI_MSK_GPIO0 | PCI_MSK_GPIO1 | | 1683 | PCI_MSK_GPIO0 | PCI_MSK_GPIO1 | |
1684 | PCI_MSK_IR)) { | 1684 | PCI_MSK_AV_CORE | PCI_MSK_IR)) { |
1685 | 1685 | ||
1686 | if (pci_status & PCI_MSK_RISC_RD) | 1686 | if (pci_status & PCI_MSK_RISC_RD) |
1687 | dprintk(7, " (PCI_MSK_RISC_RD 0x%08x)\n", | 1687 | dprintk(7, " (PCI_MSK_RISC_RD 0x%08x)\n", |
@@ -1731,6 +1731,10 @@ static irqreturn_t cx23885_irq(int irq, void *dev_id) | |||
1731 | dprintk(7, " (PCI_MSK_GPIO1 0x%08x)\n", | 1731 | dprintk(7, " (PCI_MSK_GPIO1 0x%08x)\n", |
1732 | PCI_MSK_GPIO1); | 1732 | PCI_MSK_GPIO1); |
1733 | 1733 | ||
1734 | if (pci_status & PCI_MSK_AV_CORE) | ||
1735 | dprintk(7, " (PCI_MSK_AV_CORE 0x%08x)\n", | ||
1736 | PCI_MSK_AV_CORE); | ||
1737 | |||
1734 | if (pci_status & PCI_MSK_IR) | 1738 | if (pci_status & PCI_MSK_IR) |
1735 | dprintk(7, " (PCI_MSK_IR 0x%08x)\n", | 1739 | dprintk(7, " (PCI_MSK_IR 0x%08x)\n", |
1736 | PCI_MSK_IR); | 1740 | PCI_MSK_IR); |
@@ -1765,9 +1769,19 @@ static irqreturn_t cx23885_irq(int irq, void *dev_id) | |||
1765 | handled += cx23885_video_irq(dev, vida_status); | 1769 | handled += cx23885_video_irq(dev, vida_status); |
1766 | 1770 | ||
1767 | if (pci_status & PCI_MSK_IR) { | 1771 | if (pci_status & PCI_MSK_IR) { |
1772 | subdev_handled = false; | ||
1768 | v4l2_subdev_call(dev->sd_ir, core, interrupt_service_routine, | 1773 | v4l2_subdev_call(dev->sd_ir, core, interrupt_service_routine, |
1769 | pci_status, &ir_handled); | 1774 | pci_status, &subdev_handled); |
1770 | if (ir_handled) | 1775 | if (subdev_handled) |
1776 | handled++; | ||
1777 | } | ||
1778 | |||
1779 | if (pci_status & PCI_MSK_AV_CORE) { | ||
1780 | subdev_handled = false; | ||
1781 | v4l2_subdev_call(dev->sd_cx25840, | ||
1782 | core, interrupt_service_routine, | ||
1783 | pci_status, &subdev_handled); | ||
1784 | if (subdev_handled) | ||
1771 | handled++; | 1785 | handled++; |
1772 | } | 1786 | } |
1773 | 1787 | ||