diff options
author | Andy Walls <awalls@radix.net> | 2009-09-27 18:51:50 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-12-05 15:40:20 -0500 |
commit | f59ad611acccd4057b8e685c7fd5532ab1a17f66 (patch) | |
tree | 9c48a478ddc9a9f69c64c9e42f3db1f202970b78 /drivers/media/video/cx23885/cx23885-cards.c | |
parent | 1a0b9d89c62ddf0aed12798686fe452e7e97de42 (diff) |
V4L/DVB (13098): cx23885: Add integrated IR subdevice interrupt and notification handling
Add integrated IR subdevice interrupt and notification handling. This is in
preparation of input keypress handling changes for the cx23885 module.
Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/cx23885/cx23885-cards.c')
-rw-r--r-- | drivers/media/video/cx23885/cx23885-cards.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/drivers/media/video/cx23885/cx23885-cards.c b/drivers/media/video/cx23885/cx23885-cards.c index 7c5d13ac538e..c0e2409f3cbd 100644 --- a/drivers/media/video/cx23885/cx23885-cards.c +++ b/drivers/media/video/cx23885/cx23885-cards.c | |||
@@ -821,6 +821,7 @@ int cx23885_ir_init(struct cx23885_dev *dev) | |||
821 | if (ret) | 821 | if (ret) |
822 | break; | 822 | break; |
823 | dev->sd_ir = cx23885_find_hw(dev, CX23885_HW_888_IR); | 823 | dev->sd_ir = cx23885_find_hw(dev, CX23885_HW_888_IR); |
824 | dev->pci_irqmask |= PCI_MSK_IR; | ||
824 | break; | 825 | break; |
825 | case CX23885_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL_EXP: | 826 | case CX23885_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL_EXP: |
826 | request_module("ir-kbd-i2c"); | 827 | request_module("ir-kbd-i2c"); |
@@ -830,6 +831,28 @@ int cx23885_ir_init(struct cx23885_dev *dev) | |||
830 | return ret; | 831 | return ret; |
831 | } | 832 | } |
832 | 833 | ||
834 | void cx23885_ir_fini(struct cx23885_dev *dev) | ||
835 | { | ||
836 | switch (dev->board) { | ||
837 | case CX23885_BOARD_HAUPPAUGE_HVR1850: | ||
838 | dev->pci_irqmask &= ~PCI_MSK_IR; | ||
839 | cx_clear(PCI_INT_MSK, PCI_MSK_IR); | ||
840 | cx23888_ir_remove(dev); | ||
841 | dev->sd_ir = NULL; | ||
842 | break; | ||
843 | } | ||
844 | } | ||
845 | |||
846 | void cx23885_ir_pci_int_enable(struct cx23885_dev *dev) | ||
847 | { | ||
848 | switch (dev->board) { | ||
849 | case CX23885_BOARD_HAUPPAUGE_HVR1850: | ||
850 | if (dev->sd_ir && (dev->pci_irqmask & PCI_MSK_IR)) | ||
851 | cx_set(PCI_INT_MSK, PCI_MSK_IR); | ||
852 | break; | ||
853 | } | ||
854 | } | ||
855 | |||
833 | void cx23885_card_setup(struct cx23885_dev *dev) | 856 | void cx23885_card_setup(struct cx23885_dev *dev) |
834 | { | 857 | { |
835 | struct cx23885_tsport *ts1 = &dev->ts1; | 858 | struct cx23885_tsport *ts1 = &dev->ts1; |